/** Notice * This file contains works from many authors under various (but compatible) licenses. Please see core.txt for more information. **/
(function(){(window.wpCoreControlsBundle=window.wpCoreControlsBundle||[]).push([[4],{495:function(Ba,wa,r){var oa=r(0);Ba=r(88);var na=r(49);r=function(ma){function fa(){return null!==ma&&ma.apply(this,arguments)||this}Object(oa.c)(fa,ma);fa.prototype.testSelection=function(ea,aa,w){return na.a.Hl(ea,aa,w)};return fa}(Ba.a);wa.a=r},87:function(Ba,wa,r){function oa(nb){return Object(ta.b)(void 0,void 0,void 0,function(){var sb,tb,rb,xa,Oa,Ya,ab,mb,vb,eb,ob,ub,Cb,Nb,kb;return Object(ta.d)(this,function(wb){switch(wb.label){case 0:return sb=
nb.yb,tb=nb.ZE,rb=nb.$E,xa=nb.hL,Oa=nb.zha,Ya=nb.kha,ab=Ua.getDocument(),mb=[1],[4,Object(Ea.c)(tb,{extension:"pdf"})];case 1:return vb=wb.ca(),eb=Ua.la(),Cb=(ub=Fa.a).gka,[4,vb.NC()];case 2:return ob=Cb.apply(ub,[wb.ca().xfdfString,sb]),Nb=!0,[4,ab.Rf(vb,mb,sb,Nb)];case 3:return wb.ca(),[4,ab.Fg([sb+1],Nb)];case 4:return wb.ca(),kb=eb.nb().filter(function(Gb){return Gb.CL()&&Gb.PageNumber===sb}),eb.If(kb,{force:!0,source:"contentEditTool"}),[4,eb.iL(ob)];case 5:return wb.ca(),hb||(Ua.getDocument().aN(),
Ua.$M(sb),Ua.re()),aa(sb),Ya||Oa||(ba(sb,rb.galleys,xa,Oa),ba(sb,rb.objects,xa,Oa)),[2]}})})}function na(nb){if(nb)return ma(nb.contents);Object(Ka.g)("Unable to extract document content")}function ma(nb){nb=(new DOMParser).parseFromString(nb,"text/html").documentElement.querySelector("body");nb.querySelectorAll("p").forEach(function(sb){sb.querySelectorAll("span").forEach(function(xa){var Oa=xa.getAttribute("style");Oa=fa(Oa,xa.innerHTML);xa.innerHTML=Oa});var tb=sb.getAttribute("style"),rb=sb.innerHTML.replaceAll("<br>",
"");sb.innerHTML=fa(tb,rb)});return nb.innerHTML.trim()}function fa(nb,sb){if(null===nb||void 0===nb?0:nb.includes("bold"))sb="<strong>"+sb+"</strong>";if(null===nb||void 0===nb?0:nb.includes("italic"))sb="<em>"+sb+"</em>";if((null===nb||void 0===nb?0:nb.includes("underline:1;"))||(null===nb||void 0===nb?0:nb.includes("text-decoration: underline")))sb="<u>"+sb+"</u>";return sb}function ea(nb){if(["STRONG","EM","U"].includes(nb.tagName)&&null!==nb.getAttribute("style")){var sb=document.createElement("span"),
tb=nb.style.color;tb=ca(tb);sb.setAttribute("style","color:"+tb);nb.removeAttribute("style");sb.innerHTML=nb.innerHTML;nb.innerHTML="";nb.appendChild(sb)}else"SPAN"===nb.tagName&&null!==nb.getAttribute("style")?(tb=nb.style.color,tb=ca(tb),nb.setAttribute("style","color:"+tb)):"A"===nb.tagName&&nb.removeAttribute("style")}function aa(nb){var sb=Ua.la(),tb=sb.nb().filter(function(rb){return rb.Re()&&rb.PageNumber===nb});sb.If(tb,{force:!0,source:"contentEditTool"})}function w(nb,sb){sb.forEach(function(tb){Ia[nb]||
(Ia[nb]=[]);Ia[nb].find(function(rb){return rb.id===tb.id})||Ia[nb].push(tb)})}function x(nb,sb){sb.forEach(function(tb){Xa[nb]||(Xa[nb]=[]);Xa[nb].find(function(rb){return rb.id===tb.id})||Xa[nb].push(tb)})}function h(nb,sb,tb,rb){return Object(ta.b)(void 0,void 0,void 0,function(){var xa,Oa,Ya,ab,mb,vb,eb,ob,ub,Cb,Nb,kb,wb,Gb,Mb,Sb,Rb,Zb;return Object(ta.d)(this,function(ya){switch(ya.label){case 0:if(!nb)return[2];xa=sb.replaceAll("<p><br></p>","");Oa=e(xa);Oa=Oa.replace(/<span style="color: var\(--text-color\);">(.*?)<\/span>/g,
"$1");Oa=Oa.replace(/<span class="ql-cursor">(.*?)<\/span>/g,"");Ya=nb.gf.id;ab=nb.PageNumber;mb=Pa[ab];vb=mb.galleys.find(function(hc){return hc.id===Ya});eb=ma(vb.contents);ob=ia(ab,mb,eb,Oa,Ya);if(""===ob)return[3,2];ub=new TextEncoder;Cb=ub.encode(ob);Nb=Cb.buffer;kb=Object(Ja.c)()||"https://www.pdftron.com/webfonts/v2/";wb=Ua.getDocument();return[4,wb.be([ab])];case 1:return Gb=ya.ca(),ub=new TextEncoder,Mb=ub.encode(""),Sb=Mb.buffer,Va.postMessage({cmd:"importText",pdfFile:Gb,pageNumber:ab,
webFontURL:kb,galleyId:Ya,importData:Nb,tableData:Sb,isSearchReplace:tb,callbackMapId:rb},[Nb,Sb]),Rb={},vb&&(Zb=vb.galleyBox,Rb={top:Zb.top,left:Zb.left,bottom:Zb.bottom,right:Zb.right}),Object(Da.w)(eb,Oa,Rb),[3,3];case 2:Object(Ka.g)("Unable to generate import XML"),ya.label=3;case 3:return[2]}})})}function e(nb){var sb=new DOMParser,tb=sb.parseFromString(nb,"text/xml");tb.querySelector("parsererror")&&(tb=sb.parseFromString("<Root>"+nb+"</Root>","text/xml"));tb.querySelectorAll("a").forEach(function(rb){var xa=
rb.childNodes[0];Array.from(rb.querySelectorAll("*")).find(function(Oa){return"u"===Oa.tagName.toLowerCase()})||(rb=document.createElement("u"),xa.after(rb),rb.appendChild(xa))});return(new XMLSerializer).serializeToString(tb)}function a(nb,sb,tb){return Object(ta.b)(void 0,void 0,void 0,function(){var rb,xa,Oa,Ya;return Object(ta.d)(this,function(ab){switch(ab.label){case 0:return aa(sb),Xa[sb]=[],Ia[sb]=[],[4,nb.be([sb])];case 1:return rb=ab.ca(),xa=new TextEncoder,Oa=xa.encode(""),Ya=Oa.buffer,
Va.postMessage({cmd:"exportFile",pageNumber:sb,performExport:tb,pdfFile:rb,tableData:Ya},[rb,Ya]),[2]}})})}function b(nb){return Object(ta.b)(void 0,void 0,void 0,function(){return Object(ta.d)(this,function(){pb||(Ua=nb,pb=new Promise(function(sb,tb){var rb=window.Core.ContentEdit.getWorkerPath(),xa=window.Core.ContentEdit.getResourcePath();Va=new Worker(rb+"InfixServerModule.js");Va.onmessage=function(Oa){ja(Oa,sb,tb)};Va.postMessage({cmd:"isReady",resourcePath:xa})}));return[2,pb]})})}function f(nb,
sb,tb,rb){this.top=nb;this.left=sb;this.bottom=tb;this.right=rb;this.topVal=function(){return Math.round(this.top)};this.bottomVal=function(){return Math.round(this.bottom)};this.leftVal=function(){return Math.round(this.left)};this.rightVal=function(){return Math.round(this.right)};this.height=function(){return Math.round(Math.abs(this.top-this.bottom))};this.width=function(){return Math.round(this.right-this.left)};this.US=function(xa){return this.topVal()!==xa.topVal()||this.leftVal()!==xa.leftVal()||
this.bottomVal()!==xa.bottomVal()||this.rightVal()!==xa.rightVal()}}function n(nb,sb,tb,rb,xa){this.id=nb;this.pagenum=sb;this.galleysContents=tb;this.contents=rb;this.galleyBox=xa;Object(Da.v)(Xa)}function z(nb,sb,tb,rb){this.id=sb;this.type=nb;this.bbox=tb;this.pagenum=rb}function y(nb,sb,tb,rb,xa){this.id=nb;this.pagecount=sb;this.pageBBox=tb;this.galleys=rb;this.objects=xa}function da(nb,sb){this.family=nb;this.variations=sb}function ia(nb,sb,tb,rb,xa){var Oa=[],Ya=[];(new DOMParser).parseFromString(rb,
"text/html").documentElement.querySelectorAll("p").forEach(function(ob,ub){Oa[ub]=ob.innerHTML;Ya[ub]={fontSize:ob.style.fontSize,fontFamily:ob.style.fontFamily,color:ca(ob.style.color)}});tb=(new DOMParser).parseFromString(tb,"text/html");var ab=null;tb.documentElement.querySelectorAll("p").forEach(function(ob,ub){if(ub<Oa.length){var Cb=(new DOMParser).parseFromString(Oa[ub],"text/html").documentElement.querySelector("body");Cb.childNodes.forEach(function(kb){ea(kb)});ob.innerHTML=Cb.innerHTML;
ab=ob.getAttribute("style");Cb=Ya[ub].fontSize?Ya[ub].fontSize:ob.style.fontSize;var Nb=Ya[ub].fontFamily?Ya[ub].fontFamily.replace(/\s+/g,"").replace(/['"]+/g,""):ob.style.fontFamily;ub=Ya[ub].color?Ya[ub].color:null;ab=ab.replace(/(font:.*?;)/i,"font:normal normal "+Cb+" "+Nb+";");ab=ab.replace("Italic","");ab=ab.replace("underline:1;","underline:0;");ab=ab.replace("text-decoration: underline;","text-decoration: none;");ub&&(ab=ab.replace(/(color:.*?;)/i,"color:"+ub+";"));ob.setAttribute("style",
ab)}else ob.remove()});for(rb=tb.documentElement.querySelectorAll("p").length;rb<Oa.length;rb++){var mb=document.createElement("p");mb.setAttribute("id","0");var vb=(new DOMParser).parseFromString(Oa[rb],"text/html").documentElement.querySelector("body");vb.childNodes.forEach(function(ob){ea(ob)});mb.innerHTML=vb.innerHTML;null!=ab&&mb.setAttribute("style",ab);tb.documentElement.querySelector("body").appendChild(mb)}tb=tb.documentElement.querySelector("body").innerHTML;var eb="";Xa[nb].forEach(function(ob){ob.id===
xa&&(eb=ob)});if(""===eb)return"";sb="<DOC id='"+sb.id+"' pagecount='"+sb.pagecount+"'>";sb=sb+("<STORY galley_ids='"+xa+"' pagenum='"+nb+"'><galleys>")+(eb.galleysContents+"</galleys>");eb.contents=tb;sb=sb+tb+"\n</STORY>";return sb+="</DOC>"}function ca(nb){return nb.startsWith("rgb(")?"#"+nb.replace(/^[^\d]+/,"").replace(/[^\d]+$/,"").split(",").map(function(sb){return("00"+parseInt(sb,10).toString(16)).slice(-2)}).join(""):nb}function ba(nb,sb,tb,rb){var xa=[],Oa=Ua.getDocument(),Ya=null;sb.forEach(function(ab){if(ab instanceof
z){var mb=Oa.qo(nb,ab.bbox.leftVal(),ab.bbox.topVal());var vb=mb.x;var eb=mb.y;var ob=Oa.qo(nb,ab.bbox.rightVal(),ab.bbox.bottomVal());mb=ob.x;ob=ob.y}else if(ab instanceof n)mb=Oa.qo(nb,ab.galleyBox.leftVal(),ab.galleyBox.topVal()),vb=mb.x,eb=mb.y,ob=Oa.qo(nb,ab.galleyBox.rightVal(),ab.galleyBox.bottomVal()),mb=ob.x,ob=ob.y;else return;var ub=new window.Core.Annotations.RectangleAnnotation,Cb=Qa.a.OBJECT;ab instanceof n&&(Cb=Qa.a.TEXT);ub.Wma(ab,Cb);ub.PageNumber=ab.pagenum;ub.X=vb;ub.Y=eb;ub.Width=
mb-vb;ub.Height=ob-eb;ub.StrokeColor=new Ha.a("#3183C8");ub.FillColor=new Ha.a(255,255,255,.01);ub.Style="dash";ub.Dashes="4,3";if(jb||rb)ub.NoView=!0,ub.Listable=!1;ub.Gw();ub.selectionModel=za.a;xa.push(ub);"undefined"!==typeof tb&&tb===ab.id&&(Ya=ub)});sb=Ua.la();sb.$g(xa);!Ya||jb||rb||sb.Yf(Ya);sb.le(xa)}function ja(nb,sb,tb){return Object(ta.b)(this,void 0,void 0,function(){var rb,xa,Oa,Ya,ab,mb,vb,eb,ob,ub;return Object(ta.d)(this,function(Cb){switch(Cb.label){case 0:rb=nb.data;Oa=rb.cmd;switch(Oa){case "isReady":return[3,
1];case "initialiseInfixServer":return[3,3];case "loadAvailableFonts":return[3,4];case "exportFile":return[3,5];case "insertNewTextBox":return[3,6];case "importText":return[3,7];case "transformObject":return[3,7];case "alignParagraph":return[3,7];case "deleteObject":return[3,8];case "insertImage":return[3,9]}return[3,10];case 1:return[4,Object(Ma.b)()];case 2:return Ya=Cb.ca(),Va.postMessage({cmd:"initialiseInfixServer",l:Ya}),[3,10];case 3:return(ab=la(rb.resultsXML))?(sb(),mb=Object(Ja.c)()||"https://www.pdftron.com/webfonts/v2/",
Va.postMessage({cmd:"loadAvailableFonts",webFontURL:mb})):tb("License key does not have content edit permission"),[3,10];case 4:return Aa(rb.resultsXML),[3,10];case 5:return rb.exportPerformed?ka(rb.pageNumber,rb.exportXML,rb.objectXML,rb.resultsXML):(xa=Pa[rb.pageNumber],x(rb.pageNumber,xa.galleys),w(rb.pageNumber,xa.objects),aa(rb.pageNumber),ba(rb.pageNumber,xa.galleys),ba(rb.pageNumber,xa.objects)),bb.resolve(),db&&db[rb.pageNumber]&&db[rb.pageNumber].resolve(),[3,10];case 6:return ha(rb.pageNumber,
rb.exportXML,rb.contentHTML),xa=Pa[rb.pageNumber],oa({yb:rb.pageNumber,ZE:rb.pdfBuffer,$E:xa,hL:rb.id}),[3,10];case 7:xa=Pa[rb.pageNumber];ua(rb.pageNumber,rb.resultsXML);oa({yb:rb.pageNumber,ZE:rb.pdfBuffer,$E:xa,hL:rb.id,zha:rb.isSearchReplace});vb=rb.isSearchReplace;eb=rb.callbackMapId;if(vb&&eb&&Bb[eb])Bb[eb]();return[3,10];case 8:return xa=Pa[rb.pageNumber],ua(rb.pageNumber,rb.resultsXML),xa.galleys=xa.galleys.filter(function(Nb){return Nb.id!==rb.id}),xa.objects=xa.objects.filter(function(Nb){return Nb.id!==
rb.id}),ob={yb:rb.pageNumber,ZE:rb.pdfBuffer,$E:xa},oa(ob),[3,10];case 9:return xa=Pa[rb.pageNumber],ua(rb.pageNumber,rb.resultsXML),ub={yb:rb.pageNumber,ZE:rb.pdfBuffer,$E:xa,hL:rb.isText,kha:!0},oa(ub),[3,10];case 10:return[2]}})})}function la(nb){nb=new Uint8Array(nb);var sb=(new TextDecoder("utf-8")).decode(nb);nb=!1;sb=(new DOMParser).parseFromString(sb,"text/xml").getElementsByTagName("LicenseCheck");null!==sb&&0<sb.length&&(sb=sb[0].getElementsByTagName("Status")[0].innerHTML,"error"!==sb&&
"ok"===sb&&(nb=!0));return nb}function ha(nb,sb){sb=(new TextDecoder("utf-8")).decode(sb);sb=(new DOMParser).parseFromString(sb,"text/xml").getElementsByTagName("STORY");var tb=Array.prototype.slice.call(sb)[0];sb=tb.getAttribute("galley_ids");var rb=Array.prototype.slice.call(tb.getElementsByTagName("g"))[0],xa=rb.getAttribute("bbox").split(" ");xa=new f(parseFloat(xa[0]),parseFloat(xa[1]),parseFloat(xa[2]),parseFloat(xa[3]));rb=rb.innerHTML;var Oa=Array.prototype.slice.call(tb.getElementsByTagName("galleys"))[0];
Oa.parentNode.removeChild(Oa);tb=ra(tb.innerHTML).trim();sb=new n(sb,nb,rb,tb,xa);tb=Pa[nb];xa=tb.galleys;xa.push(sb);tb.galleys=xa;Pa[nb]=tb;x(nb,tb.galleys);w(nb,tb.objects);aa(nb);ba(nb,tb.galleys);ba(nb,tb.objects)}function ka(nb,sb,tb,rb){var xa=new Uint8Array(sb),Oa=new TextDecoder("utf-8");sb=Oa.decode(xa);xa=new Uint8Array(tb);tb=Oa.decode(xa);xa=new Uint8Array(rb);rb=Oa.decode(xa);Pa[nb]=qa(nb,sb,tb,rb);rb=Pa[nb];x(nb,rb.galleys);w(nb,rb.objects);aa(nb);ba(nb,rb.galleys);ba(nb,rb.objects)}
function pa(nb,sb){nb=parseFloat(nb);return isNaN(sb)||sb<nb?nb:sb}function qa(nb,sb,tb,rb){var xa;var Oa=new DOMParser;rb=Oa.parseFromString(rb,"text/xml");Array.prototype.slice.call(rb.getElementsByTagName("BBox")).forEach(function(mb){if("CropBox"===mb.getAttribute("Name")){var vb=parseFloat(mb.getElementsByTagName("Top").item(0).innerHTML),eb=parseFloat(mb.getElementsByTagName("Bottom").item(0).innerHTML),ob=parseFloat(mb.getElementsByTagName("Left").item(0).innerHTML);mb=parseFloat(mb.getElementsByTagName("Right").item(0).innerHTML);
xa=new f(vb,ob,eb,mb)}});Oa=new DOMParser;rb=Oa.parseFromString(sb,"text/xml");var Ya=[];Array.prototype.slice.call(rb.getElementsByTagName("STORY")).forEach(function(mb){var vb=mb.getAttribute("galley_ids"),eb=Array.prototype.slice.call(mb.getElementsByTagName("g"))[0],ob=eb.getAttribute("bbox").split(" ");ob=new f(parseFloat(ob[0]),parseFloat(ob[1]),parseFloat(ob[2]),parseFloat(ob[3]));eb=eb.innerHTML;var ub=Array.prototype.slice.call(mb.getElementsByTagName("galleys"))[0];ub.parentNode.removeChild(ub);
mb=ra(mb.innerHTML).trim();vb=new n(vb,nb,eb,mb,ob);Ya.push(vb)});Oa=new DOMParser;var ab=[];sb=Oa.parseFromString(tb,"text/xml").getElementsByTagName("Object");Array.prototype.slice.call(sb).forEach(function(mb){var vb=mb.getAttribute("Type"),eb=mb.getAttribute("OID");mb=Array.prototype.slice.call(mb.getElementsByTagName("Point"));var ob=Number.NaN,ub=Number.NaN,Cb=Number.NaN,Nb=Number.NaN;mb.forEach(function(kb){var wb=kb.getAttribute("Name");"TL"===wb?(ob=pa(kb.getAttribute("Y"),ob),Cb=pa(kb.getAttribute("X"),
Cb)):"TR"===wb?(ob=pa(kb.getAttribute("Y"),ob),Nb=pa(kb.getAttribute("X"),Nb)):"BR"===wb?(ub=pa(kb.getAttribute("Y"),ub),Nb=pa(kb.getAttribute("X"),Nb)):"BL"===wb&&(ub=pa(kb.getAttribute("Y"),ub),Cb=pa(kb.getAttribute("X"),Cb))});mb=new f(ob,Cb,ub,Nb);vb=new z(vb,eb,mb,nb);ab.push(vb)});sb=Array.prototype.slice.call(rb.getElementsByTagName("DOC"))[0].getAttribute("id");return new y(sb,1,xa,Ya,ab)}function ra(nb){return(new DOMParser).parseFromString(nb,"text/html").documentElement.querySelector("body").innerHTML}
function ua(nb,sb){var tb;sb=(new TextDecoder("utf-8")).decode(sb);var rb=(new DOMParser).parseFromString(sb,"text/xml");sb=rb.getElementsByTagName("Galley").item(0);if(null!=sb){var xa=sb.getAttribute("id");sb=rb.getElementsByTagName("BBox");sb=Array.prototype.slice.call(sb);sb.forEach(function(ab){var mb=ab.getElementsByTagName("Top"),vb=parseFloat(mb.item(0).innerHTML);mb=ab.getElementsByTagName("Left");var eb=parseFloat(mb.item(0).innerHTML);mb=ab.getElementsByTagName("Bottom");var ob=parseFloat(mb.item(0).innerHTML);
mb=ab.getElementsByTagName("Right");ab=parseFloat(mb.item(0).innerHTML);tb=new f(vb,eb,ob,ab)});Xa[nb].forEach(function(ab){ab.id===xa&&!0===tb.US(ab.galleyBox)&&(ab.galleyBox=tb)})}sb=rb.getElementsByTagName("Object").item(0);if(null!=sb){var Oa=sb.getAttribute("OID");sb=rb.getElementsByTagName("BBox");sb=Array.prototype.slice.call(sb);sb.forEach(function(ab){var mb=ab.getElementsByTagName("Top"),vb=parseFloat(mb.item(0).innerHTML);mb=ab.getElementsByTagName("Left");var eb=parseFloat(mb.item(0).innerHTML);
mb=ab.getElementsByTagName("Bottom");var ob=parseFloat(mb.item(0).innerHTML);mb=ab.getElementsByTagName("Right");ab=parseFloat(mb.item(0).innerHTML);tb=new f(vb,eb,ob,ab)});Ia[nb].forEach(function(ab){ab.id===Oa&&!0===tb.US(ab.bbox)&&(ab.bbox=tb)})}sb=rb.getElementsByTagName("NewParas").item(0);if(null!=sb){var Ya=sb.getAttribute("id");Xa[nb].forEach(function(ab){if(ab.id===Ya){var mb="<Contents>"+ab.contents;mb+="</Contents>";var vb=Array.prototype.slice.call(rb.getElementsByTagName("NewPara"));
mb=(new DOMParser).parseFromString(mb,"text/xml");var eb=Array.prototype.slice.call(mb.getElementsByTagName("p"));vb.forEach(function(ob){var ub=parseFloat(ob.innerHTML),Cb=!1;eb.forEach(function(Nb){var kb=Nb.getAttribute("id");!1===Cb&&"0"===kb&&(Nb.setAttribute("id",ub),Cb=!0)})});ab.contents=mb.getElementsByTagName("Contents").item(0).innerHTML}})}}function va(nb){return{regex:0!==(nb&Ra.f.rv),wildcard:0!==(nb&Ra.f.Nr),wholeWord:0!==(nb&Ra.f.uv),caseSensitive:0!==(nb&Ra.f.Cr)}}function Aa(nb){nb=
new Uint8Array(nb);nb=(new TextDecoder("utf-8")).decode(nb);nb=(new DOMParser).parseFromString(nb,"text/xml").getElementsByTagName("Font");var sb={};Array.prototype.slice.call(nb).forEach(function(tb){var rb=tb.getAttribute("Family");rb in sb||(sb[rb]={});var xa=[];Array.prototype.slice.call(tb.getElementsByTagName("Variation")).forEach(function(Oa){Oa=Oa.innerHTML;xa.push(Oa);if(Oa.includes("Regular")||Oa===rb.replace(/\s+/g,""))sb[rb].hasRegular=!0;Oa.includes("Bold")&&(sb[rb].hasBold=!0);Oa.includes("Italic")&&
(sb[rb].hasItalic=!0)});tb=new da(rb,xa);qb.push(tb)});Ab=Object.keys(sb).filter(function(tb){return sb[tb].hasRegular&&sb[tb].hasBold&&sb[tb].hasItalic})}r.r(wa);var ta=r(0),Ea=r(54),Ha=r(7),za=r(495),Ja=r(39),Ma=r(75),Ka=r(2),Qa=r(172),Da=r(55),Fa=r(6),Sa=r(141),Ra=r(25),Wa=r(8),cb=r(23),Va=null,pb=null,jb=!1,hb=!1,Xa={},Ia={},Pa={},Ua,bb=window.createPromiseCapability(),db=[],qb=[],Ab=[],Bb={};wa["default"]={cka:b,eka:a,A$:function(nb){return Object(ta.b)(void 0,void 0,void 0,function(){var sb,
tb,rb,xa,Oa,Ya,ab,mb;return Object(ta.d)(this,function(vb){switch(vb.label){case 0:return sb=nb.id,tb=nb.isText,rb=nb.pageNumber,xa=Ua.getDocument(),[4,xa.be([rb])];case 1:return Oa=vb.ca(),Ya=new TextEncoder,ab=Ya.encode(""),mb=ab.buffer,Va.postMessage({cmd:"deleteObject",pdfFile:Oa,pageNumber:rb,objectID:sb,isText:tb,tableData:mb},[mb]),[2]}})})},Upa:function(nb){return Object(ta.b)(void 0,void 0,void 0,function(){var sb,tb,rb,xa,Oa,Ya,ab,mb,vb,eb,ob,ub,Cb;return Object(ta.d)(this,function(Nb){switch(Nb.label){case 0:return sb=
nb.id,tb=nb.position,rb=tb.top,xa=tb.left,Oa=tb.bottom,Ya=tb.right,ab=nb.isText,mb=nb.pageNumber,vb=Ua.getDocument(),[4,vb.be([mb])];case 1:return eb=Nb.ca(),ob=new TextEncoder,ub=ob.encode(""),Cb=ub.buffer,Va.postMessage({cmd:"transformObject",pdfFile:eb,pageNumber:mb,objectID:sb,isText:ab,topVal:rb,leftVal:xa,bottomVal:Oa,rightVal:Ya,tableData:Cb},[Cb]),[2]}})})},m7:function(nb,sb){return Object(ta.b)(void 0,void 0,void 0,function(){var tb,rb,xa,Oa,Ya,ab,mb,vb,eb,ob,ub,Cb,Nb,kb,wb;return Object(ta.d)(this,
function(Gb){switch(Gb.label){case 0:return tb="<DOC><STORY><galleys></galleys>",rb=[],xa=(new DOMParser).parseFromString(sb,"text/html"),xa.documentElement.querySelectorAll("p").forEach(function(Mb,Sb){rb[Sb]=Mb.innerHTML}),rb.forEach(function(Mb,Sb){Mb=(new DOMParser).parseFromString(rb[Sb],"text/html").documentElement.querySelector("body");Mb.childNodes.forEach(function(Rb){ea(Rb)});tb+="<p>"+Mb.innerHTML+"</p>"}),tb+="</STORY></DOC>",Oa=nb.pageNumber,Ya=Ua.getDocument(),ab=nb.position,mb=ab.top,
vb=ab.left,eb=ab.bottom,ob=ab.right,ub=nb.defaultText,Cb=nb.font,Nb=nb.fontSize,kb=nb.textColor,[4,Ya.be([Oa])];case 1:return wb=Gb.ca(),Va.postMessage({cmd:"insertNewTextBox",pdfFile:wb,pageNumber:Oa,topVal:mb,leftVal:vb,bottomVal:eb,rightVal:ob,defaultText:ub,font:Cb,fontSize:Nb,textColor:kb,importData:tb,content:sb}),[2]}})})},mqa:h,Zda:na,pma:function(nb){return Object(ta.b)(this,void 0,void 0,function(){var sb,tb,rb,xa,Oa,Ya,ab,mb,vb,eb,ob,ub,Cb,Nb,kb,wb,Gb,Mb,Sb,Rb,Zb,ya,hc=this;return Object(ta.d)(this,
function(tc){switch(tc.label){case 0:sb=nb.replaceWith;tb=nb.documentViewer;rb=nb.search;xa=nb.searchResults;if(tb){if(!xa&&!rb)throw Error('The "searchResults" parameter is missing in the options');if(void 0===sb)throw Error('The "replaceWith" parameter should not be undefined');}else throw Error('The "documentViewer" parameter is missing in the options');Oa=1===xa.length;rb?(Ya=rb.N8,ab=rb.Kqa):(mb=va(tb.eK()),Ya=mb.N8,ab=mb.Kqa);vb=null;eb=[];if(Oa)vb=xa[0],eb=[vb.pageNum];else try{eb=Object.keys(xa.reduce(function(wc,
Gc){wc[Gc.pageNum]=Gc.pageNum;return wc},{})).map(function(wc){return Number(wc)})}catch(wc){Object(Ka.i)(wc)}ob=0;if(vb)for(ub=tb.uk(),Cb=-1,Nb=0,kb=ub.length;Nb<kb&&(wb=ub[Nb],wb.pageNum===Cb?ob++:(Cb=wb.pageNum,ob=0),!Object(Sa.a)(wb,vb));Nb++);Gb=xa[0].resultStr;Mb=Ya?"mg":"mgi";Sb=ab?"\\b("+Gb+")\\b":"("+Gb+")";Rb=new RegExp("(?<!</?[^>]*|&[^;]*)"+Sb,Mb);bb=window.createPromiseCapability();return pb?[3,2]:[4,b(tb)];case 1:tc.ca(),tc.label=2;case 2:return jb=!0,Da.a.trigger(Wa.e.SEARCH_AND_REPLACE_STARTED),
Zb=0,ya=eb.map(function(wc){return Object(ta.b)(hc,void 0,void 0,function(){var Gc,Mc=this;return Object(ta.d)(this,function(){Gc=new Promise(function(dd,Sc){return Object(ta.b)(Mc,void 0,void 0,function(){var Bd=this;return Object(ta.d)(this,function(je){switch(je.label){case 0:return db[wc]=window.createPromiseCapability(),[4,a(tb.getDocument(),wc,!0)];case 1:return je.ca(),db[wc].promise.then(function(){return Object(ta.b)(Bd,void 0,void 0,function(){function kc(ed,ve){return Object(ta.b)(this,
void 0,void 0,function(){var Qd,Wc;return Object(ta.d)(this,function(Xc){switch(Xc.label){case 0:Qd=Object(cb.f)(),Bb[Qd]=function(){delete Bb[Qd];dd(!0);Da.a.trigger(Wa.e.SEARCH_AND_REPLACE_TEXT_REPLACED)},Xc.label=1;case 1:return Xc.fg.push([1,3,,4]),[4,h(ed,ve,!0,Qd)];case 2:return Xc.ca(),[3,4];case 3:return Wc=Xc.ca(),Object(Ka.i)(Wc),Sc(Wc),[3,4];case 4:return[2]}})})}var jc,Yd,ke,Cd,Hd,le,oc,Zd,Vc,nd,Dd,Dc,Pd,me,$d,Id,Jd;return Object(ta.d)(this,function(){jc=Ua.la();Yd=jc.nb().filter(function(ed){return ed.PageNumber===
wc}).filter(function(ed){return ed.Re()}).concat();ke=[];Hd=Cd=0;for(le=Yd.length;Hd<le;Hd++){oc=Yd[Hd];Zd=oc.gf;Vc=na(Zd);nd=[];try{for(Dd=void 0;null!==(Dd=Rb.exec(Vc));)nd.push(Dd),ke.push(xa[Zb]),Zb++}catch(ed){Object(Ka.i)(ed)}if(nd.length)if(Cd+=nd.length,Oa&&Cd>ob){Dc=Math.abs(Cd-nd.length-ob);Pd=nd[Dc].index;me=Vc.substr(0,Pd);$d=sb;Id=Vc.substr(Pd+Gb.length,Vc.length);Jd=""+me+$d+Id;Da.a.trigger(Wa.e.SEARCH_AND_REPLACE_TEXT_FOUND,[[vb]]);kc(oc,Jd);break}else Oa||(hb=!0,Jd=Vc.replace(Rb,sb),
Da.a.trigger(Wa.e.SEARCH_AND_REPLACE_TEXT_FOUND,[ke]),kc(oc,Jd))}return[2]})})}).catch(Sc),[2]}})})});return[2,Gc]})})}),[2,Promise.all(ya).then(function(){Oa&&vb?setTimeout(function(){var Mc=[];tb.yz(xa[0].resultStr,tb.eK(),{startPage:eb[0],endPage:eb[0],fullSearch:!0,onDocumentEnd:function(){hb=jb=!1;Da.a.trigger(Wa.e.SEARCH_AND_REPLACE_ENDED);tb.KO(eb[0]-1,Mc)},onResult:function(dd){dd.resultCode===Ra.e.mn&&Mc.push(dd)}})},200):(tb.rT(),tb.Pm(),tb.re(),hb=jb=!1,Da.a.trigger(Wa.e.SEARCH_AND_REPLACE_ENDED));
var wc=Ua.la(),Gc=wc.nb().filter(function(Mc){return Mc.Re()});wc.If(Gc,{force:!0,source:"contentEditTool"})})]}})})},Xma:function(nb,sb){var tb=ma(nb.gf.contents);tb=(new DOMParser).parseFromString(tb,"text/html").documentElement.querySelector("body");var rb=tb.querySelectorAll("p"),xa=new XMLSerializer;rb.forEach(function(Oa){Oa.style.fontFamily=sb});tb=xa.serializeToString(tb);h(nb,tb)},Yma:function(nb,sb){var tb=ma(nb.gf.contents);tb=(new DOMParser).parseFromString(tb,"text/html").documentElement.querySelector("body");
var rb=tb.querySelectorAll("p"),xa=new XMLSerializer;rb.forEach(function(Oa){Oa.style.fontSize=sb});tb=xa.serializeToString(tb);h(nb,tb)},y7:function(nb,sb){return Object(ta.b)(void 0,void 0,void 0,function(){var tb,rb,xa,Oa,Ya,ab,mb;return Object(ta.d)(this,function(vb){switch(vb.label){case 0:return tb=nb.gf.id,rb=nb.PageNumber,xa=Ua.getDocument(),[4,xa.be([rb])];case 1:return Oa=vb.ca(),Ya=new TextEncoder,ab=Ya.encode(""),mb=ab.buffer,Va.postMessage({cmd:"AlignParaText",pdfFile:Oa,pageNumber:rb,
galleyID:tb,alignment:sb,topVal1:"",leftVal1:"",bottomVal1:"",rightVal1:"",topVal2:"",leftVal2:"",bottomVal2:"",rightVal2:"",tableData:mb},[mb]),[2]}})})},o8:function(nb){var sb=ma(nb.gf.contents);sb=(new DOMParser).parseFromString(sb,"text/html").documentElement.querySelector("body");var tb=sb.querySelectorAll("p"),rb=new XMLSerializer,xa="bold"===tb[0].style.fontWeight,Oa=rb.serializeToString(tb[0]).includes("<strong>");tb.forEach(function(Ya){if(xa||Oa){Ya.style.fontWeight="normal";var ab=rb.serializeToString(Ya).replace(/<strong>/g,
"");ab=ab.replace(/<\/strong>/g,"");ab=(new DOMParser).parseFromString(ab,"text/html").documentElement.querySelector("p");Ya.parentElement.replaceChild(ab,Ya)}else Ya.style.fontWeight="bold",Ya.innerHTML="<strong>"+Ya.innerHTML.trim()+"</strong>"});sb=rb.serializeToString(sb);h(nb,sb)},Kha:function(nb){var sb=ma(nb.gf.contents);sb=(new DOMParser).parseFromString(sb,"text/html").documentElement.querySelector("body");var tb=sb.querySelectorAll("p"),rb=new XMLSerializer,xa="italic"===tb[0].style.fontStyle,
Oa=rb.serializeToString(tb[0]).includes("<em>");tb.forEach(function(Ya){if(xa||Oa){Ya.style.fontStyle="normal";Ya.style.font.includes("Italic")&&(Ya.style.font=Ya.style.font.replace("Italic",""));var ab=rb.serializeToString(Ya).replace(/<em>/g,"");ab=ab.replace(/<\/em>/g,"");ab=(new DOMParser).parseFromString(ab,"text/html").documentElement.querySelector("p");Ya.parentElement.replaceChild(ab,Ya)}else Ya.style.fontStyle="italic",Ya.innerHTML="<em>"+Ya.innerHTML.trim()+"</em>"});sb=rb.serializeToString(sb);
h(nb,sb)},$pa:function(nb){var sb=ma(nb.gf.contents);sb=(new DOMParser).parseFromString(sb,"text/html").documentElement.querySelector("body");var tb=sb.querySelectorAll("p"),rb=new XMLSerializer,xa=tb[0].style.textDecoration.includes("underline")||tb[0].style.textDecoration.includes("word"),Oa=rb.serializeToString(tb[0]).includes("<u>");tb.forEach(function(Ya){if(xa||Oa){Ya.style.textDecoration=Ya.style.textDecoration.replace("underline","");var ab=rb.serializeToString(Ya).replace(/<u>/g,"");ab=ab.replace(/<\/u>/g,
"");ab=(new DOMParser).parseFromString(ab,"text/html").documentElement.querySelector("p");Ya.parentElement.replaceChild(ab,Ya)}else Ya.style.textDecoration.includes("none")?Ya.style.textDecoration=Ya.style.textDecoration.replace("none","underline"):Ya.style.textDecoration+=" underline",Ya.innerHTML="<u>"+Ya.innerHTML.trim()+"</u>"});sb=rb.serializeToString(sb);h(nb,sb)},Loa:function(nb,sb){var tb=ma(nb.gf.contents);tb=(new DOMParser).parseFromString(tb,"text/html").documentElement.querySelector("body");
var rb=tb.querySelectorAll("p"),xa=new XMLSerializer;rb.forEach(function(Oa){Oa.style.color=sb});tb.querySelectorAll("span").forEach(function(Oa){Oa.setAttribute("style","color:"+sb)});tb=xa.serializeToString(tb);h(nb,tb)},Mda:function(){return Ab},k7:function(nb){return Object(ta.b)(void 0,void 0,void 0,function(){var sb,tb,rb,xa,Oa,Ya,ab,mb,vb,eb;return Object(ta.d)(this,function(ob){switch(ob.label){case 0:return sb=nb.pageNumber,tb=nb.newImage,rb=nb.scaleType,xa=nb.position,Oa=xa.top,Ya=xa.left,
ab=xa.bottom,mb=xa.right,vb=Ua.getDocument(),[4,vb.be([sb])];case 1:return eb=ob.ca(),Va.postMessage({cmd:"insertImage",pdfFile:eb,pageNumber:sb,newImage:tb,scaleType:rb,topVal:Oa,leftVal:Ya,bottomVal:ab,rightVal:mb},[]),[2]}})})}}}}]);}).call(this || window)
