UNPKG

@suns/react-monorepo-nx

Version:

To evaluate and compare the bundled and unbundled builds on large codebase.

117 lines (114 loc) 72.1 kB
(function(){/* ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. **************************************************************************** The buffer module from node.js, for the browser. @author Feross Aboukhadijeh <http://feross.org> @license MIT */ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(t,p,q){if(t==Array.prototype||t==Object.prototype)return t;t[p]=q.value;return t}; $jscomp.getGlobal=function(t){t=["object"==typeof globalThis&&globalThis,t,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var p=0;p<t.length;++p){var q=t[p];if(q&&q.Math==Math)return q}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={}; $jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(t,p,q){if(!q||null!=t){q=$jscomp.propertyToPolyfillSymbol[p];if(null==q)return t[p];q=t[q];return void 0!==q?q:t[p]}};$jscomp.polyfill=function(t,p,q,n){p&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(t,p,q,n):$jscomp.polyfillUnisolated(t,p,q,n))}; $jscomp.polyfillUnisolated=function(t,p,q,n){q=$jscomp.global;t=t.split(".");for(n=0;n<t.length-1;n++){var l=t[n];if(!(l in q))return;q=q[l]}t=t[t.length-1];n=q[t];p=p(n);p!=n&&null!=p&&$jscomp.defineProperty(q,t,{configurable:!0,writable:!0,value:p})}; $jscomp.polyfillIsolated=function(t,p,q,n){var l=t.split(".");t=1===l.length;n=l[0];n=!t&&n in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var h=0;h<l.length-1;h++){var c=l[h];if(!(c in n))return;n=n[c]}l=l[l.length-1];q=$jscomp.IS_SYMBOL_NATIVE&&"es6"===q?n[l]:null;p=p(q);null!=p&&(t?$jscomp.defineProperty($jscomp.polyfills,l,{configurable:!0,writable:!0,value:p}):p!==q&&(void 0===$jscomp.propertyToPolyfillSymbol[l]&&(q=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[l]=$jscomp.IS_SYMBOL_NATIVE? $jscomp.global.Symbol(l):$jscomp.POLYFILL_PREFIX+q+"$"+l),$jscomp.defineProperty(n,$jscomp.propertyToPolyfillSymbol[l],{configurable:!0,writable:!0,value:p})))};$jscomp.polyfill("Number.isFinite",function(t){return t?t:function(p){return"number"!==typeof p?!1:!isNaN(p)&&Infinity!==p&&-Infinity!==p}},"es6","es3");$jscomp.polyfill("Number.isInteger",function(t){return t?t:function(p){return Number.isFinite(p)?p===Math.floor(p):!1}},"es6","es3"); $jscomp.arrayIteratorImpl=function(t){var p=0;return function(){return p<t.length?{done:!1,value:t[p++]}:{done:!0}}};$jscomp.arrayIterator=function(t){return{next:$jscomp.arrayIteratorImpl(t)}};$jscomp.makeIterator=function(t){var p="undefined"!=typeof Symbol&&Symbol.iterator&&t[Symbol.iterator];if(p)return p.call(t);if("number"==typeof t.length)return $jscomp.arrayIterator(t);throw Error(String(t)+" is not an iterable or ArrayLike");}; $jscomp.polyfill("Promise",function(t){function p(){this.batch_=null}function q(c){return c instanceof l?c:new l(function(e,k){e(c)})}if(t&&(!($jscomp.FORCE_POLYFILL_PROMISE||$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&"undefined"===typeof $jscomp.global.PromiseRejectionEvent)||!$jscomp.global.Promise||-1===$jscomp.global.Promise.toString().indexOf("[native code]")))return t;p.prototype.asyncExecute=function(c){if(null==this.batch_){this.batch_=[];var e=this;this.asyncExecuteFunction(function(){e.executeBatch_()})}this.batch_.push(c)}; var n=$jscomp.global.setTimeout;p.prototype.asyncExecuteFunction=function(c){n(c,0)};p.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var c=this.batch_;this.batch_=[];for(var e=0;e<c.length;++e){var k=c[e];c[e]=null;try{k()}catch(m){this.asyncThrow_(m)}}}this.batch_=null};p.prototype.asyncThrow_=function(c){this.asyncExecuteFunction(function(){throw c;})};var l=function(c){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];this.isRejectionHandled_=!1;var e=this.createResolveAndReject_(); try{c(e.resolve,e.reject)}catch(k){e.reject(k)}};l.prototype.createResolveAndReject_=function(){function c(m){return function(u){k||(k=!0,m.call(e,u))}}var e=this,k=!1;return{resolve:c(this.resolveTo_),reject:c(this.reject_)}};l.prototype.resolveTo_=function(c){if(c===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(c instanceof l)this.settleSameAsPromise_(c);else{a:switch(typeof c){case "object":var e=null!=c;break a;case "function":e=!0;break a;default:e=!1}e?this.resolveToNonPromiseObj_(c): this.fulfill_(c)}};l.prototype.resolveToNonPromiseObj_=function(c){var e=void 0;try{e=c.then}catch(k){this.reject_(k);return}"function"==typeof e?this.settleSameAsThenable_(e,c):this.fulfill_(c)};l.prototype.reject_=function(c){this.settle_(2,c)};l.prototype.fulfill_=function(c){this.settle_(1,c)};l.prototype.settle_=function(c,e){if(0!=this.state_)throw Error("Cannot settle("+c+", "+e+"): Promise already settled in state"+this.state_);this.state_=c;this.result_=e;2===this.state_&&this.scheduleUnhandledRejectionCheck_(); this.executeOnSettledCallbacks_()};l.prototype.scheduleUnhandledRejectionCheck_=function(){var c=this;n(function(){if(c.notifyUnhandledRejection_()){var e=$jscomp.global.console;"undefined"!==typeof e&&e.error(c.result_)}},1)};l.prototype.notifyUnhandledRejection_=function(){if(this.isRejectionHandled_)return!1;var c=$jscomp.global.CustomEvent,e=$jscomp.global.Event,k=$jscomp.global.dispatchEvent;if("undefined"===typeof k)return!0;"function"===typeof c?c=new c("unhandledrejection",{cancelable:!0}): "function"===typeof e?c=new e("unhandledrejection",{cancelable:!0}):(c=$jscomp.global.document.createEvent("CustomEvent"),c.initCustomEvent("unhandledrejection",!1,!0,c));c.promise=this;c.reason=this.result_;return k(c)};l.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var c=0;c<this.onSettledCallbacks_.length;++c)h.asyncExecute(this.onSettledCallbacks_[c]);this.onSettledCallbacks_=null}};var h=new p;l.prototype.settleSameAsPromise_=function(c){var e=this.createResolveAndReject_(); c.callWhenSettled_(e.resolve,e.reject)};l.prototype.settleSameAsThenable_=function(c,e){var k=this.createResolveAndReject_();try{c.call(e,k.resolve,k.reject)}catch(m){k.reject(m)}};l.prototype.then=function(c,e){function k(y,E){return"function"==typeof y?function(z){try{m(y(z))}catch(C){u(C)}}:E}var m,u,w=new l(function(y,E){m=y;u=E});this.callWhenSettled_(k(c,m),k(e,u));return w};l.prototype.catch=function(c){return this.then(void 0,c)};l.prototype.callWhenSettled_=function(c,e){function k(){switch(m.state_){case 1:c(m.result_); break;case 2:e(m.result_);break;default:throw Error("Unexpected state: "+m.state_);}}var m=this;null==this.onSettledCallbacks_?h.asyncExecute(k):this.onSettledCallbacks_.push(k);this.isRejectionHandled_=!0};l.resolve=q;l.reject=function(c){return new l(function(e,k){k(c)})};l.race=function(c){return new l(function(e,k){for(var m=$jscomp.makeIterator(c),u=m.next();!u.done;u=m.next())q(u.value).callWhenSettled_(e,k)})};l.all=function(c){var e=$jscomp.makeIterator(c),k=e.next();return k.done?q([]):new l(function(m, u){function w(z){return function(C){y[z]=C;E--;0==E&&m(y)}}var y=[],E=0;do y.push(void 0),E++,q(k.value).callWhenSettled_(w(y.length-1),u),k=e.next();while(!k.done)})};return l},"es6","es3");$jscomp.checkStringArgs=function(t,p,q){if(null==t)throw new TypeError("The 'this' value for String.prototype."+q+" must not be null or undefined");if(p instanceof RegExp)throw new TypeError("First argument to String.prototype."+q+" must not be a regular expression");return t+""}; $jscomp.polyfill("String.prototype.endsWith",function(t){return t?t:function(p,q){var n=$jscomp.checkStringArgs(this,p,"endsWith");p+="";void 0===q&&(q=n.length);q=Math.max(0,Math.min(q|0,n.length));for(var l=p.length;0<l&&0<q;)if(n[--q]!=p[--l])return!1;return 0>=l}},"es6","es3");$jscomp.initSymbol=function(){}; $jscomp.polyfill("Symbol",function(t){if(t)return t;var p=function(h,c){this.$jscomp$symbol$id_=h;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:c})};p.prototype.toString=function(){return this.$jscomp$symbol$id_};var q="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",n=0,l=function(h){if(this instanceof l)throw new TypeError("Symbol is not a constructor");return new p(q+(h||"")+"_"+n++,h)};return l},"es6","es3"); $jscomp.polyfill("Symbol.iterator",function(t){if(t)return t;t=Symbol("Symbol.iterator");for(var p="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),q=0;q<p.length;q++){var n=$jscomp.global[p[q]];"function"===typeof n&&"function"!=typeof n.prototype[t]&&$jscomp.defineProperty(n.prototype,t,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return t},"es6", "es3");$jscomp.iteratorPrototype=function(t){t={next:t};t[Symbol.iterator]=function(){return this};return t};$jscomp.checkEs6ConformanceViaProxy=function(){try{var t={},p=Object.create(new $jscomp.global.Proxy(t,{get:function(q,n,l){return q==t&&"q"==n&&l==p}}));return!0===p.q}catch(q){return!1}};$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS=!1;$jscomp.ES6_CONFORMANCE=$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS&&$jscomp.checkEs6ConformanceViaProxy(); $jscomp.owns=function(t,p){return Object.prototype.hasOwnProperty.call(t,p)};$jscomp.MapEntry=function(){};$jscomp.underscoreProtoCanBeSet=function(){var t={a:!0},p={};try{return p.__proto__=t,p.a}catch(q){}return!1};$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(t,p){t.__proto__=p;if(t.__proto__!==p)throw new TypeError(t+" is not extensible");return t}:null; $jscomp.assign=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.assign?Object.assign:function(t,p){for(var q=1;q<arguments.length;q++){var n=arguments[q];if(n)for(var l in n)$jscomp.owns(n,l)&&(t[l]=n[l])}return t};$jscomp.polyfill("Array.prototype.fill",function(t){return t?t:function(p,q,n){var l=this.length||0;0>q&&(q=Math.max(0,l+q));if(null==n||n>l)n=l;n=Number(n);0>n&&(n=Math.max(0,l+n));for(q=Number(q||0);q<n;q++)this[q]=p;return this}},"es6","es3"); $jscomp.typedArrayFill=function(t){return t?t:Array.prototype.fill};$jscomp.polyfill("Int8Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint8Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint8ClampedArray.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Int16Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint16Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5"); $jscomp.polyfill("Int32Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Uint32Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Float32Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5");$jscomp.polyfill("Float64Array.prototype.fill",$jscomp.typedArrayFill,"es6","es5"); (function(t){function p(n){if(q[n])return q[n].exports;var l=q[n]={i:n,l:!1,exports:{}};t[n].call(l.exports,l,l.exports,p);l.l=!0;return l.exports}var q={};p.m=t;p.c=q;p.d=function(n,l,h){p.o(n,l)||Object.defineProperty(n,l,{enumerable:!0,get:h})};p.r=function(n){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"});Object.defineProperty(n,"__esModule",{value:!0})};p.t=function(n,l){l&1&&(n=p(n));if(l&8||l&4&&"object"===typeof n&&n&&n.__esModule)return n; var h=Object.create(null);p.r(h);Object.defineProperty(h,"default",{enumerable:!0,value:n});if(l&2&&"string"!=typeof n)for(var c in n)p.d(h,c,function(e){return n[e]}.bind(null,c));return h};p.n=function(n){var l=n&&n.__esModule?function(){return n["default"]}:function(){return n};p.d(l,"a",l);return l};p.o=function(n,l){return Object.prototype.hasOwnProperty.call(n,l)};p.p="/core/contentEdit";return p(p.s=11)})([function(t,p,q){q.d(p,"b",function(){return l});var n=q(8),l;(function(h){h["Set Bold"]= "Set Bold";h["Set Underline"]="Set Underline";h["Set Strike"]="Set Strike";h["Set Font"]="Set Font";h.FontName="FontName";h["Set Font Size"]="Set Font Size";h["Set Text Color"]="Set Text Color";h["Set Italic"]="Set Italic"})(l||(l={}));t=function(){function h(){}h.generateRenderXMLCommand=function(c,e,k,m,u){var w='<Commands>\n\t<Command Name="Render" FileFormat="png">\n\t\t<BBox>\n\t\t\t<Left>'+(c.left+"</Left>\n");w+="\t\t\t<Top>"+c.top+"</Top>\n";w+="\t\t\t<Right>"+c.right+"</Right>\n";w+="\t\t\t<Bottom>"+ c.bottom+"</Bottom>\n\t\t</BBox>\n";w=w+("\t\t<Width>"+e+"</Width>\n\t\t<Height>")+(k+"</Height>\n\t\t<StartPage>1</StartPage>\n");w+="\t\t<EndPage>1</EndPage>\n";w+="\t\t<File>"+m+"</File>\n";u&&(w+="\t\t<ShowInvisibles/>\n");w+="\t</Command>\n";return w+="</Commands>"};h.generateDeleteXMLCommand=function(c,e,k){void 0===k&&(k=1);return'\t<Command Name="Copy Text" OID="'+c+'" Pos="'+e+'" GlyphCount="'+k+'"></Command>\n\t<Command Name="Delete Text" OID="'+(c+'" Pos="'+e+'" GlyphCount="'+k+'"></Command>\n')}; h.generateCopyTextCommandBody=function(c,e){void 0===e&&(e=null);if(e){var k=e.startIndex;return'<Command Name="Copy Text" OID="'+c+'" Pos="'+k+'" GlyphCount="'+(e.endIndex-k)+'"></Command>'}return'<Command Name="Copy Text" OID="'+c+'"></Command>'};h.generateInsertUndoCommand=function(c,e,k){var m=Number.isInteger(e)&&Number.isInteger(k);return'\t<Command Name="Insert Undo" OID="'+c+'"'+(m?' Pos="'+e+'" GlyphCount="'+k+'"':' Pos="1" GlyphCount="9999"')+"></Command>\n"};h.generateInsertTextCommand= function(c,e,k,m){k='\t<Command Name="Insert Text" OID="'+c+'" Pos="'+e+'">\n\t\t<Text>'+(k+"</Text>\n");if(m){var u=m.fontSize&&""!==m.fontSize;m.fontName&&""!==m.fontName&&!0===m.fontNameHasChanged&&(k+="\t\t<FontName>"+m.fontName+"</FontName>\n");u&&(k+="\t\t<FontSize>"+m.fontSize+"</FontSize>\n")}k+="\t</Command>\n";m&&(k+='<Command Name="Set Bold" OID= "'+c+'" Pos="'+e+'">'+m.bold+"</Command>",k+='<Command Name="Set Italic" OID= "'+c+'" Pos="'+e+'">'+m.italic+"</Command>",k+='<Command Name="Set Underline" OID= "'+ c+'" Pos="'+e+'">'+m.underline+"</Command>");m.fontColor&&(k+='<Command Name="Set Text Colour" OID= "'+c+'" Pos="'+e+'">\n <F>\n <RGB>'+Object(n.b)(m.fontColor)+"</RGB>\n </F>\n </Command>");return k};h.generateInsertCharacterCommand=function(c,e,k,m){e=Object(n.a)(e);var u=""+this.generateInsertUndoCommand(c,k,e.length);return u+=this.generateInsertTextCommand(c,k,e,m)};h.generateChangeFontWeightOrDecorationCommand=function(c, e,k,m){var u=m.startIndex,w=m.textLength;return"<Commands>\n "+this.generateCopyTextCommandBody(c,m)+'\n <Command Name="'+e+'" OID="'+c+'" Pos="'+u+'" GlyphCount="'+w+'">'+k+"</Command>\n </Commands>"};h.generateLoadHyperlinkURLCommand=function(c,e){return'<Commands>\n\t<Command Name="Get Hyperlink URL" OID="'+c+'" Pos="'+e.startIndex+'" GlyphCount="'+e.textLength+'" />\n</Commands>'};h.generateSetFontParagraphCommand=function(c,e,k){var m=k.startIndex,u=k.textLength; return"<Commands>\n "+this.generateCopyTextCommandBody(c,k)+'\n <Command Name="Set Font" OID="'+c+'" Pos="'+m+'" GlyphCount="'+u+'">\n <FontName>'+e+"</FontName>\n </Command>\n </Commands>"};h.generateSetFontSizeParagraphCommand=function(c,e,k){var m=k.startIndex,u=k.textLength;return"<Commands>\n "+this.generateCopyTextCommandBody(c,k)+'\n <Command Name="Set Font Size" OID="'+c+'" Pos="'+m+'" GlyphCount="'+ u+'">\n <FontSize>'+e+"</FontSize>\n </Command>\n </Commands>"};h.generateSavePDFCommand=function(c){return'<Command Name="SavePDF">\n <File>'+c+"</File>;\n </Command>"};h.generateSetFontContentBoxCommand=function(c,e,k){return"<Commands>\n "+this.generateCopyTextCommandBody(c)+'\n <Command Name="Set Font" OID="'+c+'">\n <FontName>'+e+"</FontName>\n </Command>\n "+this.generateSavePDFCommand(k)+ "\n </Commands>"};h.generateSetFontSizeContentBoxCommand=function(c,e,k){return"<Commands>\n "+this.generateCopyTextCommandBody(c)+'\n <Command Name="Set Font Size" OID="'+c+'">\n <FontSize>'+e+"</FontSize>\n </Command>\n "+this.generateSavePDFCommand(k)+"\n </Commands>"};h.generateTextAttributesCommand=function(c,e,k,m){var u=m.restrictFontName,w=m.restrictFontSize;m='<Commands><Command Name="Get Text Attributes" OID="'+ (c+'" Pos="'+e+'" GlyphCount="'+k+'">');u||(m+='<Key Name="FontName" />');w||(m+='<Key Name="FontSize" />');return m=m+'<Key Name="Underline" />\n <Key Name="Strike" />\n <Key Name="Bold" />\n <Key Name="Italic" />\n <Key Name="Fill RGB" />\n </Command><Command Name="Get Para Attribs" OID="'+(c+'" Pos="'+e+'" GlyphCount="'+k+'">\n <Key Name="TextAlign" />\n <Key Name="LeadingMode" />\n <Key Name="Leading" />\n </Command><Command Name="Get Text Align" OID="')+ (c+'"></Command></Commands>')};h.generateTextColorCommand=function(c,e,k){var m=k.startIndex,u=k.endIndex-m;k="<Commands>\n\t"+(this.generateCopyTextCommandBody(c,k)+"\n");k+=this.generateInsertUndoCommand(c,m,u);k+='\t<Command Name="Set Text Colour" OID="'+c+'" Pos="'+m+'" GlyphCount="'+u+'">\n';c=Number(e.R.toFixed(3));m=Number(e.G.toFixed(3));e=Number(e.B.toFixed(3));return k+("\t\t<F>\n\t\t\t<RGB>"+c+" "+m+" "+e+" 1.000</RGB>\n\t\t</F>\n\t</Command>\n</Commands>")};h.generateRenderContentBox= function(c){return'<Commands>\n <Command Name="SavePDF">\n <File>'+c+"</File>\n </Command>\n </Commands>"};h.generateAlignParagraphXMLCommand=function(c,e,k,m){var u="<Commands>",w=k.startIndex;k=k.endIndex;u=(w||k?u+('\n\t<Command Name="Set Para Attribs" OID="'+c+'" Pos="'+w+'" GlyphCount="'+(k-w)+'">'):u+('<Command Name="Set Para Attribs" OID="'+c+'">'))+('\n\t\t<Key Name="TextAlign" Type="name">'+e+"</Key>");return u= m?u+('\n\t</Command><Command Name="SavePDF"><File>'+m+"</File></Command>\n</Commands>"):u+"\n\t</Command>\n</Commands>"};h.generateBoldContentBoxXMLCommand=function(c,e){return'<Command Name="Set Bold" OID="'+c+'">'+e+"</Command>"};h.generateItalicContentBoxXMLCommand=function(c,e){return'<Command Name="Set Italic" OID="'+c+'">'+e+"</Command>"};h.generateUnderlineContentBoxXMLCommand=function(c,e){return'<Command Name="Set Underline" OID="'+c+'">'+e+"</Command>"};h.generateStrikeContentBoxXMLCommand= function(c,e){return'<Command Name="Set Strike" OID="'+c+'">'+e+"</Command>"};h.generateColorContentBoxXMLCommand=function(c,e){c='<Command Name="Set Text Colour" OID="'+c+'">';var k=Number(e.R.toFixed(3)),m=Number(e.G.toFixed(3));e=Number(e.B.toFixed(3));return c+("<F><RGB>"+k+" "+m+" "+e+" 1.000</RGB></F></Command>")};h.generateUpdateContentBoxXMLCommand=function(c,e,k){return'<Commands><Command Name="Copy Text" OID="'+c+'"></Command><Command Name="Insert Undo" OID="'+c+'" Pos="" GlyphCount=""></Command>\n '+ e+'<Command Name="SavePDF"><File>'+k+"</File></Command></Commands>"};h.generateTransformTextBoxXMLCommand=function(c,e,k){return'\n <Commands>\n <Command Name="Copy BBox" OID="'+c+'"></Command>\n <Command Name="TransformToRect">\n <OID>'+c+"</OID>\n <Rect>\n <Top>"+e.top+"</Top>\n <Left>"+e.left+"</Left>\n <Bottom>"+e.bottom+"</Bottom>\n <Right>"+e.right+'</Right>\n </Rect>\n </Command>\n <Command Name="Dump Text Box" OID="'+ c+'"></Command>\n <Command Name="SavePDF"><File>'+k+"</File></Command>\n </Commands>"};h.generateUpdateImageCommand=function(c,e,k,m){var u='<Commands><Command Name="Copy BBox" OID="'+(c+'"></Command>');m&&(u=u+('<Command Name="TransformToRect"><OID>'+c+"</OID><Rect><Top>")+(e.top+"</Top><Left>"+e.left+"</Left>"),u+="<Bottom>"+e.bottom+"</Bottom><Right>"+e.right+"</Right></Rect></Command>");return u+('<Command Name="SavePDF">\n <File>'+k+'</File>\n </Command>\n <Command Name="DumpObjectBBox">\n <OID>'+ c+"</OID>\n </Command>\n </Commands>")};h.generateEditXMLCommand=function(c,e,k){for(var m,u="<Commands>\n",w=0;w<e.length;w++){m=e[w];switch(m.name){case "Delete":u+=h.generateDeleteXMLCommand(c,m.index,m.len);break;case "Insert":u+=h.generateInsertCharacterCommand(c,m.data,m.index,k)}m=m.newindex}return{commandStr:u+"</Commands>",newIndex:m}};h.generateGetWebFontsXMLCommand=function(c){return'<Commands><Command Name="Dump Core Fonts"><WebFontURL>'+(c+"</WebFontURL></Command></Commands>")}; h.generateExportPageXMLCommand=function(c,e,k,m,u){c='<Commands><Command Name="LoadPDF"><File>'+(c+'</File></Command><Command Name="Page BBox"><StartPage>1</StartPage><EndPage>1</EndPage></Command>');""!==u&&(c+='<Command Name="AddTableBoxes">'+u+"</Command>");c=c+'<Command Name="Translate Export"><File>'+(k+"</File><TransXML>coreTransXML.cfg</TransXML><StartPage>")+(e+"</StartPage><EndPage>"+e+"</EndPage></Command>");c+='<Command Name="Edit Page">';return c+="<Output>"+m+"</Output><ImagesOnly/></Command></Commands>"}; h.generateInsertHyperlinkCommand=function(c,e,k){return'<Commands>\n <Command Name="Insert Hyperlink" OID="'+c+'" Pos="'+e.startIndex+'" GlyphCount="'+e.textLength+'">\n <URL>'+k+"</URL>\n </Command>\n </Commands>"};h.genCommand=function(c,e,k,m,u){var w={};w.name=c;w.index=e;w.len=k;w.data=m;w.newindex=u;return w};h.generateReplaceContentCommand=function(c,e,k){return'<Commands><Command Name="Delete Text" OID="'+c+'"></Command>'+(this.generateInsertTextWithDocFontCommand(c,null, e)+'<Command Name="SavePDF"><File>'+k+"</File></Command></Commands>")};h.generateTextStyleUndoCommandBody=function(c,e,k,m,u,w){var y="";l[c]&&!w?y+='\t<Command Name="Delete Text" OID="'+e+'" Pos="'+k+'" GlyphCount="'+m+'">\n\t</Command>\n':l[c]&&w&&(y+='\t<Command Name="Delete Text" OID="'+e+'">\n\t</Command>\n');return y+="\t"+this.generateInsertTextWithDocFontCommand(e,k,u)+"\n"};h.generateInsertTextWithDocFontCommand=function(c,e,k){c=Number.isInteger(e)?'<Command Name="Insert Text" OID="'+c+ '" Pos="'+e+'">':'<Command Name="Insert Text" OID="'+c+'" Pos="0">';return c+="<UseDocFont /><HTML>"+k.encodeISXMLCopyTextString()+"</HTML></Command>"};h.generateCheckPageModifiedCommand=function(c){return'<Commands><Command Name="Page Modified" PageNum="'+c+'"></Command></Commands>'};h.generatePasteTextCommand=function(c,e,k){var m=e.startIndex;e=e.textLength;var u=k.htmlFormat;k=k.chars;var w="<Commands>\n";e&&(w+=this.generateDeleteXMLCommand(c,m,e));w+=""+this.generateInsertUndoCommand(c,m,k.length); w+="\t"+this.generateInsertTextWithDocFontCommand(c,m,u)+"\n";return w+"</Commands>"};h.generateCopyTextCommand=function(c,e){void 0===e&&(e=null);return"<Commands>\n "+this.generateCopyTextCommandBody(c,e)+"\n </Commands>\n "};h.generatePlaceImageCommand=function(c,e,k,m){return'<Commands>\n <Command Name="Place Image">\n <File>'+c+"</File>\n <Scale>"+k+"</Scale>\n <Rect>\n <Top>"+ m.top+"</Top>\n <Left>"+m.left+"</Left>\n <Bottom>"+m.bottom+"</Bottom>\n <Right>"+m.right+'</Right>\n </Rect>\n </Command>\n <Command Name="SavePDF">\n <File>'+e+"</File>\n </Command>\n </Commands>"};h.generateGetVersionCommand=function(){return'<Commands><Command Name="Version"/></Commands>'};return h}(); p.a=t},function(t,p,q){q.d(p,"b",function(){return l});q.d(p,"a",function(){return h});var n=q(3),l=function(c,e){Object(n.a)("disableLogs")||(e?console.warn(c+": "+e):console.warn(c))},h=function(c,e){}},function(t,p,q){q.d(p,"a",function(){return N});q.d(p,"b",function(){return H});q.d(p,"c",function(){return f});var n=q(7),l=q(1),h=q(5),c=q(4),e="undefined"===typeof window?self:window,k=e.importScripts,m=!1,u=function(v,x){m||(k(e.basePath+"decode.min.js"),m=!0);v=self.BrotliDecode(Object(c.b)(v)); return x?v:Object(c.a)(v)},w=function(v,x){return Object(n.a)(void 0,void 0,Promise,function(){var A;return Object(n.b)(this,function(F){switch(F.label){case 0:return m?[3,2]:[4,Object(h.a)(self.Core.getWorkerPath()+"external/decode.min.js","Failed to download decode.min.js",window)];case 1:F.sent(),m=!0,F.label=2;case 2:return A=self.BrotliDecode(Object(c.b)(v)),[2,x?A:Object(c.a)(A)]}})})};(function(){function v(){this.remainingDataArrays=[]}v.prototype.processRaw=function(x){return x};v.prototype.processBrotli= function(x){this.remainingDataArrays.push(x);return null};v.prototype.GetNextChunk=function(x){this.decodeFunction||(this.decodeFunction=0===x[0]&&97===x[1]&&115===x[2]&&109===x[3]?this.processRaw:this.processBrotli);return this.decodeFunction(x)};v.prototype.End=function(){if(this.remainingDataArrays.length){for(var x=this.arrays,A=0,F=0;F<x.length;++F)A+=x[F].length;A=new Uint8Array(A);var K=0;for(F=0;F<x.length;++F){var O=x[F];A.set(O,K);K+=O.length}return u(A,!0)}return null};return v})();var y= !1,E=function(v){y||(k(e.basePath+"pako_inflate.min.js"),y=!0);var x=10;if("string"===typeof v){if(v.charCodeAt(3)&8){for(;0!==v.charCodeAt(x);++x);++x}}else if(v[3]&8){for(;0!==v[x];++x);++x}v=Object(c.b)(v);v=v.subarray(x,v.length-8);return e.pako.inflate(v,{windowBits:-15})},z=function(v,x){return x?v:Object(c.a)(v)},C=function(v){var x=!v.shouldOutputArray,A=new XMLHttpRequest;A.open("GET",v.url,v.isAsync);var F=x&&A.overrideMimeType;A.responseType=F?"text":"arraybuffer";F&&A.overrideMimeType("text/plain; charset=x-user-defined"); A.send();var K=function(){var Q=Date.now();var L=F?A.responseText:new Uint8Array(A.response);Object(l.a)("worker","Result length is "+L.length);L.length<v.compressedMaximum?(L=v.decompressFunction(L,v.shouldOutputArray),Object(l.b)("There may be some degradation of performance. Your server has not been configured to serve .gz. and .br. files with the expected Content-Encoding. See https://docs.apryse.com/documentation/web/faq/content-encoding/ for instructions on how to resolve this."),k&&Object(l.a)("worker", "Decompressed length is "+L.length)):x&&(L=Object(c.a)(L));k&&Object(l.a)("worker",v.url+" Decompression took "+(Date.now()-Q));return L};if(v.isAsync)var O=new Promise(function(Q,L){A.onload=function(){200===this.status||0===this.status?Q(K()):L("Download Failed "+v.url)};A.onerror=function(){L("Network error occurred "+v.url)}});else{if(200===A.status||0===A.status)return K();throw Error("Failed to load "+v.url);}return O},N=function(v){var x=v.lastIndexOf("/");-1===x&&(x=0);var A=v.slice(x).replace(".", ".br.");k||(A.endsWith(".js.mem")?A=A.replace(".js.mem",".mem"):A.endsWith(".js")&&(A=A.concat(".mem")));return v.slice(0,x)+A},S=function(v,x){var A=v.lastIndexOf("/");-1===A&&(A=0);var F=v.slice(A).replace(".",".gz.");x.url=v.slice(0,A)+F;x.decompressFunction=E;return C(x)},R=function(v,x){x.url=N(v);x.decompressFunction=k?u:w;return C(x)},G=function(v,x){v.endsWith(".js.mem")?v=v.slice(0,-4):v.endsWith(".mem")&&(v=v.slice(0,-4)+".js.mem");x.url=v;x.decompressFunction=z;return C(x)},M=function(v, x,A,F){return v.catch(function(K){Object(l.b)(K);return F(x,A)})},B=function(v,x,A){var F;if(A.isAsync){var K=x[0](v,A);for(F=1;F<x.length;++F)K=M(K,v,A,x[F]);return K}for(F=0;F<x.length;++F)try{return x[F](v,A)}catch(O){Object(l.b)(O.message)}throw Error("");},f=function(v,x,A,F){return B(v,[S,R,G],{compressedMaximum:x,isAsync:A,shouldOutputArray:F})},H=function(v,x,A,F){return B(v,[R,S,G],{compressedMaximum:x,isAsync:A,shouldOutputArray:F})}},function(t,p,q){q.d(p,"a",function(){return h});q.d(p, "b",function(){return c});var n={},l={flattenedResources:!1,CANVAS_CACHE_SIZE:void 0,maxPagesBefore:void 0,maxPagesAhead:void 0,disableLogs:!1,wvsQueryParameters:{},_trnDebugMode:!1,_logFiltersEnabled:null},h=function(e){return l[e]},c=function(e,k){var m;l[e]=k;null===(m=n[e])||void 0===m?void 0:m.forEach(function(u){u(k)})}},function(t,p,q){q.d(p,"b",function(){return n});q.d(p,"a",function(){return l});var n=function(h){if("string"===typeof h){for(var c=new Uint8Array(h.length),e=h.length,k=0;k< e;k++)c[k]=h.charCodeAt(k);return c}return h},l=function(h){if("string"!==typeof h){for(var c="",e=0,k=h.length,m;e<k;)m=h.subarray(e,e+1024),e+=1024,c+=String.fromCharCode.apply(null,m);return c}return h}},function(t,p,q){function n(h,c,e){return new Promise(function(k){if(!h)return k();var m=e.document.createElement("script");m.type="text/javascript";m.onload=function(){k()};m.onerror=function(){c&&Object(l.b)(c);k()};m.src=h;e.document.getElementsByTagName("head")[0].appendChild(m)})}q.d(p,"a", function(){return n});var l=q(1)},function(t,p,q){function n(e,k,m){function u(E){y=y||Date.now();return E?(Object(l.a)("load","Try instantiateStreaming"),fetch(Object(h.a)(e)).then(function(z){return WebAssembly.instantiateStreaming(z,k)}).catch(function(z){Object(l.a)("load","instantiateStreaming Failed "+e+" message "+z.message);return u(!1)})):Object(h.b)(e,m,!0,!0).then(function(z){w=Date.now();Object(l.a)("load","Request took "+(w-y)+" ms");return WebAssembly.instantiate(z,k)})}var w,y;return u(!!WebAssembly.instantiateStreaming).then(function(E){Object(l.a)("load", "WASM compilation took "+(Date.now()-(w||y))+" ms");return E})}q.d(p,"a",function(){return n});var l=q(1),h=q(2),c=q(5);q.d(p,"b",function(){return c.a})},function(t,p,q){function n(h,c,e,k){function m(u){return u instanceof e?u:new e(function(w){w(u)})}return new (e||(e=Promise))(function(u,w){function y(C){try{z(k.next(C))}catch(N){w(N)}}function E(C){try{z(k["throw"](C))}catch(N){w(N)}}function z(C){C.done?u(C.value):m(C.value).then(y,E)}z((k=k.apply(h,c||[])).next())})}function l(h,c){function e(z){return function(C){return k([z, C])}}function k(z){if(u)throw new TypeError("Generator is already executing.");for(;m;)try{if(u=1,w&&(y=z[0]&2?w["return"]:z[0]?w["throw"]||((y=w["return"])&&y.call(w),0):w.next)&&!(y=y.call(w,z[1])).done)return y;if(w=0,y)z=[z[0]&2,y.value];switch(z[0]){case 0:case 1:y=z;break;case 4:return m.label++,{value:z[1],done:!1};case 5:m.label++;w=z[1];z=[0];continue;case 7:z=m.ops.pop();m.trys.pop();continue;default:if(!(y=m.trys,y=0<y.length&&y[y.length-1])&&(6===z[0]||2===z[0])){m=0;continue}if(3===z[0]&& (!y||z[1]>y[0]&&z[1]<y[3]))m.label=z[1];else if(6===z[0]&&m.label<y[1])m.label=y[1],y=z;else if(y&&m.label<y[2])m.label=y[2],m.ops.push(z);else{y[2]&&m.ops.pop();m.trys.pop();continue}}z=c.call(h,m)}catch(C){z=[6,C],w=0}finally{u=y=0}if(z[0]&5)throw z[1];return{value:z[0]?z[1]:void 0,done:!0}}var m={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},u,w,y,E;return E={next:e(0),"throw":e(1),"return":e(2)},"function"===typeof Symbol&&(E[Symbol.iterator]=function(){return this}), E}q.d(p,"a",function(){return n});q.d(p,"b",function(){return l})},function(t,p,q){function n(h){return h.replace(/\u00a0/g," ").replace(/\n/g,"&#10;").replace(/\r/g,"&#13;").replace(/\f/g,"&#12;")}function l(h){var c=h.slice(1);h=parseInt(c.substr(0,2),16);var e=parseInt(c.substr(2,2),16);c=parseInt(c.substr(4,2),16);return(h/255).toFixed(3)+" "+(e/255).toFixed(3)+" "+(c/255).toFixed(3)+" 1"}q.d(p,"a",function(){return n});q.d(p,"b",function(){return l})},function(t,p,q){q.d(p,"a",function(){return e}); var n=q(2),l=q(6),h=q(10),c=function(){function k(m){var u=this;this.promise=m.then(function(w){u.response=w;u.status=200})}k.prototype.addEventListener=function(m,u){this.promise.then(u)};return k}(),e=function(k,m,u){if(Object(h.a)()&&!u){self.Module.instantiateWasm=function(y,E){return Object(l.a)(k+"Wasm.wasm",y,m["Wasm.wasm"]).then(function(z){E(z.instance)})};if(m.disableObjectURLBlobs){importScripts(k+"Wasm.js");return}u=Object(n.b)(k+"Wasm.js.mem",m["Wasm.js.mem"],!1,!1)}else{if(m.disableObjectURLBlobs){importScripts((self.Module.asmjsPrefix? self.Module.asmjsPrefix:"")+k+".js");return}u=Object(n.b)((self.Module.asmjsPrefix?self.Module.asmjsPrefix:"")+k+".js.mem",m[".js.mem"],!1);var w=Object(n.c)((self.Module.memoryInitializerPrefixURL?self.Module.memoryInitializerPrefixURL:"")+k+".mem",m[".mem"],!0,!0);self.Module.memoryInitializerRequest=new c(w)}u=new Blob([u],{type:"application/javascript"});importScripts(URL.createObjectURL(u))}},function(t,p,q){q.d(p,"a",function(){return E});var n="undefined"===typeof window?self:window;t=function(){var z= navigator.userAgent.toLowerCase();return(z=/(msie) ([\w.]+)/.exec(z)||/(trident)(?:.*? rv:([\w.]+)|)/.exec(z))?parseInt(z[2],10):z}();var l=function(){var z=n.navigator.userAgent.match(/OPR/),C=n.navigator.userAgent.match(/Maxthon/),N=n.navigator.userAgent.match(/Edge/);return n.navigator.userAgent.match(/Chrome\/(.*?) /)&&!z&&!C&&!N}();(function(){if(!l)return null;var z=n.navigator.userAgent.match(/Chrome\/([0-9]+)\./);return z?parseInt(z[1],10):z})();var h=!!navigator.userAgent.match(/Edge/i)|| navigator.userAgent.match(/Edg\/(.*?)/)&&n.navigator.userAgent.match(/Chrome\/(.*?) /);(function(){if(!h)return null;var z=n.navigator.userAgent.match(/Edg\/([0-9]+)\./);return z?parseInt(z[1],10):z})();p=/iPad|iPhone|iPod/.test(n.navigator.platform)||"MacIntel"===navigator.platform&&1<navigator.maxTouchPoints||/iPad|iPhone|iPod/.test(n.navigator.userAgent);var c=function(){var z=n.navigator.userAgent.match(/.*\/([0-9\.]+)\s(Safari|Mobile).*/i);return z?parseFloat(z[1]):z}(),e=/^((?!chrome|android).)*safari/i.test(n.navigator.userAgent)|| /^((?!chrome|android).)*$/.test(n.navigator.userAgent)&&p,k=n.navigator.userAgent.match(/Firefox/);(function(){if(!k)return null;var z=n.navigator.userAgent.match(/Firefox\/([0-9]+)\./);return z?parseInt(z[1],10):z})();t||/Android|webOS|Touch|IEMobile|Silk/i.test(navigator.userAgent);navigator.userAgent.match(/(iPad|iPhone|iPod)/i);n.navigator.userAgent.indexOf("Android");var m=/Mac OS X 10_13_6.*\(KHTML, like Gecko\)$/.test(n.navigator.userAgent),u=n.navigator.userAgent.match(/(iPad|iPhone).+\sOS\s((\d+)(_\d)*)/i)? 14<=parseInt(n.navigator.userAgent.match(/(iPad|iPhone).+\sOS\s((\d+)(_\d)*)/i)[3],10):!1,w=!(!self.WebAssembly||!self.WebAssembly.validate),y=-1<n.navigator.userAgent.indexOf("Edge/16")||-1<n.navigator.userAgent.indexOf("MSAppHost"),E=function(){return w&&!y&&!(!u&&(e&&14>c||m))}},function(t,p,q){t.exports=q(12)},function(t,p,q){q.r(p);(function(n){function l(B,f,H){var v=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;B="<InfixServer>".concat(B,"</InfixServer>");null==v&&(v="importCommand"+ H+".xml");FS.writeFile(v,B);M.ccall("wasmRunXML","number",["string","string"],[v,f]);FS.unlink(v)}function h(B){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:!0,H=FS.readFile(B).buffer;f&&FS.unlink(B);H||console.warn("No buffer results found for: ".concat(B));return H}function c(){1==S?postMessage({cmd:"isReady"}):setTimeout(c,300)}function e(B,f,H,v,x,A,F,K,O){l(A,x,0,F);x=h(x);0==O&&(A=null);postMessage({cmd:"editText",subCmd:f,caretStart:H,caretEnd:v,galleyId:B,commandXML:A,resultsXML:x, pageNumber:K},[x])}function k(B,f,H,v){l(B,H,0,f);f=h(H);v||(B=null);postMessage({cmd:"insertTextBox",commandXML:B,resultsXML:f},[f])}function m(B,f){var H=B.galleyId,v=B.resultsFile,x=B.willTriggerTextContentUpdated,A=B.pageNumber;l(B.commandXML,v,0,B.commandFile);B=h(v);postMessage({pageNumber:A,cmd:f,galleyId:H,resultsXML:B,willTriggerTextContentUpdated:x},[B])}function u(B,f,H,v,x){if(f){H=new Uint8Array(H);f="inputFile"+B+".pdf";FS.writeFile(f,H);v=new Uint8Array(v);var A=(new TextDecoder("utf-8")).decode(v), F="exported"+B+".xml";H="objects"+B+".xml";v="results"+B+".xml";A=C.a.generateExportPageXMLCommand(f,1,F,H,A);l(A,v,1);G=B;x&&(x=h(f,!1),f=h(F),H=h(H),v=h(v),postMessage({cmd:"exportFile",pageNumber:B,exportPerformed:!0,pdfBuffer:x,exportXML:f,objectXML:H,resultsXML:v},[x,f,v]))}else postMessage({cmd:"exportFile",pageNumber:B,exportPerformed:!1})}function w(B){var f=B.pdfFile,H=B.tableData,v=B.subCmd,x=B.pageNumber,A=B.commandXML,F=B.objectID,K=B.isText,O=B.isUpdatingRect,Q=B.oid,L=B.canUndoRedo; B=B.outputFName;x!==G&&u(x,!0,f,H,!1);var T="results"+x+".xml";f=K?"transformTextBox":"transformObject";l(A,T,x);H=h(B);T=h(T);postMessage({cmd:f,pageNumber:x,pdfBuffer:H,resultsXML:T,id:F,isUpdatingRect:O,isText:K,commandXML:A,subCmd:v,canUndoRedo:L,oid:Q,outputFName:B},[H,T])}function y(B,f,H,v,x,A){f!=G&&u(f,!0,B,v,!1);v="outputFile"+f+".pdf";B="results"+f+".xml";x=C.a.generateUpdateContentBoxXMLCommand(H,x,v);l(x,B,f);v=h(v);B=h(B);postMessage({cmd:"updateContentBox",pageNumber:f,pdfBuffer:v, commandXML:x,resultsXML:B,subCmd:A,id:H,galleyId:H},[v,B])}var E=q(9),z=q(2),C=q(0),N="undefined"===typeof window?self:window;N.Core=N.Core||{};var S=!1,R=null,G=-1,M={noInitialRun:!0,onRuntimeInitialized:function(){S=!0},fetchSelf:function(){Object(E.a)("InfixServer",{"Wasm.wasm":1E8,"Wasm.js.mem":1E5,".js.mem":5E6,".mem":3E6},!!navigator.userAgent.match(/Edge/i))},locateFile:function(B){return B},getPreloadedPackage:function(B,f){"InfixServerWasm.br.mem"==B&&(B="InfixServerWasm.mem");return Object(z.b)("".concat(R|| "").concat(B),f,!1,!0).buffer}};self.Module=M;self.basePath="../external/";onmessage=function(B){var f=B.data;switch(f.cmd){case "isReady":R=f.resourcePath;M.fetchSelf();c();break;case "initialiseInfixServer":M.callMain([""]);M.ccall("wasmInitInfixServer","number",["string","string","string"],["infixcore.cfg",null,"results.xml"]);var H=h("results.xml");postMessage({cmd:"initialiseInfixServer",resultsXML:H},[H]);break;case "loadAvailableFonts":var v=C.a.generateGetWebFontsXMLCommand(f.webFontURL); l(v,"results0.xml",0);var x=h("results0.xml");postMessage({cmd:"loadAvailableFonts",resultsXML:x},[x]);break;case "exportFile":u(f.pageNumber,f.performExport,f.pdfFile,f.tableData,!0);break;case "applyTransformMatrix":var A=f.transformMatrix,F=f.objectID,K=f.pageNumber,O=A.m11,Q=A.m12,L=A.m21,T=A.m22,ha=A.e,ma=A.f,a="<Commands><Command Name='Transform'><OID>".concat(F,"</OID><Matrix>").concat(O," ").concat(Q," ").concat(L," ").concat(T," ").concat(ha," ").concat(ma,"</Matrix></Command></Commands>"); l(a,"results"+K+".xml",K);postMessage({cmd:"applyTransformMatrix",pageNumber:K,id:F});break;case "transformObject":w(f);break;case "deleteObject":var b=f.pageNumber,d=f.objectID,g=f.isText,r=f.isUndoRedo,D=f.isPageDeleted;b!=G&&u(b,!0,f.pdfFile,f.tableData,!1);var I="outputFile"+b+".pdf",J="results"+b+".xml",P='<Commands><Command Name="DeleteObject">';P=!0===g?P+"<GID>".concat(d,"</GID></Command>"):P+"<OID>".concat(d,"</OID></Command>");P+='<Command Name="SavePDF"><File>'.concat(I,"</File>");l(P+ "</Command></Commands>",J,b);var U=h(I),ba=h(J);postMessage({cmd:"deleteObject",pageNumber:b,pdfBuffer:U,resultsXML:ba,id:d,isUndoRedo:r,isPageDeleted:D},[U,ba]);break;case "insertTextBox":k(f.commandXML,f.commandFile,f.resultsFile,!0);break;case "insertNewTextBox":var $b=f.pdfFile,V=f.pageNumber,ac=f.topVal,bc=f.leftVal,cc=f.bottomVal,dc=f.rightVal,ec=f.font,fc=f.fontSize,gc=f.importData,hc=f.content,ic=f.canUndoRedo,jc=(new TextEncoder).encode("").buffer;V!=G&&u(V,!0,$b,jc,!1);var va="results"+ V+".xml",wa="exported"+V+".xml",xa="outputFile"+V+".pdf";var W='<Commands><Command Name="Insert Text Box">'+"<Rect><Top>".concat(ac,"</Top><Left>").concat(bc,"</Left>");W+="<Bottom>".concat(cc,"</Bottom><Right>").concat(dc,"</Right></Rect>");W+="<Size>".concat(fc,"</Size><FontName>").concat(ec,"</FontName>");var ya="editText"+V+".xml";FS.writeFile(ya,gc);W+="<File>".concat(ya,"</File><TransXML>coreTransXML.cfg</TransXML>");W+="<ExportFile>".concat(wa,"</ExportFile><TransXML>coreTransXML.cfg</TransXML>"); W=W+'<StartPage>1</StartPage><EndPage>LastPage</EndPage><AutoSubstitute/><AutoDeleteParas/><Fitting><Shrink><FontSize Min="0.65">true</FontSize><Leading>False</Leading></Shrink><Stretch><FontSize>False</FontSize><Leading>False</Leading></Stretch></Fitting><ResetLetterSpacing/><IgnoreFlightCheck/><MissingFont>Noto Sans Regular</MissingFont><SubstituteAllChars/><TargetLang>en</TargetLang></Command>'+'<Command Name="SavePDF"><File>'.concat(xa,"</File></Command></Commands>");l(W,va,V);var za=h(xa),Aa= h(va),Ba=h(wa);postMessage({cmd:"insertNewTextBox",pageNumber:V,pdfBuffer:za,exportXML:Ba,resultsXML:Aa,contentHTML:hc,commandXML:W,canUndoRedo:ic},[za,Ba,Aa]);break;case "AlignContentBox":var ca=f.pageNumber,na=f.galleyId,kc=f.alignment,lc=f.galleyNumericID;ca!=G&&u(ca,!0,f.pdfFile,f.tableData,!1);var Ca="results"+na+".xml",Da="outputFile"+ca+".pdf",Ea=C.a.generateAlignParagraphXMLCommand(na,kc,{},Da);l(Ea,Ca,ca);var Fa=h(Ca),Ga=h(Da);postMessage({cmd:"editText",subCmd:"Set Para Attribs",pageNumber:ca, pdfBuffer:Ga,resultsXML:Fa,id:lc,galleyId:na,commandXML:Ea,commandFile:"importCommand0.xml"},[Ga,Fa]);break;case "RenderContentBox":var X=f.pageNumber,mc=f.galleyId;X!=G&&u(X,!0,f.pdfFile,f.tableData,!1);var Ha="outputFile"+X+".pdf",Ia="results"+X+".xml",nc=C.a.generateRenderContentBox(Ha);l(nc,Ia,X);var Ja=h(Ha),Ka=h(Ia);postMessage({cmd:"renderContentBox",pageNumber:X,pdfBuffer:Ja,resultsXML:Ka,galleyId:mc},[Ja,Ka]);break;case "AlignParagraph":var ia=f.pageNumber,oa=f.galleyId,oc=f.alignment,pa= f.selection;ia!=G&&u(ia,!0,f.pdfFile,f.tableData,!1);var qa="results"+oa+".xml",La=C.a.generateAlignParagraphXMLCommand(oa,oc,pa,"outputFile"+ia+".pdf");l(La,qa,ia);var Ma=h(qa);postMessage({cmd:"editText",subCmd:"Set Para Attribs",galleyId:oa,caretStart:pa.startIndex,caretEnd:pa.endIndex,resultsFile:qa,commandXML:La,commandFile:"importCommand0.xml",resultsXML:Ma},[Ma]);break;case "DecorateContentBox":switch(f.subCmd){case "bold":var pc=f.pdfFile,qc=f.pageNumber,Na=f.galleyId,rc=f.tableData,sc=C.a.generateBoldContentBoxXMLCommand(Na, f.toApply);y(pc,qc,Na,rc,sc,C.b["Set Bold"]);break;case "italic":var tc=f.pdfFile,uc=f.pageNumber,Oa=f.galleyId,vc=f.tableData,wc=C.a.generateItalicContentBoxXMLCommand(Oa,f.toApply);y(tc,uc,Oa,vc,wc,C.b["Set Italic"]);break;case "underline":var xc=f.pdfFile,yc=f.pageNumber,Pa=f.galleyId,zc=f.tableData,Ac=C.a.generateUnderlineContentBoxXMLCommand(Pa,f.toApply);y(xc,yc,Pa,zc,Ac,C.b["Set Underline"]);break;case "strike":var Bc=f.pdfFile,Cc=f.pageNumber,Qa=f.galleyId,Dc=f.tableData,Ec=C.a.generateStrikeContentBoxXMLCommand(Qa, f.toApply);y(Bc,Cc,Qa,Dc,Ec,C.b["Set Strike"]);break;case "colorContentBox":var Fc=f.pdfFile,Gc=f.pageNumber,Ra=f.galleyId,Hc=f.tableData,Ic=C.a.generateColorContentBoxXMLCommand(Ra,f.newColor);y(Fc,Gc,Ra,Hc,Ic,C.b["Set Text Color"])}break;case "insertImage":var Jc=f.pdfFile,Y=f.pageNumber,ra=f.newImage,Kc=f.scaleType,Lc=f.topVal,Mc=f.leftVal,Nc=f.bottomVal,Oc=f.rightVal,Pc=f.canUndoRedo,Qc=(new TextEncoder).encode("").buffer,Rc={top:Lc,left:Mc,bottom:Nc,right:Oc};Y!=G&&u(Y,!0,Jc,Qc,!1);var Sa="outputFile"+ Y+".pdf",Ta="results"+Y+".xml",Ua="imageFile"+String((new Date).getTime());FS.writeFile(Ua,n.from(ra));var Va=C.a.generatePlaceImageCommand(Ua,Sa,Kc,Rc);l(Va,Ta,Y);var Wa=h(Sa),Xa=h(Ta);postMessage({cmd:"insertImage",pageNumber:Y,pdfBuffer:Wa,resultsXML:Xa,commandXML:Va,canUndoRedo:Pc,newImage:ra},[Wa,Xa,ra]);break;case "runCommand":var Sc=f.subCmd,Ya=f.resultsFile;l(f.commandXML,Ya,0,f.commandFile);var Za=h(Ya);postMessage({cmd:"runCommand",subCmd:Sc,resultsXML:Za},[Za]);break;case "renderGalleyArea":var $a= f.resultsFile;l(f.commandXML,$a,0,f.commandFile);var ab=h($a),bb=h(f.imageFName);postMessage({cmd:"renderGalleyArea",resultsXML:ab,imageData:bb,galleyId:f.galleyId,width:f.width,height:f.height,xOffset:f.xOffset,yOffset:f.yOffset,caretPos:f.caretPos},[ab,bb]);break;case "renderEditGalley":var cb=f.resultsFile;l(f.commandXML,cb,0,f.commandFile);var db=h(cb),eb=h(f.imageFName);postMessage({cmd:"renderEditGalley",resultsXML:db,imageData:eb,galleyId:f.galleyId},[db,eb]);break;case "renderFullPage":var fb= f.resultsFile;l(f.commandXML,fb,0,f.commandFile);var gb=h(fb),hb=h(f.imageFName);postMessage({cmd:"renderFullPage",resultsXML:gb,imageData:hb,outputWidth:f.width,outputHeight:f.height},[gb,hb]);break;case "textAttributes":var Tc=f.id,Uc=f.numChars,ib=f.resultsFile;l(f.commandXML,ib,0,f.commandFile);var jb=h(ib);postMessage({cmd:"textAttributes",id:Tc,numChars:Uc,resultsXML:jb},[jb]);break;case "loadSwatchColour":var kb=f.resultsFile;l(f.commandXML,kb,0,f.commandFile);var lb=h(kb);postMessage({cmd:"loadSwatchColour", resultsXML:lb},[lb]);break;case "fittingAttributes":var mb=f.resultsFile;l(f.commandXML,mb,0,f.commandFile);var nb=h(mb);postMessage({cmd:"fittingAttributes",resultsXML:nb},[nb]);break;case "spacingAttributes":var Vc=f.numChars,ob=f.resultsFile;l(f.commandXML,ob,0,f.commandFile);var pb=h(ob);postMessage({cmd:"spacingAttributes",numChars:Vc,resultsXML:pb},[pb]);break;case "indentAttributes":var Wc=f.numChars,qb=f.resultsFile;l(f.commandXML,qb,0,f.commandFile);var rb=h(qb);postMessage({cmd:"indentAttributes", numChars:Wc,resultsXML:rb},[rb]);break;case "editText":e(f.galleyId,f.subCmd,f.caretStart,f.caretEnd,f.resultsFile,f.commandXML,f.commandFile,f.pageNumber,!0);break;case "editObject":var Xc=f.subCmd,Yc=f.oid,sb=f.resultsFile,tb=f.commandXML;l(tb,sb,0,f.commandFile);var ub=h(sb);postMessage({cmd:"editObject",subCmd:Xc,oid:Yc,commandXML:tb,resultsXML:ub},[ub]);break;case "performUndoRedo":switch(f.subCmd){case "editText":e(f.galleyId,f.cmd,f.caretStart,f.caretEnd,f.resultsFile,f.commandXML,f.commandFile, f.pageNumber,!1);break;case "transformObject":f.subCmd="performUndoRedo";w(f);break;case "insertTextBoxRedo":var vb=f.commandXML,da=f.pageNumber,wb="results"+da+".xml",Zc="exported"+da+".xml",$c="outputFile"+da+".pdf";l(vb,wb,da);var xb=h($c),yb=h(wb),zb=h(Zc);postMessage({cmd:"insertNewTextBox",pageNumber:da,pdfBuffer:xb,exportXML:zb,resultsXML:yb,commandXML:vb},[xb,zb,yb]);break;case "insertImageRedo":var Ab=f.commandXML,ea=f.pageNumber,Bb=f.newImage,ad="outputFile"+ea+".pdf",Cb="results"+ea+".xml", Db="imageFile"+ea+".jpg";FS.writeFile(Db,n.from(Bb));l(Ab,Cb,ea);var Eb=h(ad),Fb=h(Cb);FS.unlink(Db);postMessage({cmd:"insertImage",pageNumber:ea,pdfBuffer:Eb,resultsXML:Fb,commandXML:Ab,newImage:Bb},[Eb,Fb])}break;case "insertTextBoxUndo":insertTextBoxUndo(f.galleyId,f.resultsFile,f.commandXML,f.commandFile);break;case "insertTextBoxRedo":k(f.commandXML,f.commandFile,f.resultsFile,!1);break;case "copyText":m(f,"copyText");break;case "getUpdatedText":m(f,"getUpdatedText");break;case "dumpTextBox":var bd= f.galleyId,Gb=f.resultsFile;l(f.commandXML,Gb,0,f.commandFile);var Hb=h(Gb);postMessage({cmd:"dumpTextBox",galleyId:bd,resultsXML:Hb},[Hb]);break;case "transformTextBox":e(f.galleyId,f.cmd,f.caretStart,f.caretEnd,f.resultsFile,f.commandXML,f.commandFile,f.pageNumber,!1);break;case "savePDF":var Ib=f.resultsFile,cd=f.pdfFileName,dd=new Uint8Array(f.pdfFile);FS.writeFile(f.pdfFileName,dd);l(f.commandXML,Ib,0,f.commandFile);var Jb=h(cd),Kb=h(Ib);postMessage({cmd:"savePDF",pdfBuffer:Jb,resultsXML:Kb}, [Jb,Kb]);break;case "loadPDF":var Lb=f.resultsFile,ed=new Uint8Array(f.pdfFile);FS.writeFile(f.pdfFileName,ed);l(f.commandXML,Lb,0,f.commandFile);var Mb=h(Lb);postMessage({cmd:"loadPDF",resultsXML:Mb},[Mb]);break;case "loadHyperlinkURL":var fd=f.id,sa=f.resultsFile;l(f.commandXML,sa,0,f.commandFile);var Nb=FS.readFile(sa).buffer;FS.unlink(sa);postMessage({id:fd,cmd:"loadHyperlinkURL",resultsXML:Nb},[Nb]);break;case "setTypographyContentBox":var Z=f.pageNumber,ja=f.galleyId,aa=f.value;Z!=G&&u(Z,!0, f.pdfFile,f.tableData,!1);var ta="outputFile"+Z+".pdf",Ob="results"+Z+".xml",ka="";aa.style?ka=C.a.generateSetFontContentBoxCommand(ja,aa.style,ta):aa.size&&(ka=C.a.generateSetFontSizeContentBoxCommand(ja,aa.size,ta));var ua;aa.style?ua=C.b["Set Font"]:aa.size&&(ua=C.b["Set Font Size"]);l(ka,Ob,Z);var Pb=h(ta),Qb=h(Ob);postMessage({cmd:"setTypographyContentBox",subCmd:ua,pageNumber:Z,pdfBuffer:Pb,commandXML:ka,resultsXML:Qb,id:ja,galleyId:ja},[Pb,Qb]);break;case "savePDFPage":var la=f.pageNumber, Rb="outputFile"+la+".pdf",Sb="results"+la+".xml",gd='<Commands><Command Name="SavePDF"><File>'.concat(Rb,"</File></Command></Commands>");l(gd,Sb,la);var Tb=h(Rb),hd=h(Sb);postMessage({resultsXML:hd,cmd:"savePDFPage",pageNumber:la,pdfBuffer:Tb},[Tb]);break;case "updateDocumentContent":var fa=f.pageNumber,id=f.galleyId,jd=f.outputFileName,Ub=f.commandXML,kd=f.isSearchReplace,ld=f.callbackMapId,md=f.pdfPage,nd=f.tableArray;fa!=G&&u(fa,!0,md,nd,!1);var Vb="results"+fa+".xml";l(Ub,Vb,fa);var Wb=h(jd), Xb=h(Vb);postMessage({cmd:"updateContentBox",pageNumber:fa,pdfBuffer:Wb,commandXML:Ub,resultsXML:Xb,galleyId:id,callbackMapId:ld,isSearchReplace:kd},[Wb,Xb]);break;case "getInfixVersion":var Yb=C.a.gener