@syncfusion/ej2-vue-treemap 20.1.59 → 20.2.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -14
- package/dist/ej2-vue-treemap.umd.min.js +2 -29
- package/dist/ej2-vue-treemap.umd.min.js.map +1 -1
- package/dist/es6/ej2-vue-treemap.es2015.js +2 -2
- package/dist/es6/ej2-vue-treemap.es2015.js.map +1 -1
- package/dist/es6/ej2-vue-treemap.es5.js +2 -2
- package/dist/es6/ej2-vue-treemap.es5.js.map +1 -1
- package/dist/global/ej2-vue-treemap.min.js +2 -2
- package/package.json +8 -8
- package/src/treemap/treemap.component.js +2 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: ej2-vue-treemap.min.js
|
|
3
|
-
* version : 20.
|
|
3
|
+
* version : 20.2.43
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
|
7
7
|
* licensing@syncfusion.com. Any infringement will be prosecuted under
|
|
8
8
|
* applicable laws.
|
|
9
9
|
*/
|
|
10
|
-
var ej=function(t,e,i){"use strict";function r(t,e){var i=e;return i.unshift(void 0),new(Function.prototype.bind.apply(t,i))}function n(t){var e,i=new Uint16Array(5);(window.msCrypto||window.crypto).getRandomValues(i);var r="ej2"+function(t){for(var e="",i=0;i<5;i++)e+=(i?",":"")+t[i];return e}(i),n=function(i){i.source===window&&"string"==typeof i.data&&i.data.length<=32&&i.data===r&&(t(),e())};return window.addEventListener("message",n,!1),window.postMessage(r,"*"),e=function(){window.removeEventListener("message",n),t=n=r=void 0}}function o(t,e){for(var i=e,r=t.replace(/\[/g,".").replace(/\]/g,"").split("."),n=0;n<r.length&&!p(i);n++)i=i[r[n]];return i}function s(t,e,i){var r,n,o=t.replace(/\[/g,".").replace(/\]/g,"").split("."),s=i||{},a=s,l=o.length;for(r=0;r<l;r++)n=o[r],r+1===l?a[n]=void 0===e?{}:e:c(a[n])&&(a[n]={}),a=a[n];return s}function a(t,e){delete t[e]}function l(t){return!c(t)&&t.constructor==={}.constructor}function h(t,e){if(!c(e))for(var i=t,r=e,n=0,o=Object.keys(e);n<o.length;n++){var s=o[n];c(i.deepMerge)||-1===i.deepMerge.indexOf(s)||!l(r[s])&&!Array.isArray(r[s])?i[s]=r[s]:u(i[s],i[s],r[s],!0)}}function u(t,e,i,r){var n=t&&"object"==typeof t?t:{},o=arguments.length;r&&(o-=1);for(var s=function(t){if(!a[t])return"continue";var e=a[t];Object.keys(e).forEach(function(t){var i,o=n[t],s=e[t],a=Array.isArray(s)&&Array.isArray(o)&&s.length!==o.length,h=!b()||!(o instanceof Event||a);r&&h&&(l(s)||Array.isArray(s))?l(s)?(i=o||{},Array.isArray(i)&&i.hasOwnProperty("isComplexArray")?u(i,{},s,r):n[t]=u(i,{},s,r)):(i=b()?o&&Object.keys(s).length:o||[],n[t]=u([],i,s,r)):n[t]=s})},a=arguments,h=1;h<o;h++)s(h);return n}function c(t){return void 0===t||null===t}function p(t){return void 0===t}function d(t){return t+"_"+Te++}function f(t,e){var i;return function(){var r=this,n=arguments;clearTimeout(i),i=setTimeout(function(){return i=null,t.apply(r,n)},e)}}function g(t,e){var i=t;return i===e||!(i===document||!i)&&g(i.parentNode,e)}function m(t){try{throw new Error(t)}catch(t){throw t.message+"\n"+t.stack}}function y(t,e){var i=document.createElement("div"),r=[].slice.call(document.getElementsByTagName("head")[0].querySelectorAll("base, link, style")),n=[].slice.call(document.getElementsByTagName("body")[0].querySelectorAll("link, style"));if(n.length)for(var o=0,s=n.length;o<s;o++)r.push(n[o]);var a="";c(e)&&(e=window.open("","print","height=452,width=1024,tabbar=no")),i.appendChild(t.cloneNode(!0));var l=0;for(s=r.length;l<s;l++)a+=r[l].outerHTML;e.document.write("<!DOCTYPE html> <html><head>"+a+"</head><body>"+i.innerHTML+"<script> (function() { window.ready = true; })(); <\/script></body></html>"),e.document.close(),e.focus();var h=setInterval(function(){e.ready&&(e.print(),e.close(),clearInterval(h))},500);return e}function b(){return Me}function v(){if("undefined"!=typeof window){var t=new Uint16Array(5);return(window.msCrypto||window.crypto).getRandomValues(t)}}function w(t,e){var i=Pi.test(t)?document.createElementNS("http://www.w3.org/2000/svg",t):document.createElement(t);return void 0===e?i:(i.innerHTML=e.innerHTML?e.innerHTML:"",void 0!==e.className&&(i.className=e.className),void 0!==e.id&&(i.id=e.id),void 0!==e.styles&&i.setAttribute("style",e.styles),void 0!==e.attrs&&T(i,e.attrs),i)}function S(t,e){for(var i=C(e),r=0,n=t;r<n.length;r++)for(var a=n[r],h=0,u=i;h<u.length;h++){var p=u[h];if(l(a)){var d=o("attributes.className",a);c(d)?s("attributes.className",p,a):new RegExp("\\b"+p+"\\b","i").test(d)||s("attributes.className",d+" "+p,a)}else a.classList.contains(p)||a.classList.add(p)}return t}function P(t,e){for(var i=C(e),r=0,n=t;r<n.length;r++){var a=n[r],h=l(a);if(h?o("attributes.className",a):""!==a.className)for(var u=0,c=i;u<c.length;u++){var p=c[u];if(h){var d=o("attributes.className",a).split(" "),f=d.indexOf(p);-1!==f&&d.splice(f,1),s("attributes.className",d.join(" "),a)}else a.classList.remove(p)}}return t}function C(t){var e=[];return"string"==typeof t?e.push(t):e=t,e}function x(t){var e=t;return""===e.style.visibility&&e.offsetWidth>0}function O(t){t.querySelectorAll("script").forEach(function(t){var e=document.createElement("script");e.text=t.innerHTML,document.head.appendChild(e),B(e)})}function B(t){var e=t.parentNode;if(e)return e.removeChild(t)}function L(t){var e=t.parentNode;Si.clearEvents(t),e.removeChild(t)}function T(t,e){for(var i=t,r=0,n=Object.keys(e);r<n.length;r++){var o=n[r];if(l(i)){var s=o;"tabindex"===o&&(s="tabIndex"),i.attributes[s]=e[o]}else i.setAttribute(o,e[o])}return i}function M(t,e,i){return void 0===e&&(e=document),t=k(t),e.querySelector(t)}function D(t,e,i){void 0===e&&(e=document),t=k(t);return e.querySelectorAll(t)}function k(t){var e=/(!|"|\$|%|&|'|\(|\)|\*|\/|:|;|<|=|\?|@|\]|\^|`|{|}|\||\+|~)/g;if(t.match(/#[0-9]/g)||t.match(e)){for(var i=t.split(","),r=0;r<i.length;r++){for(var n=i[r].split(" "),o=0;o<n.length;o++)if(n[o].indexOf("#")>-1&&!n[o].match(/\[.*\]/)){var s=n[o].split("#");if(s[1].match(/^\d/)||s[1].match(e)){var a=n[o].split(".");a[0]=a[0].replace(/#/,"[id='")+"']",n[o]=a.join(".")}}i[r]=n.join(" ")}return i.join(",")}return t}function E(t,e){var i=t;if("function"==typeof i.closest)return i.closest(e);for(;i&&1===i.nodeType;){if(I(i,e))return i;i=i.parentNode}return null}function j(t,e){void 0!==e&&Object.keys(e).forEach(function(i){t.style[i]=e[i]})}function I(t,e){var i=t.matches||t.msMatchesSelector||t.webkitMatchesSelector;return i?i.call(t,e):-1!==[].indexOf.call(document.querySelectorAll(e),t)}function R(t,e){var i,r,n="string"==typeof t?document.getElementById(t):t;for(r=0;r<n.ej2_instances.length;r++)if(i=n.ej2_instances[r],"string"==typeof e){if(e===i.getModuleName())return i}else if(i instanceof e)return i}function A(t,e,i,n){return t.properties.hasOwnProperty(e)&&t.properties[e]instanceof n||(t.properties[e]=r(n,[t,e,i])),t.properties[e]}function N(t,e,i,n,o,s){for(var a=[],l=i?i.length:0,h=0;h<l;h++){var u=n;if(s&&(u=n(i[h],t)),o){var c=r(u,[t,e,{},!0]);c.setProperties(i[h],!0),a.push(c)}else a.push(r(u,[t,e,i[h],!1]))}return a}function F(t,e){return function(){return this.properties.hasOwnProperty(e)||(this.properties[e]=t),this.properties[e]}}function V(t,e,i){return function(){var r=this;if(!this.properties.hasOwnProperty(e)){var n=N(this,e,t,i,!1);this.properties[e]=n}var o=void 0!==this.controlParent&&this.controlParent.ignoreCollectionWatch||this.ignoreCollectionWatch;return this.properties[e].hasOwnProperty("push")||o||["push","pop"].forEach(function(t){var i={value:function(t,e,i,r){return function(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var o=this.propName?this.getParentKey()+"."+e+"-":e+"-";switch(t){case"push":for(var s=0;s<i.length;s++){Array.prototype[t].apply(r,[i[s]]);var a=z(o+(r.length-1),i[s],!this.controlParent,t);this.serverDataBind(a,i[s],!1,t)}break;case"pop":Array.prototype[t].apply(r);var l=z(o+r.length,null,!this.controlParent,t);this.serverDataBind(l,{ejsAction:"pop"},!1,t)}return r}}(t,e,0,r.properties[e]).bind(r),configurable:!0};Object.defineProperty(r.properties[e],t,i)}),this.properties[e].hasOwnProperty("isComplexArray")||Object.defineProperty(this.properties[e],"isComplexArray",{value:!0}),this.properties[e]}}function z(t,e,i,r){var n=t;if(i&&(n={},n[t]=e,e&&"object"==typeof e)){n[t].ejsAction=r}return n}function G(t){return function(e,i){var r={set:function(t,e){return function(i){if(this.properties[e]!==i){var r=this.properties.hasOwnProperty(e)?this.properties[e]:t;this.saveChanges(e,i,r),this.properties[e]=i}}}(t,i),get:F(t,i),enumerable:!0,configurable:!0};Object.defineProperty(e,i,r),q(e,i,"prop",t)}}function _(t,e){return function(i,r){var n={set:function(t,e,i){return function(r){A(this,e,t,i).setProperties(r)}}(t,r,e),get:function(t,e,i){return function(){return A(this,e,t,i)}}(t,r,e),enumerable:!0,configurable:!0};Object.defineProperty(i,r,n),q(i,r,"complexProp",t,e)}}function H(t,e){return function(i,r){var n={set:function(t,e,i){return function(r){this.isComplexArraySetter=!0;var n=N(this,e,t,i,!1),o=N(this,e,r,i,!0);this.isComplexArraySetter=!1,this.saveChanges(e,o,n),this.properties[e]=o}}(t,r,e),get:V(t,r,e),enumerable:!0,configurable:!0};Object.defineProperty(i,r,n),q(i,r,"colProp",t,e)}}function W(){return function(t,e){var i={set:function(t){var i=this.properties[e];if(i!==t){var r=Y(this,e);!1===p(i)&&r.context.removeEventListener(r.prefix,i),r.context.addEventListener(r.prefix,t),this.properties[e]=t}},get:F(void 0,e),enumerable:!0,configurable:!0};Object.defineProperty(t,e,i),q(t,e,"event")}}function U(t){}function q(t,e,i,r,n){p(t.propList)&&(t.propList={props:[],complexProps:[],colProps:[],events:[],propNames:[],complexPropNames:[],colPropNames:[],eventNames:[]}),t.propList[i+"s"].push({propertyName:e,defaultValue:r,type:n}),t.propList[i+"Names"].push(e)}function K(t){if(p(t.prototype.builderObject)){t.prototype.builderObject={properties:{},propCollections:[],add:function(){this.isPropertyArray=!0,this.propCollections.push(u({},this.properties,{}))}};for(var e=/complex/,i=0,r=Object.keys(t.prototype.propList);i<r.length;i++)for(var n=r[i],o=function(i){e.test(n)?t.prototype.builderObject[i.propertyName]=function(t){var e={};h(e,K(i.type)),t(e);var r;return r=e.isPropertyArray?e.propCollections:u({},e.properties,{}),this.properties[i.propertyName]=r,e.properties={},e.propCollections=[],e.isPropertyArray=!1,this}:t.prototype.builderObject[i.propertyName]=function(t){return this.properties[i.propertyName]=t,this}},s=0,a=t.prototype.propList[n];s<a.length;s++){o(a[s])}}return t.prototype.builderObject}function Y(t,e){if(!1===t.hasOwnProperty("parentObj"))return{context:t,prefix:e};var i=o("propName",t);return i&&(e=i+"-"+e),Y(o("parentObj",t),e)}function $(t){var e=t.target,i=this.rippleOptions.selector,r=i?E(e,i):e;if(!(!r||this.rippleOptions&&E(e,this.rippleOptions.ignore))){var n=r.getBoundingClientRect(),o=t.pageX-document.body.scrollLeft,s=t.pageY-(!document.body.scrollTop&&document.documentElement?document.documentElement.scrollTop:document.body.scrollTop),a=Math.max(Math.abs(o-n.left),Math.abs(o-n.right)),l=Math.max(Math.abs(s-n.top),Math.abs(s-n.bottom)),h=Math.sqrt(a*a+l*l),u=2*h+"px",c=o-n.left-h,p=s-n.top-h;this.rippleOptions&&this.rippleOptions.isCenterRipple&&(c=0,p=0,u="100%"),r.classList.add("e-ripple");var d=w("div",{className:"e-ripple-element",styles:"width: "+u+";height: "+u+";left: "+c+"px;top: "+p+"px;transition-duration: "+this.rippleOptions.duration.toString()+"ms;"});r.appendChild(d),window.getComputedStyle(d).getPropertyValue("opacity"),d.style.transform="scale(1)",r!==this.parent&&Si.add(r,"mouseleave",X,{parent:this.parent,rippleOptions:this.rippleOptions})}}function J(t){Q(t,this)}function X(t){Q(t,this)}function Q(t,e){var i=e.rippleOptions.duration,r=t.target,n=e.rippleOptions.selector,o=n?E(r,n):r;if(o&&(!o||-1!==o.className.indexOf("e-ripple"))){var s=D(".e-ripple-element",o),a=s[s.length-1];a&&(a.style.opacity="0.5"),e.parent!==o&&Si.remove(o,"mouseleave",X),setTimeout(function(){a&&a.parentNode&&a.parentNode.removeChild(a),o.getElementsByClassName("e-ripple-element").length||o.classList.remove("e-ripple"),e.done&&e.done(t)},i)}}function Z(t){for(var e="",i=0,r=t;i<r.length;i++){var n=r[i];e+=String.fromCharCode(n)}return e}function tt(t){ji=new Ei(t)}function et(t,e,i){var r='var str="'+function(t,e,i,r){var n=0,o=[],s=t.match(/class="([^"]+|)\s{2}/g),a="";s&&s.forEach(function(e){a=e.replace(/\s\s+/g," "),t=t.replace(e,a)});return t.replace(ar,"").replace(yr,"'$1'").replace(vr,function(t,s,a,l){var h=s.match(fr);if(h){var u=h[1];if(ur.test(s))s='";} '+s.replace(h[1],u.replace(mr,function(t){return t=t.trim(),it(t,!lr.test(t)&&-1===o.indexOf(t),e,o,r)}))+'{ \n str = str + "';else if(hr.test(s))s='"; '+s.replace(h[1],u.replace(br,function(t){return ot(t,e,o,r)}))+'{ \n str = str + "';else if(pr.test(s)){var c=h[1].split(" of ");s='"; '+s.replace(h[1],function(t){return o.push(c[0]),o.push(c[0]+"Index"),"var i"+(n+=1)+"=0; i"+n+" < "+it(c[1],!0,e,o,r)+".length; i"+n+"++"})+"{ \n "+c[0]+"= "+it(c[1],!0,e,o,r)+"[i"+n+"]; \n var "+c[0]+"Index=i"+n+'; \n str = str + "'}else{var p=s.split("("),d=i&&i.hasOwnProperty(p[0])?"this.":"global";d=/\./.test(p[0])?"":d;var f=h[1].split(",");0===h[1].length||/data/.test(f[0])||/window./.test(f[0])||(h[1]="global"===d?e+"."+h[1]:h[1]);if(xr.test(s)&&/\]\./gm.test(s)||/@|\$|#/gm.test(s)){/@|\$|#|\]\./gm.test(s)&&(s='"+ '+("global"===d?"":d)+s.replace(h[1],u.replace(Cr,function(t){return ot(t,e,o,r)}))+'+ "')}else s='" + '+("global"===d?"":d)+s.replace(u,it(h[1].replace(/,( |)data.|,/gi,","+e+".").replace(/,( |)data.window/gi,",window"),"global"!==d,e,o,r))+'+"'}}else cr.test(s)?s='"; '+s.replace(cr,'} else { \n str = str + "'):s.match(dr)?s=s.replace(dr,'"; \n } \n str = str + "'):/@|#|\$/gm.test(s)?(s.match(Sr)&&(s=nt(s)),s='"+'+rt(s,-1===o.indexOf(s),e,o)+'"]+"'):s=s.match(Sr)?'"+'+rt(s=nt(s),-1===o.indexOf(s),e,o)+'"]+"':'"+'+it(s.replace(/,/gi,"+"+e+"."),-1===o.indexOf(s),e,o,r)+'+"';return s})}(t,"data",e,i)+"\";var valueRegEx = (/value=\\'([A-Za-z0-9 _]*)((.)([\\w)(!-;?-■\\s]+)['])/g);\n var hrefRegex = (/(?:href)([\\s='\"./]+)([\\w-./?=&\\\\#\"]+)((.)([\\w)(!-;/?-■\\s]+)['])/g);\n if(str.match(valueRegEx)){\n var check = str.match(valueRegEx);\n var str1 = str;\n for (var i=0; i < check.length; i++) {\n var check1 = str.match(valueRegEx)[i].split('value=')[1];\n var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;\n change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;\n str1 = str1.replace(check1, change);\n }\n str = str.replace(str, str1);\n }\n else if (str.match(/(?:href='')/) === null) {\n if(str.match(hrefRegex)) {\n var check = str.match(hrefRegex);\n var str1 = str;\n for (var i=0; i < check.length; i++) {\n var check1 = str.match(hrefRegex)[i].split('href=')[1];\n if (check1) {\n var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;\n change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;\n str1 = str1.replace(check1, change);\n }\n }\n str = str.replace(str, str1);\n }\n }\n return str;";return new Function("data",r).bind(e)}function it(t,e,i,r,n){return!e||gr.test(t)||-1!==r.indexOf(t.split(".")[0])||n?t:i+"."+t}function rt(t,e,i,r){return e&&!gr.test(t)&&-1===r.indexOf(t.split(".")[0])?i+'["'+t:t}function nt(t){return t=t.match(Pr)?t:t.replace(Sr,"\\\\")}function ot(t,e,i,r){t=t.trim();if(/\window\./gm.test(t))return t;var n=/'|"/gm;return/@|\$|#/gm.test(t)&&(t=rt(t,-1===i.indexOf(t),e,i)+'"]'),wr.test(t)?function(t,e,i,r){return!e||gr.test(t)||-1!==r.indexOf(t.split(".")[0])||/^\..*/gm.test(t)?t:i+"."+t}(t,!n.test(t)&&-1===i.indexOf(t),e,i):it(t,!n.test(t)&&-1===i.indexOf(t),e,i,r)}function st(){return"-"+Math.random().toString(36).substr(2,5)}function at(t,e,i){var r=Tr.compile(t,e,i);return function(t,e,i,n,o,s,a,l){var h=r(t,e,i,a,l),u="BlazorTemplateId";if(b()&&!o){var p=n+st();if(Lr[n]||(Lr[n]=[]),c(s))t[u]=p,Lr[n].push(t);else for(var d=0,f=Object.keys(Lr[n][s]);d<f.length;d++){var g=f[d];g!==u&&t[g]&&(Lr[n][s][g]=t[g]),g===u&&(p=Lr[n][s][g])}return"rowTemplate"===i?[w("tr",{id:p,className:"e-blazor-template"})]:[w("div",{id:p,className:"e-blazor-template"})]}if("string"==typeof h){if(Br.test(h)){return w("svg",{innerHTML:h}).childNodes}return w(Or.test(h)?"table":"div",{innerHTML:h}).childNodes}return h}}function lt(t,e,i,r,n){if(b()){window.sfBlazor.updateTemplate(e,Lr[t],t,i,n),!1!==r&&(Lr[t]=[])}}function ht(t,e,i){var r=document.getElementById(t);if(r)for(var n=r.getElementsByClassName("blazor-inner-template"),o=0;o<n.length;o++){var s=" ";s=c(i)?n[o].getAttribute("data-templateId"):n[i].getAttribute("data-templateId");var a=document.getElementById(s);if(a)for(var l=a.childNodes.length,h=0;h<l;h++)c(i)?n[o].appendChild(a.childNodes[0]):(n[i].appendChild(a.childNodes[0]),o=n.length)}}function ut(t){Tr.compile=t.compile}function ct(){return Tr.compile}function pt(t,e){function i(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function dt(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s}function ft(t,e){var i=t||"",r=document.getElementById("chartmeasuretext");if(null===r&&(r=w("text",{id:"chartmeasuretext"}),document.body.appendChild(r)),"string"==typeof t&&(t.indexOf("<")>-1||t.indexOf(">")>-1)){for(var n=t.split(" "),o=0;o<n.length;o++)-1===n[o].indexOf("<br/>")&&(n[o]=n[o].replace(/[<>]/g,"&"));t=n.join(" ")}return r.innerHTML=i.indexOf("<br>")>-1||i.indexOf("<br/>")>-1?i:t,r.style.position="fixed",r.style.fontSize=e.size,r.style.fontWeight=e.fontWeight,r.style.fontStyle=e.fontStyle,r.style.fontFamily=e.fontFamily,r.style.visibility="hidden",r.style.top="-100",r.style.left="0",r.style.whiteSpace="nowrap",r.style.lineHeight="normal",new Ar(r.clientWidth,r.clientHeight)}function gt(t,e,i,r,n){return void 0===r&&(r=0),void 0===n&&(n=0),t>=i.x-r&&t<=i.x+i.width+r&&e>=i.y-n&&e<=i.y+i.height+n}function mt(t){return document.getElementById(t)}function yt(t){var e=mt(t);e&&L(e)}function bt(t,e,i,r,n,o){var s=new Ir(""),a=function(t,e,i,r,n){var o,s="Path",a=e.width,l=e.height,u=t.x,c=t.y,p=t.x+-a/2,d=t.y+-l/2;switch(i){case"Circle":case"Bubble":s="Ellipse",h(r,{rx:a/2,ry:l/2,cx:u,cy:c});break;case"Cross":h(r,{d:o="M "+p+" "+c+" L "+(u+a/2)+" "+c+" M "+u+" "+(c+l/2)+" L "+u+" "+(c+-l/2)});break;case"HorizontalLine":h(r,{d:o="M "+p+" "+c+" L "+(u+a/2)+" "+c});break;case"VerticalLine":h(r,{d:o="M "+u+" "+(c+l/2)+" L "+u+" "+(c+-l/2)});break;case"Diamond":h(r,{d:o="M "+p+" "+c+" L "+u+" "+(c+-l/2)+" L "+(u+a/2)+" "+c+" L "+u+" "+(c+l/2)+" L "+p+" "+c+" z"});break;case"Rectangle":h(r,{d:o="M "+p+" "+(c+-l/2)+" L "+(u+a/2)+" "+(c+-l/2)+" L "+(u+a/2)+" "+(c+l/2)+" L "+p+" "+(c+l/2)+" L "+p+" "+(c+-l/2)+" z"});break;case"Triangle":h(r,{d:o="M "+p+" "+(c+l/2)+" L "+u+" "+(c+-l/2)+" L "+(u+a/2)+" "+(c+l/2)+" L "+p+" "+(c+l/2)+" z"});break;case"InvertedTriangle":h(r,{d:o="M "+(u+a/2)+" "+(c-l/2)+" L "+u+" "+(c+l/2)+" L "+(u-a/2)+" "+(c-l/2)+" L "+(u+a/2)+" "+(c-l/2)+" z"});break;case"Pentagon":for(var f=void 0,g=void 0,m=0;m<=5;m++)f=a/2*Math.cos(Math.PI/180*(72*m)),g=l/2*Math.sin(Math.PI/180*(72*m)),o=0===m?"M "+(u+f)+" "+(c+g)+" ":o.concat("L "+(u+f)+" "+(c+g)+" ");o=o.concat("Z"),h(r,{d:o});break;case"Image":s="Image",h(r,{href:n,height:l,width:a,x:p,y:d})}return{renderOption:r,functionName:s}}(t,i,e,n,r),l=s["draw"+a.functionName](a.renderOption);return l.setAttribute("aria-label",o),l}function vt(t,e){return null!==t&&void 0!==t?-1!==t.indexOf("%")?e/100*parseInt(t,10):parseInt(t,10):null}function wt(t,e){var i=document.getElementById("treeMapMeasureText");return null===i&&(i=w("text",{id:"treeMapMeasureText"}),document.body.appendChild(i)),i.innerHTML=t,i.style.position="absolute",i.style.fontSize=e.size,i.style.fontWeight=e.fontWeight,i.style.fontStyle=e.fontStyle,i.style.fontFamily=e.fontFamily,i.style.visibility="hidden",i.style.top="-100",i.style.left="0",i.style.whiteSpace="nowrap",i.style.lineHeight="normal",new xn(i.clientWidth,i.clientHeight)}function St(t,e,i){var r=e,n=wt(e,i).width;if(n>t)for(var o=e.length-1;o>=0;--o)if(r=e.substring(0,o)+"...",(n=wt(r,i).width)<=t||r.length<4)return r.length<4&&(r=" "),r;return r}function Pt(t,e,i,r){var n;switch(e){case"Near":n=t.x;break;case"Center":n="title"===r?t.width/2-i.width/2:t.x+t.width/2-i.width/2;break;case"Far":n="title"===r?t.width-t.y-i.width:t.x+t.width-i.width}var o="title"===r?t.y+i.height/2:t.y+t.height/2+i.height/2;return new Mn(n,o)}function Ct(t,e,i){var r=t.createText(e,i);return r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.style["user-select"]="none",r.style["-moz-user-select"]="none",r.style["-webkit-touch-callout"]="none",r.style["-webkit-user-select"]="none",r.style["-khtml-user-select"]="none",r.style["-ms-user-select"]="none",r.style["-o-user-select"]="none",r}function xt(t,e,i,r,n){void 0===n&&(n=!1);var o,s,a,l={"font-size":e.size,"font-style":e.fontStyle,"font-family":e.fontFamily,"font-weight":e.fontWeight,"text-anchor":t.anchor,transform:t.transform,opacity:e.opacity,"dominant-baseline":t.baseLine,id:t.id,x:t.x,y:t.y,fill:i},h="string"==typeof t.text?t.text:n?t.text[t.text.length-1]:t.text[0],u=new Ir("");if(!c(h)&&!c(t.connectorText)&&h.search(t.connectorText[1])>=0)for(var p=h.split("#"),d=0;d<p.length;d++){var f=-1===p[d].search(t.connectorText)||c(t.connectorText)?p[d]:t.connectorText;if(l.id=t.id+"_"+d,a=Ct(u,l,f),d%2==0&&0!==d){f=f.replace(/\s+/g," ")}var g=wt(f,e);l.x=0!==d?l.x+g.width:l.x+g.width+5,r.appendChild(a)}else a=Ct(u,l,h),r.appendChild(a);if("string"!=typeof t.text&&t.text.length>1){for(var m=1,y=t.text.length;m<y;m++)s=wt(t.text[m],e).height,o=u.createTSpan({x:t.x,id:t.id,y:t.y+m*s},t.text[m]),a.appendChild(o);r.appendChild(a)}return a}function Ot(t,e,i){var r,n=t.split("_RectPath")[0];c(r=t.indexOf("_LabelTemplate")>-1?e:document.querySelector("#"+n+"_LabelTemplate"))||(r.innerHTML=i)}function Bt(t){return document.getElementById(t)}function Lt(t,e){return t.weight===e.weight?0:t.weight<e.weight?1:-1}function Tt(t,e,i,r){for(var n=!1,o="",s=r.leafItemSettings,a=0;a<t.length;a++){var l=i[r.levels[a]?r.levels[a].groupPath:s.labelPath?s.labelPath:r.weightValuePath]||"undefined";if(t[a]===l&&(o+=l+(a===t.length-1?"":"#"))===e){n=!0;break}}return n}function Mt(t){var e;if(t){var i=Object.keys(t);e={};for(var r=0;r<i.length;r++)if(t[i[r]]instanceof Array){e.values=t[i[r]],e.key=i[r];break}}return e}function Dt(t,e,i,r){if("Child"===i){e.push(t.levelOrderName);var n=Mt(t).values;if(n&&n.length>0){for(var o=0;o<n.length;o++)-1===e.indexOf(n[o].levelOrderName)&&e.push(n[o].levelOrderName);for(var s=0;s<n.length;s++)Dt(n[s],e,i,r)}}else if("Parent"===i)"string"==typeof t.levelOrderName&&-1===e.indexOf(t.levelOrderName)&&(e.push(t.levelOrderName),Dt(t.parent,e,i,r));else if("All"===i){var a=t.levelOrderName.split("#")[0],l=void 0;for(o=0;o<r.layout.renderItems.length;o++)(l=r.layout.renderItems[o]).levelOrderName.indexOf(a)>-1&&-1===e.indexOf(l.levelOrderName)&&e.push(l.levelOrderName)}else e.push(t.levelOrderName);return e}function kt(t){var e=null;try{document.querySelectorAll(t).length&&(e=at(document.querySelector(t).innerHTML.trim()))}catch(i){e=at(t)}return e}function Et(t,e,i){for(var r=w("div",{id:e,styles:"position: absolute;pointer-events: auto;"}),n=t.length;n>0;)r.appendChild(t[0]),n--;for(var o=r.innerHTML,s=Object.keys(i),a=0;a<s.length;a++)o=o.replace(new RegExp("{{:"+s[a]+"}}","g"),i[s[a].toString()]);return r.innerHTML=o,r}function jt(t,e,i,r,n){var o=new Mn(0,0),s=(n.element.getBoundingClientRect(),"Template"===r?n.areaRect.x:0),a="Template"===r?n.areaRect.y:0;return o.x=Math.abs(s-(e.indexOf("Left")>-1?t.x+5:e.indexOf("Right")>-1?t.x+t.width-i.width:t.x+(t.width/2-i.width/2)))-2,!n.enableDrillDown||"BottomLeftTopRight"!==n.renderDirection&&"BottomRightTopLeft"!==n.renderDirection?o.y=Math.abs(a-(e.indexOf("Top")>-1?"Template"===r?t.y:t.y+i.height:e.indexOf("Bottom")>-1?t.y+t.height-i.height:"Template"===r?t.y+(t.height/2-i.height/2):t.y+t.height/2+i.height/4)):o.y=Math.abs(t.y+t.height-i.height+5),o}function It(t,e){var i=new xn(0,0);e.appendChild(t),i.height=t.offsetHeight,i.width=t.offsetWidth;var r=document.getElementById(t.id);return r.parentNode.removeChild(r),i}function Rt(t){return(t.width-t.x)*(t.height-t.y)}function At(t){var e=Nt(t),i=e.width,r=e.height;return Math.min(i,r)}function Nt(t){var e=t.x,i=t.y;return{x:e,y:i,width:t.width-e,height:t.height-i}}function Ft(t){var e=t.x,i=t.y;return{x:e,y:i,width:e+t.width,height:i+t.height}}function Vt(t,e,i){var r=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,o=i.ownerDocument.defaultView.pageYOffset,s=i.ownerDocument.documentElement.clientTop,a=i.ownerDocument.documentElement.clientLeft,l=r.left+n-a,h=r.top+o-s;return new Mn(t-l,e-h)}function zt(t,e,i,r){var n,o,s=[];if(c(e)&&c(i)&&isNaN(i))return null;for(var a=0;a<t.length;a++){var l=!1,h=i;c(t[a].from)||c(t[a].to)||c(t[a].value)?(c(t[a].from)||c(t[a].to))&&c(t[a].value)||(i>=t[a].from&&t[a].to>=i||t[a].value===e)&&(t[a].value===e&&(l=!0),n="[object Array]"===Object.prototype.toString.call(t[a].color)?l?t[a].color[0]:_t(t[a],h):t[a].color):i>=t[a].from&&t[a].to>=i&&t[a].value===e&&(l=!0,n="[object Array]"===Object.prototype.toString.call(t[a].color)?l?t[a].color[0]:_t(t[a],h):t[a].color),(i>=t[a].from&&i<=t[a].to||t[a].value===e)&&!c(t[a].minOpacity)&&!c(t[a].maxOpacity)&&n&&(o=Gt(r,t[a],n,i)),(""===n||c(n))&&c(t[a].from)&&c(t[a].to)&&c(t[a].minOpacity)&&c(t[a].maxOpacity)&&c(t[a].value)&&(n="[object Array]"===Object.prototype.toString.call(t[a].color)?t[a].color[0]:t[a].color),o=c(o)?"1":o,s.push(n)}for(var u=s.length-1;u>=0;u--)u=(n=s[u])?-1:u;return{fill:n,opacity:o}}function Gt(t,e,i,r){var n=1;if(r>=e.from&&r<=e.to){n=(r-e.from)/(e.to-e.from)*(e.maxOpacity-e.minOpacity)+e.minOpacity}return n.toString()}function _t(t,e){return Wt(t,e)}function Ht(t,e,i){return"#"+oe(t)+oe(e)+oe(i)}function Wt(t,e){var i;return Number(e)===t.from?t.color[0]:Number(e)===t.to?t.color[t.color.length-1]:Ht((i=Ut(Number(e),t)).r,i.g,i.b)}function Ut(t,e){var i=e.from,r=e.to,n=0,o=r-i;n=(t-i)/o;var s,a;if(e.color.length<=2)s="#"===e.color[0].charAt(0)?e.color[0]:ae(e.color[0]),a="#"===e.color[e.color.length-1].charAt(0)?e.color[e.color.length-1]:ae(e.color[e.color.length-1]);else{s="#"===e.color[0].charAt(0)?e.color[0]:ae(e.color[0]),a="#"===e.color[e.color.length-1].charAt(0)?e.color[e.color.length-1]:ae(e.color[e.color.length-1]);for(var l=o/(e.color.length-1),h=e.color.length-1,u=[],c={},p=1;p<h;p++)c={b:i+p*l,color:e.color[p]},u.push(c);for(var d=0;d<u.length;d++)i<=t&&t<=u[d].b&&0===d?(a="#"===u[d].color.charAt(0)?u[d].color:ae(u[d].color),n=t<u[d].b?1-Math.abs((t-u[d].b)/l):(t-u[d].b)/l):u[d].b<=t&&t<=r&&d===u.length-1&&(s="#"===u[d].color.charAt(0)?u[d].color:ae(u[d].color),n=t<u[d].b?1-Math.abs((t-u[d].b)/l):(t-u[d].b)/l),d!==u.length-1&&d<u.length&&u[d].b<=t&&t<=u[d+1].b&&(s="#"===u[d].color.charAt(0)?u[d].color:ae(u[d].color),a="#"===u[d+1].color.charAt(0)?u[d+1].color:ae(u[d+1].color),n=Math.abs(t-u[d+1].b)/l)}return qt(n,s,a)}function qt(t,e,i){var r=i.split("#")[1],n=e.split("#")[1],o=Kt(t,parseInt(n.substr(0,2),16),parseInt(r.substr(0,2),16)),s=Kt(t,parseInt(n.substr(2,2),16),parseInt(r.substr(2,2),16)),a=Kt(t,parseInt(n.substr(4,2),16),parseInt(r.substr(4,2),16));return new Dn(o,s,a)}function Kt(t,e,i){var r=i-e;return Math.round(e+r*t)}function Yt(t,e,i){for(var r,n=e.split(" "),o="",s=[],a=0,l=n.length;a<l;a++)r=n[a],wt(o.concat(r),i).width<t?o=o.concat((""===o?"":" ")+r):""!==o?(s.push(St(t,o,i)),o=r):(s.push(St(t,r,i)),r=""),o&&a===l-1&&s.push(St(t,o,i));return s}function $t(t,e,i){var r=[],n=0,o=wt(e,i).width,s=e.length;if(t>=o)return r.push(e),r;for(var a=e.length;a>n;a--){var l=e.slice(n,a);if((o=wt(l,i).width)<=t){if(r.push(l),n+=l.length,s===n)return r;a=s+1}}return r}function Jt(t,e,i,r){var n=wt(i,r);return n.width>t||n.height>e?" ":i}function Xt(t,e){return t.itemArea===e.itemArea?0:t.itemArea<e.itemArea?1:-1}function Qt(t,e,i){var r=t.levelSelection;if(r)for(var n=0;n<r.length;n++)e.getAttribute("id")===r[n]?e.childElementCount>0&&(e.children[0].setAttribute("class",i),ee(e.childNodes[0],{border:t.selectionSettings.border,fill:t.selectionSettings.fill,opacity:t.selectionSettings.opacity})):e.setAttribute("class","")}function Zt(t,e){var i=t.legendId;if(i)for(var r=0;r<i.length;r++)for(var n=0;n<e.childElementCount;n++)e.childNodes[n].id===i[r]&&(e.childNodes[n].setAttribute("fill",t.selectionSettings.fill),e.childNodes[n].setAttribute("stroke",t.selectionSettings.border.color),e.childNodes[n].setAttribute("stroke-width",t.selectionSettings.border.width.toString()),e.childNodes[n].setAttribute("opacity",t.selectionSettings.opacity))}function te(t,e,i){for(var r,n=0;n<t.length;n++)ee(r=c(t[n].childNodes[0])?t[n]:t[n].childNodes[0],i.layout.renderItems[parseFloat(r.id.split("_Item_Index_")[1])].options),t[n].classList.remove(e),n-=1}function ee(t,e){t.setAttribute("opacity",e.opacity),c(e.fill)||t.setAttribute("fill",e.fill),t.setAttribute("stroke",e.border.color),t.setAttribute("stroke-width",e.border.width)}function ie(t,e,i){if(c(t))return null;for(var r=0,n=Object.keys(e);r<n.length;r++){var o=n[r];t=t.split("${"+o+"}").join(re(e[o],i).toString())}return t}function re(t,e){return(e.format&&!isNaN(Number(t))?e.intl.getNumberFormat({format:e.format,useGrouping:e.useGroupingSeparator})(Number(t)):t)||""}function ne(t){return"#"+oe(t.r)+oe(t.g)+oe(t.b)}function oe(t){var e=t.toString(16);return 1===e.length?"0"+e:e}function se(t){var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?new Dn(parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)):new Dn(255,255,255)}function ae(t){t="transparent"===t?"white":t;var e=document.getElementById("treeMapMeasureText");e.style.color=t,t=window.getComputedStyle(e).color;var i=/^(rgb|hsl)(a?)[(]\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*(?:,\s*([\d.]+)\s*)?[)]$/.exec(t);return ne(new Dn(parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)))}function le(t,e,i,r,n,o){var s=new Ir(""),a=he(t,i,e,n,r),l=s["draw"+a.functionName](a.renderOption);return l.setAttribute("aria-label",o),l}function he(t,e,i,r,n){var o,s="Path",a=e.width,l=e.height,u=t.x,c=t.y,p=t.x+-a/2,d=t.y+-l/2;switch(i){case"Circle":case"Bubble":s="Ellipse",h(r,{rx:a/2,ry:l/2,cx:u,cy:c});break;case"VerticalLine":h(r,{d:o="M "+u+" "+(c+l/2)+" L "+u+" "+(c+-l/2)});break;case"Diamond":h(r,{d:o="M "+p+" "+c+" L "+u+" "+(c+-l/2)+" L "+(u+a/2)+" "+c+" L "+u+" "+(c+l/2)+" L "+p+" "+c+" z"});break;case"Rectangle":h(r,{d:o="M "+p+" "+(c+-l/2)+" L "+(u+a/2)+" "+(c+-l/2)+" L "+(u+a/2)+" "+(c+l/2)+" L "+p+" "+(c+l/2)+" L "+p+" "+(c+-l/2)+" z"});break;case"Triangle":h(r,{d:o="M "+p+" "+(c+l/2)+" L "+u+" "+(c+-l/2)+" L "+(u+a/2)+" "+(c+l/2)+" L "+p+" "+(c+l/2)+" z"});break;case"InvertedTriangle":h(r,{d:o="M "+(u+a/2)+" "+(c-l/2)+" L "+u+" "+(c+l/2)+" L "+(u-a/2)+" "+(c-l/2)+" L "+(u+a/2)+" "+(c-l/2)+" z"});break;case"Pentagon":for(var f=void 0,g=void 0,m=0;m<=5;m++)f=a/2*Math.cos(Math.PI/180*(72*m)),g=a/2*Math.sin(Math.PI/180*(72*m)),o=0===m?"M "+(u+f)+" "+(c+g)+" ":o.concat("L "+(u+f)+" "+(c+g)+" ");h(r,{d:o=o.concat("Z")});break;case"Star":h(r,{d:o="M "+(t.x+e.width/3)+" "+(t.y-e.height/2)+" L "+(t.x-e.width/2)+" "+(t.y+e.height/6)+" L "+(t.x+e.width/2)+" "+(t.y+e.height/6)+" L "+(t.x-e.width/3)+" "+(t.y-e.height/2)+" L "+t.x+" "+(t.y+e.height/2)+" L "+(t.x+e.width/3)+" "+(t.y-e.height/2)+" Z"});break;case"Cross":h(r,{d:o="M "+p+" "+c+" L "+(u+a/2)+" "+c+" M "+u+" "+(c+l/2)+" L "+u+" "+(c+-l/2)});break;case"Image":s="Image",h(r,{href:n,height:l,width:a,x:p,y:d})}return{renderOption:r,functionName:s}}function ue(t,e){for(var i=!1,r=0;r<t.length;r++)if(e.levelOrderName===t[r].levelOrderName){i=!0;break}return i}function ce(t,e){if(t.length>0)for(var i=0;i<t.length;i++){var r=t[i];de(r.legendEle,r.oldFill,r.oldOpacity,r.oldBorderColor,r.oldBorderWidth)}}function pe(t,e){if(t.length>0)for(var i=0;i<t.length;i++){var r=t[i];de(r.legendEle,r.oldFill,r.oldOpacity,r.oldBorderColor,r.oldBorderWidth);for(var n=r.ShapeCollection.Elements.length,o=0;o<n;o++)de(r.ShapeCollection.Elements[o],r.shapeOldFill,r.shapeOldOpacity,r.shapeOldBorderColor,r.shapeOldBorderWidth)}}function de(t,e,i,r,n){t.setAttribute("fill",e),t.setAttribute("opacity",i),t.setAttribute("stroke",r),t.setAttribute("stroke-width",n)}function fe(t,e,i){ce(t),te(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",i)}function ge(t,e,i){for(var r,n=0;n<t;n++)for(var o=i.treeMapLegendModule.legendCollections[n].legendData.length,s=0;s<o;s++)if(i.treeMapLegendModule.legendCollections[n].legendData[s].levelOrderName===e.levelOrderName){r=n;break}return r}function me(t,e,i,r,n,o,s){t.push({legendEle:r,oldFill:s[e].legendFill,oldOpacity:s[e].opacity,oldBorderColor:s[e].borderColor,oldBorderWidth:s[e].borderWidth,shapeElement:n,shapeOldFill:o[i].options.fill,shapeOldOpacity:o[i].options.opacity,shapeOldBorderColor:o[i].options.border.color,shapeOldBorderWidth:o[i].options.border.width})}function ye(t,e,i,r){w("a",{attrs:{download:t+"."+e.toLocaleLowerCase(),href:i}}).dispatchEvent(new MouseEvent(r?"click":"move",{view:window,bubbles:!1,cancelable:!0}))}function be(t){var e=document.getElementById(t);return e?L(e):null}function ve(t){var e,i;switch(t.toLowerCase()){case"materialdark":i="#303030";break;case"fabricdark":i="#201F1F";break;case"bootstrapdark":i="#1A1A1A"}switch(t.toLowerCase()){case"bootstrapdark":case"fabricdark":case"materialdark":e={backgroundColor:i,titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",legendTitleColor:"#DADADA",legendTextColor:"#DADADA",fontFamily:"Roboto, Noto, Sans-serif"};break;case"highcontrast":e={backgroundColor:"#000000",titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontFamily:"Roboto, Noto, Sans-serif"};break;case"bootstrap4":e={backgroundColor:"#FFFFFF",titleFontColor:"#212529",subTitleFontColor:"#212529",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFillOpacity:1,tooltipTextOpacity:.9,legendTitleColor:"#212529",legendTextColor:"#212529",fontFamily:"HelveticaNeue-Medium",fontSize:"16px",legendFontSize:"14px",labelFontFamily:"HelveticaNeue"};break;case"tailwind":e={backgroundColor:"transparent",titleFontColor:"#374151",subTitleFontColor:"#374151",tooltipFillColor:"#111827",tooltipFontColor:"#F9FAFB",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#374151",legendTextColor:"#374151",fontFamily:"Inter",fontSize:"14px",legendFontSize:"12px",labelFontFamily:"Inter"};break;case"tailwinddark":e={backgroundColor:"transparent",titleFontColor:"#D1D5DB",subTitleFontColor:"#D1D5DB",tooltipFillColor:"#F9FAFB",tooltipFontColor:"#1F2937",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#D1D5DB",legendTextColor:"#D1D5DB",fontFamily:"Inter",fontSize:"14px",legendFontSize:"12px",labelFontFamily:"Inter"};break;case"bootstrap5":e={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#212529",subTitleFontColor:"#212529",tooltipFillColor:"#212529",tooltipFontColor:"#F9FAFB",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#212529",legendTextColor:"#212529",fontFamily:"Helvetica Neue",fontSize:"14px",legendFontSize:"12px",labelFontFamily:"Helvetica Neue"};break;case"bootstrap5dark":e={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#E9ECEF",tooltipFontColor:"#212529",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontFamily:"Helvetica Neue",fontSize:"14px",legendFontSize:"12px",labelFontFamily:"Helvetica Neue"};break;case"fluent":e={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#201F1E",subTitleFontColor:"#201F1E",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#323130",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#201F1E",legendTextColor:"#201F1E",fontFamily:"Segoe UI",fontSize:"14px",legendFontSize:"12px",labelFontFamily:"Segoe UI"};break;case"fluentdark":e={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#F3F2F1",subTitleFontColor:"#F3F2F1",tooltipFillColor:"#252423",tooltipFontColor:"#F3F2F1",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#F3F2F1",legendTextColor:"#F3F2F1",fontFamily:"Segoe UI",fontSize:"14px",legendFontSize:"12px",labelFontFamily:"Segoe UI"};break;default:e={backgroundColor:"#FFFFFF",titleFontColor:"#424242",subTitleFontColor:"#424242",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",legendTitleColor:"#353535",legendTextColor:"#353535",fontFamily:"Roboto, Noto, Sans-serif"}}return e}function we(t,e){if(null===t||void 0===t)throw new Error("ArgumentException: "+e+" cannot be null or undefined")}function Se(t,e){if(e)return function(e){return function(t,e){void 0===e&&(e={});e.name=e.name||t._componentTag||t.name;var i=t.prototype;if(e.props)for(var r=function(t){(e.props||(e.props={}))[t]={},(e.watch||(e.watch={}))[t]=function(i){this.ej2Instances[t]=i,this.dataBind&&"DateRangePickerComponent"!==e.name&&this.dataBind()}},n=0,o=e.props;n<o.length;n++){var s=o[n];r(s)}Object.getOwnPropertyNames(i).forEach(function(t){if("constructor"!==t)if(bu.indexOf(t)>-1)e[t]=i[t];else{var r=Object.getOwnPropertyDescriptor(i,t);"function"==typeof r.value?(e.methods||(e.methods={}))[t]=r.value:(r.get||r.set)&&((e.computed||(e.computed={}))[t]={get:r.get,set:r.set})}}),Object.getOwnPropertyNames(yu.prototype).forEach(function(t){bu.indexOf(t)>-1&&(e[t]=i[t])}),(e.mixins||(e.mixins=[])).push({data:function(){return function(t,e){e.prototype._init=function(){var e=this,i=Object.getOwnPropertyNames(t);if(t.$options.props)for(var r in t.$options.props)t.hasOwnProperty(r)||i.push(r);i.forEach(function(i){"_"!==i.charAt(0)&&Object.defineProperty(e,i,{get:function(){return t[i]},set:function(e){return t[i]=e}})})};var i=new e,r={};return Object.keys(i).forEach(function(t){void 0!==i[t]&&(r[t]=i[t])}),r}(this,t)}});var a=t.__decorators__;a&&(a.forEach(Function(e)),delete t.__decorators__);var l=Object.getPrototypeOf(t.prototype);return(l instanceof Be?l.constructor:Be).extend(e)}(e,t)}}function Pe(t,e){if(t){var i=t.$slots,r=t.$scopedSlots,n=t.scopedSlots,o=t.children;if(r&&r[e])return r;if(i&&i.default)for(var s=i.default,a=0;a<s.length;a++){if(l=Pe(Ce(s[a]),e))return l}else{if(n&&n[e])return n;if(o)for(a=0;a<o.length;a++){var l;if(l=Pe(Ce(o[a]),e))return l}}}}function Ce(t){var e=t.componentOptions&&t.componentOptions.children?t.componentOptions:t.data;return t.componentInstance?t.componentInstance:e}function xe(t,e){if(t&&t[e])return t;if(t&&t.default)for(var i=t.default(),r=0;r<i.length;r++){var n=xe(i[r].children,e);if(n)return n}}window.process={env:{NODE_ENV:"production"}};var Oe,Be=e.default,Le="ej2_instances",Te=0,Me=!1,De="undefined"!=typeof window?window:{},ke={latn:{_digits:"0123456789",_type:"numeric"}},Ee={decimal:".",group:",",percentSign:"%",plusSign:"+",minusSign:"-",infinity:"∞",nan:"NaN",exponential:"E"},je=[0,1,2,3,4,5,6,7,8,9],Ie=function(){function t(){}return t.getMainObject=function(t,e){return o(b()?e:"main."+e,t)},t.getNumberingSystem=function(t){return o("supplemental.numberingSystems",t)||this.numberingSystems},t.reverseObject=function(t,e){for(var i={},r=0,n=e||Object.keys(t);r<n.length;r++){var o=n[r];i.hasOwnProperty(t[o])||(i[t[o]]=o)}return i},t.getSymbolRegex=function(t){var e=t.map(function(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}).join("|");return new RegExp(e,"g")},t.getSymbolMatch=function(t){for(var e={},i=0,r=Object.keys(Ee);i<r.length;i++){var n=r[i];e[t[n]]=Ee[n]}return e},t.constructRegex=function(t){for(var e=t.length,i="",r=0;r<e;r++)i+=r!==e-1?t[r]+"|":t[r];return i},t.convertValueParts=function(t,e,i){return t.replace(e,function(t){return i[t]})},t.getDefaultNumberingSystem=function(t){var e={};return e.obj=o("numbers",t),e.nSystem=o("defaultNumberingSystem",e.obj),e},t.getCurrentNumericOptions=function(t,e,i,r){var n={},s=this.getDefaultNumberingSystem(t);if(!p(s.nSystem)||r){var a=r?o("obj.mapperDigits",s):o(s.nSystem+"._digits",e);p(a)||(n.numericPair=this.reverseObject(a,je),n.numberParseRegex=new RegExp(this.constructRegex(a),"g"),n.numericRegex="["+a[0]+"-"+a[9]+"]",i&&(n.numericRegex=a[0]+"-"+a[9],n.symbolNumberSystem=o(r?"numberSymbols":"symbols-numberSystem-"+s.nSystem,s.obj),n.symbolMatch=this.getSymbolMatch(n.symbolNumberSystem),n.numberSystem=s.nSystem))}return n},t.getNumberMapper=function(t,e,i){var r={mapper:{}},n=this.getDefaultNumberingSystem(t);if(!p(n.nSystem)){r.numberSystem=n.nSystem,r.numberSymbols=o("symbols-numberSystem-"+n.nSystem,n.obj),r.timeSeparator=o("timeSeparator",r.numberSymbols);var s=o(n.nSystem+"._digits",e);if(!p(s))for(var a=0,l=je;a<l.length;a++){var h=l[a];r.mapper[h]=s[h]}}return r},t.nPair="numericPair",t.nRegex="numericRegex",t.numberingSystems=ke,t}(),Re={DJF:"Fdj",ERN:"Nfk",ETB:"Br",NAD:"$",ZAR:"R",XAF:"FCFA",GHS:"GH₵",XDR:"XDR",AED:"د.إ.",BHD:"د.ب.",DZD:"د.ج.",EGP:"ج.م.",ILS:"₪",IQD:"د.ع.",JOD:"د.ا.",KMF:"CF",KWD:"د.ك.",LBP:"ل.ل.",LYD:"د.ل.",MAD:"د.م.",MRU:"أ.م.",OMR:"ر.ع.",QAR:"ر.ق.",SAR:"ر.س.",SDG:"ج.س.",SOS:"S",SSP:"£",SYP:"ل.س.",TND:"د.ت.",YER:"ر.ي.",CLP:"$",INR:"₹",TZS:"TSh",EUR:"€",AZN:"₼",RUB:"₽",BYN:"Br",ZMW:"K",BGN:"лв.",NGN:"₦",XOF:"CFA",BDT:"৳",CNY:"¥",BAM:"КМ",UGX:"USh",USD:"$",CZK:"Kč",GBP:"£",DKK:"kr.",KES:"Ksh",CHF:"CHF",MVR:"ރ.",BTN:"Nu.",XCD:"EC$",AUD:"$",BBD:"$",BIF:"FBu",BMD:"$",BSD:"$",BWP:"P",BZD:"$",CAD:"$",NZD:"$",FJD:"$",FKP:"£",GIP:"£",GMD:"D",GYD:"$",HKD:"$",IDR:"Rp",JMD:"$",KYD:"$",LRD:"$",MGA:"Ar",MOP:"MOP$",MUR:"Rs",MWK:"MK",MYR:"RM",PGK:"K",PHP:"₱",PKR:"Rs",RWF:"RF",SBD:"$",SCR:"SR",SEK:"kr",SGD:"$",SHP:"£",SLL:"Le",ANG:"NAf.",SZL:"E",TOP:"T$",TTD:"$",VUV:"VT",WST:"WS$",ARS:"$",BOB:"Bs",BRL:"R$",COP:"$",CRC:"₡",CUP:"$",DOP:"$",GTQ:"Q",HNL:"L",MXN:"$",NIO:"C$",PAB:"B/.",PEN:"S/",PYG:"₲",UYU:"$",VES:"Bs.S",IRR:"ريال",GNF:"FG",CDF:"FC",HTG:"G",XPF:"FCFP",HRK:"kn",HUF:"Ft",AMD:"֏",ISK:"kr",JPY:"¥",GEL:"₾",CVE:"",KZT:"₸",KHR:"៛",KPW:"₩",KRW:"₩",KGS:"сом",AOA:"Kz",LAK:"₭",MZN:"MTn",MKD:"ден",MNT:"₮",BND:"$",MMK:"K",NOK:"kr",NPR:"रु",AWG:"Afl.",SRD:"$",PLN:"zł",AFN:"؋",STN:"Db",MDL:"L",RON:"lei",UAH:"₴",LKR:"රු.",ALL:"Lekë",RSD:"дин.",TJS:"смн",THB:"฿",TMT:"m.",TRY:"₺",UZS:"сўм",VND:"₫",TWD:"NT$"};!function(t){var e=[28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990];t.getHijriDate=function(t){var i=t.getDate(),r=t.getMonth(),n=t.getFullYear(),o=r+1,s=n;o<3&&(s-=1,o+=12);var a=Math.floor(s/100),l=a-Math.floor(a/4)-2,h=Math.floor(365.25*(s+4716))+Math.floor(30.6001*(o+1))+i-l-1524,u=h+(l=(a=Math.floor((h-1867216.25)/36524.25))-Math.floor(a/4)+1)+1524,c=Math.floor((u-122.1)/365.25),p=Math.floor(365.25*c),d=Math.floor((u-p)/30.6001);i=u-p-Math.floor(30.6001*d),(r=Math.floor((u-p)/20.6001))>13&&(c+=1,r-=12),r-=1,n=c-4716;var f=h-24e5,g=h-1948084,m=Math.floor(g/10631);g-=10631*m;var y=Math.floor((g-.1335)/(10631/30)),b=30*m+y;g-=Math.floor(y*(10631/30)+.1335);var v=Math.floor((g+28.5001)/29.5);13===v&&(v=12);for(var w=g-Math.floor(29.5001*v-29),S=0;S<e.length&&!(e[S]>f);S++);var P=S+16260,C=Math.floor((P-1)/12),x=C+1,O=P-12*C,B=f-e[S-1]+1;return(B+"").length>2&&(B=w,O=v,x=b),{year:x,month:O,date:B}},t.toGregorian=function(t,i,r){var n=r+e[12*(t-1)+1+(i-1)-16260-1]-1+24e5,o=Math.floor(n+.5),s=Math.floor((o-1867216.25)/36524.25),a=1524+(s=o+1+s-Math.floor(s/4)),l=Math.floor((a-122.1)/365.25),h=Math.floor(365.25*l),u=Math.floor((a-h)/30.6001),c=a-h-Math.floor(30.6001*u),p=u-(u>13.5?13:1),d=l-(p>2.5?4716:4715);return d<=0&&p--,new Date(d+"/"+p+"/"+c)}}(Oe||(Oe={}));var Ae,Ne=/\/MMMMM|MMMM|MMM|a|LLLL|LLL|EEEEE|EEEE|E|K|cccc|ccc|WW|W|G+|z+/gi,Fe=["sun","mon","tue","wed","thu","fri","sat"],Ve={m:"getMinutes",h:"getHours",H:"getHours",s:"getSeconds",d:"getDate",f:"getMilliseconds"},ze={M:"month",d:"day",E:"weekday",c:"weekday",y:"year",m:"minute",h:"hour",H:"hour",s:"second",L:"month",a:"designator",z:"timeZone",Z:"timeZone",G:"era",f:"milliseconds"},Ge=function(){function t(){}return t.dateFormat=function(t,e,i){var r=this,n=Ae.getDependables(i,t,e.calendar),s=o("parserObject.numbers",n),a=n.dateObject,l={isIslamic:Ae.islamicRegex.test(e.calendar)};b()&&e.isServerRendered&&(e=Ae.compareBlazorDateFormats(e,t));var h=e.format||Ae.getResultantPattern(e.skeleton,n.dateObject,e.type,!1,b()?t:"");if(l.dateSeperator=b()?o("dateSeperator",a):Ae.getDateSeparator(n.dateObject),p(h))m("Format options or type given must be invalid");else{h=Ae.ConvertDateToWeekFormat(h),b()&&(h=h.replace(/tt/,"a")),l.pattern=h,l.numMapper=b()?u({},s):Ie.getNumberMapper(n.parserObject,Ie.getNumberingSystem(i));for(var c=0,d=h.match(Ne)||[];c<d.length;c++){var f=d[c],g=f.length,y=f[0];switch("K"===y&&(y="h"),y){case"E":case"c":b()?l.weekday=o("days."+Ae.monthIndex[g],a):l.weekday=n.dateObject[Ae.days]["stand-alone"][Ae.monthIndex[g]];break;case"M":case"L":b()?l.month=o("months."+Ae.monthIndex[g],a):l.month=n.dateObject[Ae.month]["stand-alone"][Ae.monthIndex[g]];break;case"a":l.designator=b()?o("dayPeriods",a):o("dayPeriods.format.wide",a);break;case"G":var v=g<=3?"eraAbbr":4===g?"eraNames":"eraNarrow";l.era=b()?o("eras",a):o("eras."+v,n.dateObject);break;case"z":l.timeZone=o("dates.timeZoneNames",n.parserObject)}}}return function(t){return isNaN(t.getDate())?null:r.intDateFormatter(t,l)}},t.intDateFormatter=function(t,e){for(var i="",r=e.pattern.match(Ae.dateParseRegex),n=this.getCurrentDateValue(t,e.isIslamic),o=0,s=r;o<s.length;o++){var a=s[o],l=a.length,h=a[0];"K"===h&&(h="h");var u=void 0,p="",d=void 0,f=void 0,g="";switch(h){case"M":case"L":u=n.month,l>2?i+=e.month[u]:d=!0;break;case"E":case"c":i+=e.weekday[Fe[t.getDay()]];break;case"H":case"h":case"m":case"s":case"d":case"f":if(d=!0,"d"===h)u=n.date;else if("f"===h){d=!1,f=!0;var m=(p=(p=t[Ve[h]]().toString()).substring(0,l)).length;if(l!==m){if(l>3)continue;for(var y=0;y<l-m;y++)p="0"+p.toString()}g+=p}else u=t[Ve[h]]();"h"===h&&(u=u%12||12);break;case"y":f=!0,g+=n.year,2===l&&(g=g.substr(g.length-2));break;case"a":var b=t.getHours()<12?"am":"pm";i+=e.designator[b];break;case"G":var v=t.getFullYear()<0?0:1,w=e.era[v];c(w)&&(w=e.era[v?0:1]),i+=w||"";break;case"'":i+="''"===a?"'":a.replace(/'/g,"");break;case"z":var S=t.getTimezoneOffset(),P=l<4?"+H;-H":e.timeZone.hourFormat;P=P.replace(/:/g,e.numMapper.timeSeparator),0===S?i+=e.timeZone.gmtZeroFormat:(f=!0,g=this.getTimeZoneValue(S,P)),g=e.timeZone.gmtFormat.replace(/\{0\}/,g);break;case":":i+=e.numMapper.numberSymbols.timeSeparator;break;case"/":i+=e.dateSeperator;break;case"W":d=!0,u=Ae.getWeekOfYear(t);break;default:i+=a}d&&(f=!0,g=this.checkTwodigitNumber(u,l)),f&&(i+=Ie.convertValueParts(g,Ae.latnParseRegex,e.numMapper.mapper))}return i},t.getCurrentDateValue=function(t,e){return e?Oe.getHijriDate(t):{year:t.getFullYear(),month:t.getMonth()+1,date:t.getDate()}},t.checkTwodigitNumber=function(t,e){var i=t+"";return 2===e&&2!==i.length?"0"+i:i},t.getTimeZoneValue=function(t,e){var i=this,r=e.split(";")[t>0?1:0],n=Math.abs(t);return r=r.replace(/HH?|mm/g,function(t){var e=t.length,r=-1!==t.indexOf("H");return i.checkTwodigitNumber(Math.floor(r?n/60:n%60),e)})},t}(),_e={ms:"minimumSignificantDigits",ls:"maximumSignificantDigits",mf:"minimumFractionDigits",lf:"maximumFractionDigits"},He=["infinity","nan","group","decimal","exponential"],We=function(){function t(){}return t.numberFormatter=function(t,e,i){var r,n=this,s=u({},e),a={},l={},h=Ae.getDependables(i,t,"",!0),c=h.numericObject;l.numberMapper=b()?u({},c):Ie.getNumberMapper(h.parserObject,Ie.getNumberingSystem(i),!0),l.currencySymbol=b()?o("currencySymbol",c):Ae.getCurrencySymbol(h.numericObject,s.currency||ri,e.altSymbol),l.percentSymbol=b()?o("numberSymbols.percentSign",c):l.numberMapper.numberSymbols.percentSign,l.minusSymbol=b()?o("numberSymbols.minusSign",c):l.numberMapper.numberSymbols.minusSign;var d=l.numberMapper.numberSymbols;if(e.format&&!Ae.formatRegex.test(e.format))a=Ae.customFormat(e.format,l,h.numericObject);else{if(u(s,Ae.getProperNumericSkeleton(e.format||"N")),s.isCurrency="currency"===s.type,s.isPercent="percent"===s.type,b()||(r=Ae.getSymbolPattern(s.type,l.numberMapper.numberSystem,h.numericObject,s.isAccount)),s.groupOne=this.checkValueRange(s.maximumSignificantDigits,s.minimumSignificantDigits,!0),this.checkValueRange(s.maximumFractionDigits,s.minimumFractionDigits,!1,!0),p(s.fractionDigits)||(s.minimumFractionDigits=s.maximumFractionDigits=s.fractionDigits),p(s.useGrouping)&&(s.useGrouping=!0),s.isCurrency&&!b()&&(r=r.replace(/\u00A4/g,Ae.defaultCurrency)),b())a.nData=u({},{},o(s.type+"nData",c)),a.pData=u({},{},o(s.type+"pData",c)),"currency"===s.type&&e.currency&&Ae.replaceBlazorCurrency([a.pData,a.nData],l.currencySymbol,e.currency);else{var f=r.split(";");a.nData=Ae.getFormatData(f[1]||"-"+f[0],!0,l.currencySymbol),a.pData=Ae.getFormatData(f[0],!1,l.currencySymbol),s.useGrouping&&(s.groupSeparator=d[He[2]],s.groupData=this.getGroupingDetails(f[0]))}if(p(s.minimumFractionDigits)&&(s.minimumFractionDigits=a.nData.minimumFraction),p(s.maximumFractionDigits)){var g=a.nData.maximumFraction;s.maximumFractionDigits=p(g)&&s.isPercent?0:g}var m=s.minimumFractionDigits,y=s.maximumFractionDigits;p(m)||p(y)||m>y&&(s.maximumFractionDigits=m)}return u(a.nData,s),u(a.pData,s),function(t){return isNaN(t)?d[He[1]]:isFinite(t)?n.intNumberFormatter(t,a,l):d[He[0]]}},t.getGroupingDetails=function(t){var e={},i=t.match(Ae.negativeDataRegex);if(i&&i[4]){var r=i[4],n=r.lastIndexOf(",");if(-1!==n){var o=r.split(".")[0];e.primary=o.length-n-1;var s=r.lastIndexOf(",",n-1);-1!==s&&(e.secondary=n-1-s)}}return e},t.checkValueRange=function(t,e,i,r){var n=r?"f":"s",o=0,s=_e["l"+n],a=_e["m"+n];if(p(t)||(this.checkRange(t,s,r),o++),p(e)||(this.checkRange(e,a,r),o++),2===o){if(!(t<e))return!0;m(a+"specified must be less than the"+s)}else i&&1===o&&m("Both"+a+"and"+a+"must be present");return!1},t.checkRange=function(t,e,i){var r=i?[0,20]:[1,21];(t<r[0]||t>r[1])&&m(e+"value must be within the range"+r[0]+"to"+r[1])},t.intNumberFormatter=function(t,e,i){var r;if(!p(e.nData.type)){t<0?(t*=-1,r=e.nData):r=0===t?e.zeroData||e.pData:e.pData;var n="";return r.isPercent&&(t*=100),r.groupOne?n=this.processSignificantDigits(t,r.minimumSignificantDigits,r.maximumSignificantDigits):(n=this.processFraction(t,r.minimumFractionDigits,r.maximumFractionDigits),r.minimumIntegerDigits&&(n=this.processMinimumIntegers(n,r.minimumIntegerDigits))),"scientific"===r.type&&(n=(n=t.toExponential(r.maximumFractionDigits)).replace("e",i.numberMapper.numberSymbols[He[4]])),n=n.replace(".",i.numberMapper.numberSymbols[He[3]]),r.useGrouping&&(n=this.groupNumbers(n,r.groupData.primary,r.groupSeparator||",",i.numberMapper.numberSymbols[He[3]]||".",r.groupData.secondary)),n=Ie.convertValueParts(n,Ae.latnParseRegex,i.numberMapper.mapper),"N/A"===r.nlead?r.nlead:r.nlead+n+r.nend}},t.processSignificantDigits=function(t,e,i){var r=t+"";return r.length<e?t.toPrecision(e):(r=t.toPrecision(i),+r+"")},t.groupNumbers=function(t,e,i,r,n){for(var o=!c(n)&&0!==n,s=t.split(r),a=s[0],l=a.length,h="";l>e;)h=a.slice(l-e,l)+(h.length?i+h:""),l-=e,o&&(e=n,o=!1);return s[0]=a.slice(0,l)+(h.length?i:"")+h,s.join(r)},t.processFraction=function(t,e,i){var r=(t+"").split(".")[1],n=r?r.length:0;if(e&&n<e){var o="";if(0!==n){o+=t;for(var s=0;s<e-n;s++)o+="0";return o}return o=t.toFixed(e),t.toFixed(e)}return!c(i)&&(n>i||0===i)?t.toFixed(i):t+""},t.processMinimumIntegers=function(t,e){var i=t.split("."),r=i[0],n=r.length;if(n<e){for(var o=0;o<e-n;o++)r="0"+r;i[0]=r}return i.join(".")},t}(),Ue=/^[0-9]*$/,qe={minute:"setMinutes",hour:"setHours",second:"setSeconds",day:"setDate",month:"setMonth",milliseconds:"setMilliseconds"},Ke=function(){function t(){}return t.dateParser=function(t,e,i){var r=this,n=Ae.getDependables(i,t,e.calendar),s=Ie.getCurrentNumericOptions(n.parserObject,Ie.getNumberingSystem(i),!1,b()),a={};b()&&e.isServerRendered&&(e=Ae.compareBlazorDateFormats(e,t));var l,h=e.format||Ae.getResultantPattern(e.skeleton,n.dateObject,e.type,!1,b()?t:""),u="";if(p(h))m("Format options or type given must be invalid");else{h=Ae.ConvertDateToWeekFormat(h),a={isIslamic:Ae.islamicRegex.test(e.calendar),pattern:h,evalposition:{},culture:t};for(var d=h.match(Ae.dateParseRegex)||[],f=d.length,g=0,y=0,v=!1,w=s.numericRegex,S=b()?n.parserObject.numbers:Ie.getNumberMapper(n.parserObject,Ie.getNumberingSystem(i)),P=0;P<f;P++){var C=d[P],x=C.length,O="K"===C[0]?"h":C[0],B=void 0,L=void 0,T=ze[O],M=2===x?"":"?";switch(v&&(g=y,v=!1),O){case"E":case"c":var D=void 0;D=b()?o("days."+Ae.monthIndex[x],n.dateObject):n.dateObject[Ae.days]["stand-alone"][Ae.monthIndex[x]];var k=Ie.reverseObject(D);u+="("+Object.keys(k).join("|")+")";break;case"M":case"L":case"d":case"m":case"s":case"h":case"H":case"f":if(L=!0,("M"===O||"L"===O)&&x>2){var E=void 0;E=b()?o("months."+Ae.monthIndex[x],n.dateObject):n.dateObject.months["stand-alone"][Ae.monthIndex[x]],a[T]=Ie.reverseObject(E),u+="("+Object.keys(a[T]).join("|")+")"}else if("f"===O){if(x>3)continue;B=!0,u+="("+w+w+"?"+w+"?)"}else B=!0,u+="("+w+w+M+")";"h"===O&&(a.hour12=!0);break;case"W":u+="("+w+(1===x?"?":"")+w+")";break;case"y":L=B=!0,u+=2===x?"("+w+w+")":"("+w+"{"+x+",})";break;case"a":L=!0;var j=b()?o("dayPeriods",n.dateObject):o("dayPeriods.format.wide",n.dateObject);a[T]=Ie.reverseObject(j),u+="("+Object.keys(a[T]).join("|")+")";break;case"G":L=!0;var I=x<=3?"eraAbbr":4===x?"eraNames":"eraNarrow";a[T]=Ie.reverseObject(b()?o("eras",n.dateObject):o("eras."+I,n.dateObject)),u+="("+Object.keys(a[T]).join("|")+"?)";break;case"z":L=0!==(new Date).getTimezoneOffset(),a[T]=o("dates.timeZoneNames",n.parserObject);var R=a[T],A=(l=x<4)?"+H;-H":R.hourFormat;A=A.replace(/:/g,S.timeSeparator),u+="("+this.parseTimeZoneRegx(A,R,w)+")?",v=!0,y=l?6:12;break;case"'":u+="("+C.replace(/'/g,"")+")?";break;default:u+="([\\D])"}L&&(a.evalposition[T]={isNumber:B,pos:P+1+g,hourOnly:l}),P!==f-1||c(u)||(a.parserRegex=new RegExp("^"+u+"$","i"))}}return function(t){var e=r.internalDateParse(t,a,s);if(c(e)||!Object.keys(e).length)return null;if(a.isIslamic){var i={},n=e.year,o=e.day,l=e.month,h=n?n+"":"",u=2===h.length;n&&l&&o&&!u||(i=Oe.getHijriDate(new Date)),u&&(n=parseInt((i.year+"").slice(0,2)+h,10));var p=Oe.toGregorian(n||i.year,l||i.month,o||i.date);e.year=p.getFullYear(),e.month=p.getMonth()+1,e.day=p.getDate()}return r.getDateObject(e)}},t.getDateObject=function(t,e){var i=e||new Date;i.setMilliseconds(0);var r=t.year,n=t.designator,o=t.timeZone;if(!p(r)){if((r+"").length<=2){r+=100*Math.floor(i.getFullYear()/100)}i.setFullYear(r)}for(var s=0,a=["hour","minute","second","milliseconds","month","day"];s<a.length;s++){var l=a[s],h=t[l];if(p(h)&&"day"===l&&i.setDate(1),!p(h))if("month"===l){if((h-=1)<0||h>11)return new Date("invalid");var u=i.getDate();i.setDate(1),i[qe[l]](h);var c=new Date(i.getFullYear(),h+1,0).getDate();i.setDate(u<c?u:c)}else{if("day"===l){var d=new Date(i.getFullYear(),i.getMonth()+1,0).getDate();if(h<1||h>d)return null}i[qe[l]](h)}}if(!p(n)){var f=i.getHours();"pm"===n?i.setHours(f+(12===f?0:12)):12===f&&i.setHours(0)}if(!p(o)){var g=o-i.getTimezoneOffset();0!==g&&i.setMinutes(i.getMinutes()+g)}return i},t.internalDateParse=function(t,e,i){var r=t.match(e.parserRegex),n={hour:0,minute:0,second:0};if(c(r))return null;for(var o=0,s=Object.keys(e.evalposition);o<s.length;o++){var a=s[o],l=e.evalposition[a],h=r[l.pos];if(l.isNumber)n[a]=this.internalNumberParser(h,i);else if("timeZone"!==a||p(h))h="month"!==a||e.isIslamic||"en"!==e.culture&&"en-GB"!==e.culture&&"en-US"!==e.culture?h:h[0].toUpperCase()+h.substring(1).toLowerCase(),n[a]=e[a][h];else{var u=l.pos,d=void 0,f=r[u+1],g=!p(f);l.hourOnly?d=60*this.getZoneValue(g,f,r[u+4],i):(d=60*this.getZoneValue(g,f,r[u+7],i),d+=this.getZoneValue(g,r[u+4],r[u+10],i)),c(d)||(n[a]=d)}}return e.hour12&&(n.hour12=!0),n},t.internalNumberParser=function(t,e){return t=Ie.convertValueParts(t,e.numberParseRegex,e.numericPair),Ue.test(t)?+t:null},t.parseTimeZoneRegx=function(t,e,i){var r,n,o=e.gmtFormat,s="("+i+")("+i+")";return r=t.replace("+","\\+"),r=-1!==t.indexOf("HH")?r.replace(/HH|mm/g,"("+s+")"):r.replace(/H|m/g,"("+s+"?)"),n=r.split(";").map(function(t){return o.replace("{0}",t)}),r=n.join("|")+"|"+e.gmtZeroFormat},t.getZoneValue=function(t,e,i,r){var n=t?e:i;if(!n)return 0;var o=this.internalNumberParser(n,r);return t?-o:o},t}(),Ye=/^([^0-9]*)(([0-9,]*[0-9]+)(\.[0-9]+)?)([Ee][+-]?[0-9]+)?([^0-9]*)$/,$e=/,/g,Je=["minusSign","infinity"],Xe=function(){function t(){}return t.numberParser=function(t,e,i){var r,n=this,s=Ae.getDependables(i,t,"",!0),a={custom:!0};Ae.formatRegex.test(e.format)||!e.format?(u(a,Ae.getProperNumericSkeleton(e.format||"N")),a.custom=!1,a.fractionDigits||e.maximumFractionDigits&&(a.maximumFractionDigits=e.maximumFractionDigits)):u(a,Ae.customFormat(e.format,null,null));var l=o("numbers",s.parserObject);r=Ie.getCurrentNumericOptions(s.parserObject,Ie.getNumberingSystem(i),!0,b()),a.symbolRegex=Ie.getSymbolRegex(Object.keys(r.symbolMatch)),a.infinity=r.symbolNumberSystem[Je[1]];var h;if(b())a.nData=u({},{},o(a.type+"nData",l)),a.pData=u({},{},o(a.type+"pData",l)),"currency"===a.type&&e.currency&&Ae.replaceBlazorCurrency([a.pData,a.nData],o("currencySymbol",l),e.currency);else if(h=Ae.getSymbolPattern(a.type,r.numberSystem,s.numericObject,a.isAccount)){var c=(h=h.replace(/\u00A4/g,Ae.defaultCurrency)).split(";");a.nData=Ae.getFormatData(c[1]||"-"+c[0],!0,""),a.pData=Ae.getFormatData(c[0],!0,"")}return function(t){return n.getParsedNumber(t,a,r)}},t.getParsedNumber=function(t,e,i){var r,n,o,s,a,l;if(-1!==t.indexOf(e.infinity))return 1/0;t=Ie.convertValueParts(t,e.symbolRegex,i.symbolMatch),0===(t=-1!==(t=Ie.convertValueParts(t,i.numberParseRegex,i.numericPair)).indexOf("-")?t.replace("-.","-0."):t).indexOf(".")&&(t="0"+t);var h=t.match(Ye);if(c(h))return NaN;s=h[1],o=h[2];var u=h[5];return a=h[6],r=e.custom?s===e.nData.nlead&&a===e.nData.nend:-1!==s.indexOf(e.nData.nlead)&&-1!==a.indexOf(e.nData.nend),n=r?e.nData.isPercent:e.pData.isPercent,o=o.replace($e,""),u&&(o+=u),l=+o,("percent"===e.type||n)&&(l/=100),(e.custom||e.fractionDigits)&&(l=parseFloat(l.toFixed(e.custom?r?e.nData.maximumFractionDigits:e.pData.maximumFractionDigits:e.fractionDigits))),e.maximumFractionDigits&&(l=this.convertMaxFracDigits(o,e,l,r)),r&&(l*=-1),l},t.convertMaxFracDigits=function(t,e,i,r){var n=t.split(".");return n[1]&&n[1].length>e.maximumFractionDigits&&(i=+i.toFixed(e.custom?r?e.nData.maximumFractionDigits:e.pData.maximumFractionDigits:e.maximumFractionDigits)),i},t}(),Qe=function(){function t(t){this.ranArray=[],this.boundedEvents={},c(t)||(this.context=t)}return t.prototype.on=function(t,e,i,r){if(!c(e)){var n=i||this.context;this.notExist(t)?this.boundedEvents[t]=[{handler:e,context:n}]:c(r)?this.isHandlerPresent(this.boundedEvents[t],e)||this.boundedEvents[t].push({handler:e,context:n}):-1===this.ranArray.indexOf(r)&&(this.ranArray.push(r),this.boundedEvents[t].push({handler:e,context:n,id:r}))}},t.prototype.off=function(t,e,i){if(!this.notExist(t)){var r=o(t,this.boundedEvents);if(e){for(var n=0;n<r.length;n++)if(i){if(r[n].id===i){r.splice(n,1);var s=this.ranArray.indexOf(i);-1!==s&&this.ranArray.splice(s,1);break}}else if(e===r[n].handler){r.splice(n,1);break}}else delete this.boundedEvents[t]}},t.prototype.notify=function(t,e,i,r){if(this.notExist(t))i&&i.call(this,e);else{e&&(e.name=t);var n=o(t,this.boundedEvents).slice(0);if(window.Blazor)return this.blazorCallback(n,e,i,r,0);for(var s=0,a=n;s<a.length;s++){var l=a[s];l.handler.call(l.context,e)}i&&i.call(this,e)}},t.prototype.blazorCallback=function(t,e,i,r,n){var o=this,s=n===t.length-1;if(n<t.length){var a=t[n],l=a.handler.call(a.context,e);if(l&&"function"==typeof l.then){if(!i)return l;l.then(function(l){if(l="string"==typeof l&&o.isJson(l)?JSON.parse(l,o.dateReviver):l,u(e,e,l,!0),!i||!s)return o.blazorCallback(t,e,i,r,n+1);i.call(a.context,e)}).catch(function(t){r&&r.call(a.context,"string"==typeof t&&o.isJson(t)?JSON.parse(t,o.dateReviver):t)})}else{if(!i||!s)return this.blazorCallback(t,e,i,r,n+1);i.call(a.context,e)}}},t.prototype.dateReviver=function(t,e){return b&&"string"==typeof e&&null!==e.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/)?new Date(e):e},t.prototype.isJson=function(t){return!0},t.prototype.destroy=function(){this.boundedEvents=this.context=void 0},t.prototype.notExist=function(t){return!1===this.boundedEvents.hasOwnProperty(t)||this.boundedEvents[t].length<=0},t.prototype.isHandlerPresent=function(t,e){for(var i=0,r=t;i<r.length;i++){if(r[i].handler===e)return!0}return!1},t}(),Ze=new Qe,ti=!1,ei={},ii="en-US",ri="USD",ni=["numericObject","dateObject"],oi=function(){function t(t){t&&(this.culture=t)}return t.prototype.getDateFormat=function(t){return Ge.dateFormat(this.getCulture(),t||{type:"date",skeleton:"short"},ei)},t.prototype.getNumberFormat=function(t){return t&&!t.currency&&(t.currency=ri),b()&&t&&!t.format&&(t.minimumFractionDigits=0),We.numberFormatter(this.getCulture(),t||{},ei)},t.prototype.getDateParser=function(t){return Ke.dateParser(this.getCulture(),t||{skeleton:"short",type:"date"},ei)},t.prototype.getNumberParser=function(t){return b()&&t&&!t.format&&(t.minimumFractionDigits=0),Xe.numberParser(this.getCulture(),t||{format:"N"},ei)},t.prototype.formatNumber=function(t,e){return this.getNumberFormat(e)(t)},t.prototype.formatDate=function(t,e){return this.getDateFormat(e)(t)},t.prototype.parseDate=function(t,e){return this.getDateParser(e)(t)},t.prototype.parseNumber=function(t,e){return this.getNumberParser(e)(t)},t.prototype.getDatePattern=function(t,e){return Ae.getActualDateTimeFormat(this.getCulture(),t,ei,e)},t.prototype.getNumberPattern=function(t,e){return Ae.getActualNumberFormat(this.getCulture(),t,ei,e)},t.prototype.getFirstDayOfWeek=function(){return Ae.getWeekData(this.getCulture(),ei)},t.prototype.getCulture=function(){return this.culture||ii},t}(),si={"en-US":{d:"M/d/y",D:"EEEE, MMMM d, y",f:"EEEE, MMMM d, y h:mm a",F:"EEEE, MMMM d, y h:mm:s a",g:"M/d/y h:mm a",G:"M/d/yyyy h:mm:ss tt",m:"MMMM d",M:"MMMM d",r:"ddd, dd MMM yyyy HH':'mm':'ss 'GMT'",R:"ddd, dd MMM yyyy HH':'mm':'ss 'GMT'",s:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",t:"h:mm tt",T:"h:m:s tt",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",U:"dddd, MMMM d, yyyy h:mm:ss tt",y:"MMMM yyyy",Y:"MMMM yyyy"}};!function(t){function e(e,i,r,n,a){var l,h=r||"date";if(a)l=s({skeleton:e},a).format||s({skeleton:"d"},"en-US").format;else{if(-1!==t.basicPatterns.indexOf(e)){if(l=o(h+"Formats."+e,i),"dateTime"===h){var u=o("dateFormats."+e,i),c=o("timeFormats."+e,i);l=l.replace("{1}",u).replace("{0}",c)}}else l=o("dateTimeFormats.availableFormats."+e,i);p(l)&&"yMd"===e&&(l="M/d/y")}return l}function i(e,i,r,n){var s={},a=r||"gregorian";if(s.parserObject=Ie.getMainObject(e,i)||(b()?t.blazorDefaultObject:t.defaultObject),n)s.numericObject=o("numbers",s.parserObject);else{var l=b()?"dates":"dates.calendars."+a;s.dateObject=o(l,s.parserObject)}return s}function r(t,e,i,r){return o(t+"Formats-numberSystem-"+e+(r?".accounting":".standard"),i)||(r?o(t+"Formats-numberSystem-"+e+".standard",i):"")}function n(e){var i=e.match(t.dateConverterMapper);if(i&&b()){var r=3===i[0].length?"EEE":"EEEE";return e.replace(t.dateConverterMapper,r)}return e}function s(t,e){var i=t.format||t.skeleton,r=o((e||"en-US")+"."+i,si);return r||(r=o("en-US."+i,si)),r&&(r=n(r),t.format=r.replace(/tt/,"a")),t}function a(e){var i=e.match(t.formatRegex),r={},n=i[1].toUpperCase();return r.isAccount="A"===n,r.type=t.patternMatcher[n],e.length>1&&(r.fractionDigits=parseInt(i[2],10)),r}function l(e,i,r,n){var o=n?{}:{nlead:"",nend:""},s=e.match(t.customRegex);if(s){n||(o.nlead=h(s[1],r),o.nend=h(s[10],r),o.groupPattern=s[4]);var a=s[7];if(a&&i){var l=a.match(w);c(l)?o.minimumFraction=0:o.minimumFraction=l.length,o.maximumFraction=a.length-1}}return o}function h(e,i){return e?e.replace(t.defaultCurrency,i):""}function d(t,e,i){return o("currencies."+e+(i?"."+i:".symbol"),t)||o("currencies."+e+".symbol-alt-narrow",t)||"$"}function f(e,i,n){var o={type:"decimal",minimumFractionDigits:0,maximumFractionDigits:0},s=e.match(t.customRegex);if(c(s)||""===s[5]&&"N/A"!==e)return o.type=void 0,o;o.nlead=s[1],o.nend=s[10];var a=s[6],l=!!a.match(/\ $/g),h=-1!==a.replace(/\ $/g,"").indexOf(" ");o.useGrouping=-1!==a.indexOf(",")||h,a=a.replace(/,/g,"");var p=s[7];if(-1!==a.indexOf("0")&&(o.minimumIntegerDigits=a.length-a.indexOf("0")),c(p)||(o.minimumFractionDigits=p.lastIndexOf("0"),o.maximumFractionDigits=p.lastIndexOf("#"),-1===o.minimumFractionDigits&&(o.minimumFractionDigits=0),(-1===o.maximumFractionDigits||o.maximumFractionDigits<o.minimumFractionDigits)&&(o.maximumFractionDigits=o.minimumFractionDigits)),c(i)?u(o,g([o.nlead,o.nend],"%","%")):(u(o,g([o.nlead,o.nend],"$",i.currencySymbol)),o.isCurrency||u(o,g([o.nlead,o.nend],"%",i.percentSymbol))),!c(n)){var d=r(o.type,i.numberMapper.numberSystem,n,!1);o.useGrouping&&(o.groupSeparator=h?" ":i.numberMapper.numberSymbols[S[2]],o.groupData=We.getGroupingDetails(d.split(";")[0])),o.nlead=o.nlead.replace(/'/g,""),o.nend=l?" "+o.nend.replace(/'/g,""):o.nend.replace(/'/g,"")}return o}function g(t,e,i){for(var r={nlead:t[0],nend:t[1]},n=0;n<2;n++){var o=t[n],s=o.indexOf(e);if(-1!==s&&(s<o.indexOf("'")||s>o.lastIndexOf("'"))){r[B[n]]=o.substr(0,s)+i+o.substr(s+1),r[B[e]]=!0,r.type=r.isCurrency?"currency":"percent";break}}return r}function m(t,e,i){t+=".";for(var r=0;r<e;r++)t+="0";if(e<i)for(var n=i-e,o=0;o<n;o++)t+="#";return t}function y(t,e){for(var i=t.split("."),r="",n=0;n<e;n++)r+="0";return i[1]?r+"."+i[1]:r}function v(t){var e=t.split("."),i=e[0],r=3-i.length%3;t="";for(var n=(i=(r&&1===r?"#":2===r?"##":"")+i).length-1;n>0;n-=3)t=","+i[n-2]+i[n-1]+i[n]+t;return t=t.slice(1),e[1]?t+"."+e[1]:t}t.negativeDataRegex=/^(('[^']+'|''|[^*#@0,.E])*)(\*.)?((([#,]*[0,]*0+)(\.0*[0-9]*#*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/,t.customRegex=/^(('[^']+'|''|[^*#@0,.])*)(\*.)?((([0#,]*[0,]*[0#]*[0#\ ]*)(\.[0#]*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/,t.latnParseRegex=/0|1|2|3|4|5|6|7|8|9/g;var w=/[0-9]/g;t.defaultCurrency="$";var S=["infinity","nan","group","decimal"],P=/G|M|L|H|c|'| a|yy|y|EEEE|E/g,C={G:"",M:"m",L:"m",H:"h",c:"d","'":'"'," a":" AM/PM",yy:"yy",y:"yyyy",EEEE:"dddd",E:"ddd"};t.dateConverterMapper=/dddd|ddd/gi;var x="sun";t.islamicRegex=/^islamic/;var O={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};t.formatRegex=/(^[ncpae]{1})([0-1]?[0-9]|20)?$/i,t.currencyFormatRegex=/(^[ca]{1})([0-1]?[0-9]|20)?$/i,t.curWithoutNumberRegex=/(c|a)$/gi;var B={$:"isCurrency","%":"isPercent","-":"isNegative",0:"nlead",1:"nend"};t.dateParseRegex=/([a-z])\1*|'([^']|'')+'|''|./gi,t.basicPatterns=["short","medium","long","full"],t.defaultObject={dates:{calendars:{gregorian:{months:{"stand-alone":{abbreviated:{1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"},narrow:{1:"J",2:"F",3:"M",4:"A",5:"M",6:"J",7:"J",8:"A",9:"S",10:"O",11:"N",12:"D"},wide:{1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"}}},days:{"stand-alone":{abbreviated:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},narrow:{sun:"S",mon:"M",tue:"T",wed:"W",thu:"T",fri:"F",sat:"S"},short:{sun:"Su",mon:"Mo",tue:"Tu",wed:"We",thu:"Th",fri:"Fr",sat:"Sa"},wide:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"}}},dayPeriods:{format:{wide:{am:"AM",pm:"PM"}}},eras:{eraNames:{0:"Before Christ","0-alt-variant":"Before Common Era",1:"Anno Domini","1-alt-variant":"Common Era"},eraAbbr:{0:"BC","0-alt-variant":"BCE",1:"AD","1-alt-variant":"CE"},eraNarrow:{0:"B","0-alt-variant":"BCE",1:"A","1-alt-variant":"CE"}},dateFormats:{full:"EEEE, MMMM d, y",long:"MMMM d, y",medium:"MMM d, y",short:"M/d/yy"},timeFormats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats:{full:"{1} 'at' {0}",long:"{1} 'at' {0}",medium:"{1}, {0}",short:"{1}, {0}",availableFormats:{d:"d",E:"ccc",Ed:"d E",Ehm:"E h:mm a",EHm:"E HH:mm",Ehms:"E h:mm:ss a",EHms:"E HH:mm:ss",Gy:"y G",GyMMM:"MMM y G",GyMMMd:"MMM d, y G",GyMMMEd:"E, MMM d, y G",h:"h a",H:"HH",hm:"h:mm a",Hm:"HH:mm",hms:"h:mm:ss a",Hms:"HH:mm:ss",hmsv:"h:mm:ss a v",Hmsv:"HH:mm:ss v",hmv:"h:mm a v",Hmv:"HH:mm v",M:"L",Md:"M/d",MEd:"E, M/d",MMM:"LLL",MMMd:"MMM d",MMMEd:"E, MMM d",MMMMd:"MMMM d",ms:"mm:ss",y:"y",yM:"M/y",yMd:"M/d/y",yMEd:"E, M/d/y",yMMM:"MMM y",yMMMd:"MMM d, y",yMMMEd:"E, MMM d, y",yMMMM:"MMMM y"}}},islamic:{months:{"stand-alone":{abbreviated:{1:"Muh.",2:"Saf.",3:"Rab. I",4:"Rab. II",5:"Jum. I",6:"Jum. II",7:"Raj.",8:"Sha.",9:"Ram.",10:"Shaw.",11:"Dhuʻl-Q.",12:"Dhuʻl-H."},narrow:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},wide:{1:"Muharram",2:"Safar",3:"Rabiʻ I",4:"Rabiʻ II",5:"Jumada I",6:"Jumada II",7:"Rajab",8:"Shaʻban",9:"Ramadan",10:"Shawwal",11:"Dhuʻl-Qiʻdah",12:"Dhuʻl-Hijjah"}}},days:{"stand-alone":{abbreviated:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},narrow:{sun:"S",mon:"M",tue:"T",wed:"W",thu:"T",fri:"F",sat:"S"},short:{sun:"Su",mon:"Mo",tue:"Tu",wed:"We",thu:"Th",fri:"Fr",sat:"Sa"},wide:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"}}},dayPeriods:{format:{wide:{am:"AM",pm:"PM"}}},eras:{eraNames:{0:"AH"},eraAbbr:{0:"AH"},eraNarrow:{0:"AH"}},dateFormats:{full:"EEEE, MMMM d, y G",long:"MMMM d, y G",medium:"MMM d, y G",short:"M/d/y GGGGG"},timeFormats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats:{full:"{1} 'at' {0}",long:"{1} 'at' {0}",medium:"{1}, {0}",short:"{1}, {0}",availableFormats:{d:"d",E:"ccc",Ed:"d E",Ehm:"E h:mm a",EHm:"E HH:mm",Ehms:"E h:mm:ss a",EHms:"E HH:mm:ss",Gy:"y G",GyMMM:"MMM y G",GyMMMd:"MMM d, y G",GyMMMEd:"E, MMM d, y G",h:"h a",H:"HH",hm:"h:mm a",Hm:"HH:mm",hms:"h:mm:ss a",Hms:"HH:mm:ss",M:"L",Md:"M/d",MEd:"E, M/d",MMM:"LLL",MMMd:"MMM d",MMMEd:"E, MMM d",MMMMd:"MMMM d",ms:"mm:ss",y:"y G",yyyy:"y G",yyyyM:"M/y GGGGG",yyyyMd:"M/d/y GGGGG",yyyyMEd:"E, M/d/y GGGGG",yyyyMMM:"MMM y G",yyyyMMMd:"MMM d, y G",yyyyMMMEd:"E, MMM d, y G",yyyyMMMM:"MMMM y G",yyyyQQQ:"QQQ y G",yyyyQQQQ:"QQQQ y G"}}}},timeZoneNames:{hourFormat:"+HH:mm;-HH:mm",gmtFormat:"GMT{0}",gmtZeroFormat:"GMT"}},numbers:{currencies:{USD:{displayName:"US Dollar",symbol:"$","symbol-alt-narrow":"$"},EUR:{displayName:"Euro",symbol:"€","symbol-alt-narrow":"€"},GBP:{displayName:"British Pound","symbol-alt-narrow":"£"}},defaultNumberingSystem:"latn",minimumGroupingDigits:"1","symbols-numberSystem-latn":{decimal:".",group:",",list:";",percentSign:"%",plusSign:"+",minusSign:"-",exponential:"E",superscriptingExponent:"×",perMille:"‰",infinity:"∞",nan:"NaN",timeSeparator:":"},"decimalFormats-numberSystem-latn":{standard:"#,##0.###"},"percentFormats-numberSystem-latn":{standard:"#,##0%"},"currencyFormats-numberSystem-latn":{standard:"¤#,##0.00",accounting:"¤#,##0.00;(¤#,##0.00)"},"scientificFormats-numberSystem-latn":{standard:"#E0"}}},t.blazorDefaultObject={numbers:{mapper:{0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},mapperDigits:"0123456789",numberSymbols:{decimal:".",group:",",plusSign:"+",minusSign:"-",percentSign:"%",nan:"NaN",timeSeparator:":",infinity:"∞"},timeSeparator:":",currencySymbol:"$",currencypData:{nlead:"$",nend:"",groupSeparator:",",groupData:{primary:3},maximumFraction:2,minimumFraction:2},percentpData:{nlead:"",nend:"%",groupSeparator:",",groupData:{primary:3},maximumFraction:2,minimumFraction:2},percentnData:{nlead:"-",nend:"%",groupSeparator:",",groupData:{primary:3},maximumFraction:2,minimumFraction:2},currencynData:{nlead:"($",nend:")",groupSeparator:",",groupData:{primary:3},maximumFraction:2,minimumFraction:2},decimalnData:{nlead:"-",nend:"",groupData:{primary:3},maximumFraction:2,minimumFraction:2},decimalpData:{nlead:"",nend:"",groupData:{primary:3},maximumFraction:2,minimumFraction:2}},dates:{dayPeriods:{am:"AM",pm:"PM"},dateSeperator:"/",days:{abbreviated:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},short:{sun:"Su",mon:"Mo",tue:"Tu",wed:"We",thu:"Th",fri:"Fr",sat:"Sa"},wide:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"}},months:{abbreviated:{1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"},wide:{1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"}},eras:{1:"AD"}}},t.monthIndex={3:"abbreviated",4:"wide",5:"narrow",1:"abbreviated"},t.month="months",t.days="days",t.patternMatcher={C:"currency",P:"percent",N:"decimal",A:"currency",E:"scientific"},t.getResultantPattern=e,t.getDependables=i,t.getSymbolPattern=r,t.ConvertDateToWeekFormat=n,t.compareBlazorDateFormats=s,t.getProperNumericSkeleton=a,t.getFormatData=l,t.changeCurrencySymbol=h,t.getCurrencySymbol=d,t.customFormat=function(t,e,i){for(var r={},n=t.split(";"),o=["pData","nData","zeroData"],s=0;s<n.length;s++)r[o[s]]=f(n[s],e,i);return c(r.nData)&&(r.nData=u({},r.pData),r.nData.nlead=c(e)?"-"+r.nData.nlead:e.minusSymbol+r.nData.nlead),r},t.customNumberFormat=f,t.isCurrencyPercent=g,t.getDateSeparator=function(t){var e=(o("dateFormats.short",t)||"").match(/[dM]([^dM])[dM]/i);return e?e[1]:"/"},t.getActualDateTimeFormat=function(t,r,n,a){var l=i(n,t,r.calendar);b()&&(r=s(r,t));var h=r.format||e(r.skeleton,l.dateObject,r.type);if(a){if(-1!==(h=h.replace(P,function(t){return C[t]})).indexOf("z")){var u=h.match(/z/g).length,c=void 0,p={timeZone:{}};p.numMapper=Ie.getNumberMapper(l.parserObject,Ie.getNumberingSystem(n)),p.timeZone=o("dates.timeZoneNames",l.parserObject);var d=(new Date).getTimezoneOffset(),f=u<4?"+H;-H":p.timeZone.hourFormat;f=f.replace(/:/g,p.numMapper.timeSeparator),0===d?c=p.timeZone.gmtZeroFormat:(c=Ge.getTimeZoneValue(d,f),c=p.timeZone.gmtFormat.replace(/\{0\}/,c)),h=h.replace(/[z]+/,'"'+c+'"')}h=h.replace(/ $/,"")}return h},t.getActualNumberFormat=function(e,n,s,h){var c,p=i(s,e,"",!0),f={custom:!0},g=p.numericObject,w={},S=(n.format||"").match(t.currencyFormatRegex),P=t.formatRegex.test(n.format)?a(n.format||"N"):{},C={};if(S){C.numberMapper=b()?u({},p.numericObject):Ie.getNumberMapper(p.parserObject,Ie.getNumberingSystem(s),!0);var x=b()?o("currencySymbol",p.numericObject):d(p.numericObject,n.currency||ri,n.altSymbol),O=r("currency",C.numberMapper.numberSystem,p.numericObject,/a/i.test(n.format)),B=(O=O.replace(/\u00A4/g,x)).split(";");w.hasNegativePattern=!!b()||B.length>1,w.nData=b()?o(P.type+"nData",g):l(B[1]||"-"+B[0],!0,x),w.pData=b()?o(P.type+"pData",g):l(B[0],!1,x),S[2]||n.minimumFractionDigits||n.maximumFractionDigits||(c=l(O.split(";")[0],!0,"",!0).minimumFraction)}var L;if(t.formatRegex.test(n.format)||!n.format){if(u(f,a(n.format||"N")),f.custom=!1,L="###0",(f.fractionDigits||n.minimumFractionDigits||n.maximumFractionDigits||c)&&(f.fractionDigits&&(n.minimumFractionDigits=n.maximumFractionDigits=f.fractionDigits),L=m(L,c||f.fractionDigits||n.minimumFractionDigits||0,n.maximumFractionDigits||0)),n.minimumIntegerDigits&&(L=y(L,n.minimumIntegerDigits)),n.useGrouping&&(L=v(L)),"currency"===f.type||f.type&&b()){b()&&"currency"!==f.type&&(w.pData=o(f.type+"pData",g),w.nData=o(f.type+"nData",g));var T=L;L=w.pData.nlead+T+w.pData.nend,(w.hasNegativePattern||b())&&(L+=";"+w.nData.nlead+T+w.nData.nend)}"percent"!==f.type||b()||(L+=" %")}else L=n.format.replace(/'/g,'"');return Object.keys(C).length>0&&(L=h?L:function(t,e){if(-1!==t.indexOf(",")){var i=t.split(",");t=i[0]+o("numberMapper.numberSymbols.group",e)+i[1].replace(".",o("numberMapper.numberSymbols.decimal",e))}else t=t.replace(".",o("numberMapper.numberSymbols.decimal",e));return t}(L,C)),L},t.fractionDigitsPattern=m,t.minimumIntegerPattern=y,t.groupingPattern=v,t.getWeekData=function(t,e){var i=x,r=o("supplemental.weekData.firstDay",e),n=t;return/en-/.test(n)&&(n=n.slice(3)),n=n.slice(0,2).toUpperCase()+n.substr(2),r&&(i=r[n]||r[n.slice(0,2)]||x),O[i]},t.replaceBlazorCurrency=function(t,e,i){var r=function(t){return o(t||"",Re)}(i);if(e!==r)for(var n=0,s=t;n<s.length;n++){var a=s[n];a.nend=a.nend.replace(e,r),a.nlead=a.nlead.replace(e,r)}},t.getWeekOfYear=function(t){var e,i=new Date(t.getFullYear(),0,1),r=i.getDay();r=r>=0?r:r+7;var n=Math.floor((t.getTime()-i.getTime()-6e4*(t.getTimezoneOffset()-i.getTimezoneOffset()))/864e5)+1;if(r<4){if((e=Math.floor((n+r-1)/7)+1)>52){var o=new Date(t.getFullYear()+1,0,1).getDay();e=(o=o>=0?o:o+7)<4?1:53}}else e=Math.floor((n+r-1)/7);return e}}(Ae||(Ae={}));var ai=/^(.*?):[ \t]*([^\r\n]*)$/gm,li="GET",hi=function(){function t(t,e,i,r){this.mode=!0,this.emitError=!0,this.options={},"string"==typeof t?(this.url=t,this.type=e?e.toUpperCase():li,this.mode=!!c(i)||i):"object"==typeof t&&(this.options=t,h(this,this.options)),this.type=this.type?this.type.toUpperCase():li,this.contentType=void 0!==this.contentType?this.contentType:r}return t.prototype.send=function(t){var e=this;this.data=c(t)?this.data:t;var i={cancel:!1,httpRequest:null};return new Promise(function(t,r){e.httpRequest=new XMLHttpRequest,e.httpRequest.onreadystatechange=function(){e.stateChange(t,r)},c(e.onLoad)||(e.httpRequest.onload=e.onLoad),c(e.onProgress)||(e.httpRequest.onprogress=e.onProgress),c(e.onAbort)||(e.httpRequest.onabort=e.onAbort),c(e.onError)||(e.httpRequest.onerror=e.onError),c(e.onUploadProgress)||(e.httpRequest.upload.onprogress=e.onUploadProgress),e.httpRequest.open(e.type,e.url,e.mode),c(e.data)||null===e.contentType||e.httpRequest.setRequestHeader("Content-Type",e.contentType||"application/json; charset=utf-8"),e.beforeSend&&(i.httpRequest=e.httpRequest,e.beforeSend(i)),i.cancel||e.httpRequest.send(c(e.data)?null:e.data)})},t.prototype.successHandler=function(t){return this.onSuccess&&this.onSuccess(t,this),t},t.prototype.failureHandler=function(t){return this.onFailure&&this.onFailure(this.httpRequest),t},t.prototype.stateChange=function(t,e){var i=this.httpRequest.responseText;if(this.dataType&&"json"===this.dataType.toLowerCase())if(""===i)i=void 0;else try{i=JSON.parse(i)}catch(t){}4===this.httpRequest.readyState&&(this.httpRequest.status>=200&&this.httpRequest.status<=299||304===this.httpRequest.status?t(this.successHandler(i)):this.emitError?e(new Error(this.failureHandler(this.httpRequest.statusText))):t())},t.prototype.getResponseHeader=function(t){var e,i;e={};for(var r=ai.exec(this.httpRequest.getAllResponseHeaders());r;)e[r[1].toLowerCase()]=r[2],r=ai.exec(this.httpRequest.getAllResponseHeaders());return i=e[t.toLowerCase()],c(i)?null:i},t}(),ui=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i,ci=/msie|trident/i,pi=/Trident\/7\./,di=/(ipad|iphone|ipod touch)/i,fi=/(ipad|iphone|ipod touch);.*os 7_\d|(ipad|iphone|ipod touch);.*os 8_\d/i,gi=/android/i,mi=/trident|windows phone|edge/i,yi=/(version)[ /]([\w.]+)/i,bi={OPERA:/(opera|opr)(?:.*version|)[ /]([\w.]+)/i,EDGE:/(edge)(?:.*version|)[ /]([\w.]+)/i,CHROME:/(chrome|crios)[ /]([\w.]+)/i,PANTHOMEJS:/(phantomjs)[ /]([\w.]+)/i,SAFARI:/(safari)[ /]([\w.]+)/i,WEBKIT:/(webkit)[ /]([\w.]+)/i,MSIE:/(msie|trident) ([\w.]+)/i,MOZILLA:/(mozilla)(?:.*? rv:([\w.]+)|)/i};"undefined"!=typeof window&&(window.browserDetails=window.browserDetails||{});var vi,wi=function(){function t(){}return t.extractBrowserDetail=function(){for(var e={culture:{}},i=[],r=0,n=Object.keys(bi);r<n.length;r++){var o=n[r];if(i=t.userAgent.match(bi[o])){if(e.name="opr"===i[1].toLowerCase()?"opera":i[1].toLowerCase(),e.name="crios"===i[1].toLowerCase()?"chrome":e.name,e.version=i[2],e.culture.name=e.culture.language=navigator.language,t.userAgent.match(pi)){e.name="msie";break}var s=t.userAgent.match(yi);"safari"===e.name&&s&&(e.version=s[2]);break}}return e},t.getEvent=function(e){var i={start:{isPointer:"pointerdown",isTouch:"touchstart",isDevice:"mousedown"},move:{isPointer:"pointermove",isTouch:"touchmove",isDevice:"mousemove"},end:{isPointer:"pointerup",isTouch:"touchend",isDevice:"mouseup"},cancel:{isPointer:"pointercancel",isTouch:"touchcancel",isDevice:"mouseleave"}};return t.isPointer?i[e].isPointer:t.isTouch?i[e].isTouch+(t.isDevice?"":" "+i[e].isDevice):i[e].isDevice},t.getTouchStartEvent=function(){return t.getEvent("start")},t.getTouchEndEvent=function(){return t.getEvent("end")},t.getTouchMoveEvent=function(){return t.getEvent("move")},t.getTouchCancelEvent=function(){return t.getEvent("cancel")},t.getValue=function(e,i){var r=window.browserDetails;return"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1&&!0===t.isTouch&&(r.isIos=!0,r.isDevice=!0,r.isTouch=!0,r.isPointer=!0),void 0===r[e]?r[e]=i.test(t.userAgent):r[e]},Object.defineProperty(t,"userAgent",{get:function(){return t.uA},set:function(e){t.uA=e,window.browserDetails={}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"info",{get:function(){return p(window.browserDetails.info)?window.browserDetails.info=t.extractBrowserDetail():window.browserDetails.info},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isIE",{get:function(){return t.getValue("isIE",ci)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isTouch",{get:function(){return p(window.browserDetails.isTouch)?window.browserDetails.isTouch="ontouchstart"in window.navigator||window&&window.navigator&&window.navigator.maxTouchPoints>0||"ontouchstart"in window:window.browserDetails.isTouch},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isPointer",{get:function(){return p(window.browserDetails.isPointer)?window.browserDetails.isPointer="pointerEnabled"in window.navigator:window.browserDetails.isPointer},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isMSPointer",{get:function(){return p(window.browserDetails.isMSPointer)?window.browserDetails.isMSPointer="msPointerEnabled"in window.navigator:window.browserDetails.isMSPointer},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isDevice",{get:function(){return t.getValue("isDevice",ui)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isIos",{get:function(){return t.getValue("isIos",di)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isIos7",{get:function(){return t.getValue("isIos7",fi)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isAndroid",{get:function(){return t.getValue("isAndroid",gi)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isWebView",{get:function(){return p(window.browserDetails.isWebView)?(window.browserDetails.isWebView=!(p(window.cordova)&&p(window.PhoneGap)&&p(window.phonegap)&&"object"!==window.forge),window.browserDetails.isWebView):window.browserDetails.isWebView},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isWindows",{get:function(){return t.getValue("isWindows",mi)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"touchStartEvent",{get:function(){return p(window.browserDetails.touchStartEvent)?window.browserDetails.touchStartEvent=t.getTouchStartEvent():window.browserDetails.touchStartEvent},enumerable:!0,configurable:!0}),Object.defineProperty(t,"touchMoveEvent",{get:function(){return p(window.browserDetails.touchMoveEvent)?window.browserDetails.touchMoveEvent=t.getTouchMoveEvent():window.browserDetails.touchMoveEvent},enumerable:!0,configurable:!0}),Object.defineProperty(t,"touchEndEvent",{get:function(){return p(window.browserDetails.touchEndEvent)?window.browserDetails.touchEndEvent=t.getTouchEndEvent():window.browserDetails.touchEndEvent},enumerable:!0,configurable:!0}),Object.defineProperty(t,"touchCancelEvent",{get:function(){return p(window.browserDetails.touchCancelEvent)?window.browserDetails.touchCancelEvent=t.getTouchCancelEvent():window.browserDetails.touchCancelEvent},enumerable:!0,configurable:!0}),t.uA="undefined"!=typeof navigator?navigator.userAgent:"",t}(),Si=function(){function t(){}return t.addOrGetEventData=function(t){return"__eventList"in t?t.__eventList.events:(t.__eventList={},t.__eventList.events=[])},t.add=function(e,i,r,n,o){var s,a=t.addOrGetEventData(e);s=o?f(r,o):r,n&&(s=s.bind(n));for(var l=i.split(" "),h=0;h<l.length;h++)a.push({name:l[h],listener:r,debounce:s}),wi.isIE?e.addEventListener(l[h],s):e.addEventListener(l[h],s,{passive:!1});return s},t.remove=function(e,i,r){for(var n=t.addOrGetEventData(e),o=i.split(" "),s=function(t){var i,s=-1;n&&0!==n.length&&n.some(function(e,n){return e.name===o[t]&&e.listener===r&&(s=n,i=e.debounce,!0)}),-1!==s&&n.splice(s,1),i&&e.removeEventListener(o[t],i)},a=0;a<o.length;a++)s(a)},t.clearEvents=function(e){var i,r;r=u([],r,i=t.addOrGetEventData(e));for(var n=0;n<r.length;n++)e.removeEventListener(r[n].name,r[n].debounce),i.shift()},t.trigger=function(e,i,r){for(var n=0,o=t.addOrGetEventData(e);n<o.length;n++){var s=o[n];s.name===i&&s.debounce.call(this,r)}},t}(),Pi=/^svg|^path|^g/,Ci=new RegExp("]"),xi=function(){function t(t,e){this.isRendered=!1,this.isComplexArraySetter=!1,this.isServerRendered=!1,this.allowServerDataBinding=!0,this.isProtectedOnChange=!0,this.properties={},this.changedProperties={},this.oldProperties={},this.bulkChanges={},this.refreshing=!1,this.ignoreCollectionWatch=!1,this.finalUpdate=function(){},this.childChangedProperties={},this.modelObserver=new Qe(this),p(e)||(this.element="string"==typeof e?document.querySelector(e):e,c(this.element)||(this.isProtectedOnChange=!1,this.addInstance())),p(t)||this.setProperties(t,!0),this.isDestroyed=!1}return t.prototype.setProperties=function(t,e){var i=this.isProtectedOnChange;this.isProtectedOnChange=!!e,h(this,t),!0!==e?(h(this.changedProperties,t),this.dataBind()):b()&&this.isRendered&&this.serverDataBind(t),this.finalUpdate(),this.changedProperties={},this.oldProperties={},this.isProtectedOnChange=i},t.callChildDataBind=function(t,e){for(var i=0,r=Object.keys(t);i<r.length;i++){var n=r[i];if(e[n]instanceof Array)for(var o=0,s=e[n];o<s.length;o++){var a=s[o];void 0!==a.dataBind&&a.dataBind()}else e[n].dataBind()}},t.prototype.clearChanges=function(){this.finalUpdate(),this.changedProperties={},this.oldProperties={},this.childChangedProperties={}},t.prototype.dataBind=function(){if(t.callChildDataBind(this.childChangedProperties,this),Object.getOwnPropertyNames(this.changedProperties).length){var e=this.isProtectedOnChange,i=this.changedProperties,r=this.oldProperties;this.clearChanges(),this.isProtectedOnChange=!0,this.onPropertyChanged(i,r),this.isProtectedOnChange=e}},t.prototype.serverDataBind=function(t){if(b()){t=t||{},u(this.bulkChanges,{},t,!0);this.allowServerDataBinding&&window.sfBlazor.updateModel&&(window.sfBlazor.updateModel(this),this.bulkChanges={})}},t.prototype.saveChanges=function(t,e,i){if(b()){var r={};r[t]=e,this.serverDataBind(r)}this.isProtectedOnChange||(this.oldProperties[t]=i,this.changedProperties[t]=e,this.finalUpdate(),this.finalUpdate=n(this.dataBind.bind(this)))},t.prototype.addEventListener=function(t,e){this.modelObserver.on(t,e)},t.prototype.removeEventListener=function(t,e){this.modelObserver.off(t,e)},t.prototype.trigger=function(t,e,i,r){var n=this;if(!0!==this.isDestroyed){var s=this.isProtectedOnChange;this.isProtectedOnChange=!1;var a=this.modelObserver.notify(t,e,i,r);if(Ci.test(t)){var l=o(t,this);if(l){if(window.Blazor){var h=l.call(this,e);h&&"function"==typeof h.then?i?h.then(function(t){i&&(t="string"==typeof t&&n.modelObserver.isJson(t)?JSON.parse(t):t,i.call(n,t))}).catch(function(t){r&&(t="string"==typeof t&&n.modelObserver.isJson(t)?JSON.parse(t):t,r.call(n,t))}):a=h:i&&i.call(this,e)}else l.call(this,e),i&&i.call(this,e)}else i&&i.call(this,e)}return this.isProtectedOnChange=s,a}},t.prototype.addInstance=function(){var t="e-"+this.getModuleName().toLowerCase();S([this.element],["e-lib",t]),c(this.element.ej2_instances)?s("ej2_instances",[this],this.element):this.element.ej2_instances.push(this)},t.prototype.destroy=function(){var t=this;this.element.ej2_instances=this.element.ej2_instances.filter(function(e){return e!==t}),P([this.element],["e-"+this.getModuleName()]),0===this.element.ej2_instances.length&&P([this.element],["e-lib"]),this.clearChanges(),this.modelObserver.destroy(),this.isDestroyed=!0},t}(),Oi=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Bi=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Li=function(t){function e(e){var i=t.call(this,e,void 0)||this;return i.easing={ease:"cubic-bezier(0.250, 0.100, 0.250, 1.000)",linear:"cubic-bezier(0.250, 0.250, 0.750, 0.750)",easeIn:"cubic-bezier(0.420, 0.000, 1.000, 1.000)",easeOut:"cubic-bezier(0.000, 0.000, 0.580, 1.000)",easeInOut:"cubic-bezier(0.420, 0.000, 0.580, 1.000)",elasticInOut:"cubic-bezier(0.5,-0.58,0.38,1.81)",elasticIn:"cubic-bezier(0.17,0.67,0.59,1.81)",elasticOut:"cubic-bezier(0.7,-0.75,0.99,1.01)"},i}Oi(e,t),i=e,e.prototype.animate=function(t,e){e=e||{};var r=this.getModel(e);if("string"==typeof t)for(var n=0,o=Array.prototype.slice.call(D(t,document));n<o.length;n++){var s=o[n];r.element=s,i.delayAnimation(r)}else r.element=t,i.delayAnimation(r)},e.stop=function(t,e){t.style.animation="",t.removeAttribute("e-animate");var i=t.getAttribute("e-animation-id");if(i){var r=parseInt(i,10);cancelAnimationFrame(r),t.removeAttribute("e-animation-id")}e&&e.end&&e.end.call(this,e)},e.delayAnimation=function(t){t.delay?setTimeout(function(){i.applyAnimation(t)},t.delay):i.applyAnimation(t)},e.applyAnimation=function(t){var e=this;t.timeStamp=0;var i=0,r=0,n=0,o=t.duration;t.element.setAttribute("e-animate","true");var s=function(a){try{if(a){n=0===n?a:n,t.timeStamp=a+t.timeStamp-n,n=a,!i&&t.begin&&t.begin.call(e,t),i+=1;var l=t.timeStamp/i;t.timeStamp<o&&t.timeStamp+l<o&&t.element.getAttribute("e-animate")?(t.element.style.animation=t.name+" "+t.duration+"ms "+t.timingFunction,t.progress&&t.progress.call(e,t),requestAnimationFrame(s)):(cancelAnimationFrame(r),t.element.removeAttribute("e-animation-id"),t.element.removeAttribute("e-animate"),t.element.style.animation="",t.end&&t.end.call(e,t))}else r=requestAnimationFrame(s),t.element.setAttribute("e-animation-id",r.toString())}catch(i){cancelAnimationFrame(r),t.element.removeAttribute("e-animation-id"),t.fail&&t.fail.call(e,i)}};s()},e.prototype.getModel=function(t){return{name:t.name||this.name,delay:t.delay||this.delay,duration:void 0!==t.duration?t.duration:this.duration,begin:t.begin||this.begin,end:t.end||this.end,fail:t.fail||this.fail,progress:t.progress||this.progress,timingFunction:this.easing[t.timingFunction]?this.easing[t.timingFunction]:t.timingFunction||this.easing[this.timingFunction]}},e.prototype.onPropertyChanged=function(t,e){},e.prototype.getModuleName=function(){return"animation"},e.prototype.destroy=function(){};var i;return Bi([G("FadeIn")],e.prototype,"name",void 0),Bi([G(400)],e.prototype,"duration",void 0),Bi([G("ease")],e.prototype,"timingFunction",void 0),Bi([G(0)],e.prototype,"delay",void 0),Bi([W()],e.prototype,"progress",void 0),Bi([W()],e.prototype,"begin",void 0),Bi([W()],e.prototype,"end",void 0),Bi([W()],e.prototype,"fail",void 0),e=i=Bi([U],e)}(xi),Ti=!1,Mi=function(){function t(t){this.loadedModules=[],this.parent=t}return t.prototype.inject=function(t,e){var i=t.length;if(0!==i){this.loadedModules.length&&this.clearUnusedModule(t);for(var n=0;n<i;n++)for(var o=t[n],a=0,l=e;a<l.length;a++){var h=l[a],u=o.member;if(h.prototype.getModuleName()===o.member&&!this.isModuleLoaded(u)){var c=r(h,o.args),p=this.getMemberName(u);o.isProperty?s(p,h,this.parent):s(p,c,this.parent);var d=o;d.member=p,this.loadedModules.push(d)}}}else this.clean()},t.prototype.clean=function(){for(var t=0,e=this.loadedModules;t<e.length;t++){var i=e[t];i.isProperty||o(i.member,this.parent).destroy()}this.loadedModules=[]},t.prototype.clearUnusedModule=function(t){for(var e=this,i=t.map(function(t){return e.getMemberName(t.member)}),r=0,n=this.loadedModules.filter(function(t){return-1===i.indexOf(t.member)});r<n.length;r++){var s=n[r];s.isProperty||o(s.member,this.parent).destroy(),this.loadedModules.splice(this.loadedModules.indexOf(s),1),a(this.parent,s.member)}},t.prototype.getMemberName=function(t){return t[0].toLowerCase()+t.substring(1)+"Module"},t.prototype.isModuleLoaded=function(t){for(var e=0,i=this.loadedModules;e<i.length;e++){if(i[e].member===this.getMemberName(t))return!0}return!1},t}(),Di=function(){function t(t,e,i,r){this.isComplexArraySetter=!1,this.properties={},this.changedProperties={},this.childChangedProperties={},this.oldProperties={},this.finalUpdate=function(){},this.callChildDataBind=o("callChildDataBind",xi),this.parentObj=t,this.controlParent=this.parentObj.controlParent||this.parentObj,this.propName=e,this.isParentArray=r,this.setProperties(i,!0)}return t.prototype.updateChange=function(t,e){!0===t?this.parentObj.childChangedProperties[e]=t:delete this.parentObj.childChangedProperties[e],this.parentObj.updateChange&&this.parentObj.updateChange(t,this.parentObj.propName)},t.prototype.updateTimeOut=function(){if(this.parentObj.updateTimeOut)this.parentObj.finalUpdate(),this.parentObj.updateTimeOut();else{var t=setTimeout(this.parentObj.dataBind.bind(this.parentObj));this.finalUpdate=function(){clearTimeout(t)}}},t.prototype.clearChanges=function(){this.finalUpdate(),this.updateChange(!1,this.propName),this.oldProperties={},this.changedProperties={}},t.prototype.setProperties=function(t,e){!0===e?(h(this,t),this.updateChange(!1,this.propName),this.clearChanges()):h(this,t)},t.prototype.dataBind=function(){if(this.callChildDataBind(this.childChangedProperties,this),this.isParentArray){var t=this.parentObj[this.propName].indexOf(this);Object.keys(this.changedProperties).length&&(s(this.propName+"."+t,this.changedProperties,this.parentObj.changedProperties),s(this.propName+"."+t,this.oldProperties,this.parentObj.oldProperties))}else this.parentObj.changedProperties[this.propName]=this.changedProperties,this.parentObj.oldProperties[this.propName]=this.oldProperties;this.clearChanges()},t.prototype.saveChanges=function(t,e,i,r){this.controlParent.isProtectedOnChange||(r||this.serverDataBind(t,e,!0),this.oldProperties[t]=i,this.changedProperties[t]=e,this.updateChange(!0,this.propName),this.finalUpdate(),this.updateTimeOut())},t.prototype.serverDataBind=function(t,e,i,r){if(b()&&!this.parentObj.isComplexArraySetter){var n,o={},s=i?this.getParentKey(!0)+"."+t:t;if(-1!==s.indexOf(".")){var a=s.split(".");n=o;for(var l=0;l<a.length;l++){var h=l===a.length-1;n[a[l]]=h?e:{},n=h?n:n[a[l]]}}else o[s]={},n=o[s],o[s][t]=e;if(this.isParentArray){n.ejsAction=r||"none"}this.controlParent.serverDataBind(o)}},t.prototype.getParentKey=function(t){var e="",i=this.propName;if(this.isParentArray){e=this.parentObj[this.propName].indexOf(this);var r=this.parentObj[this.propName].length;r=t?r:r>0?r-1:0,i+=e=-1!==e?"-"+e:"-"+r}return this.controlParent!==this.parentObj&&(i=this.parentObj.getParentKey()+"."+this.propName+e),i},t}(),ki=[115,121,110,99,102,117,115,105,111,110,46,105,115,76,105,99,86,97,108,105,100,97,116,101,100],Ei=function(){function t(t){this.isValidated=!1,this.version="20.1",this.platform=/JavaScript|ASPNET|ASPNETCORE|ASPNETMVC|FileFormats/i,this.errors={noLicense:'This application was built using a trial version of Syncfusion Essential Studio. Please include a valid license to permanently remove this license validation message. You can also obtain a free 30 day evaluation license to temporarily remove this message during the evaluation period. Please refer to this <a style="color:yellow;text-decoration:none;"href="https://help.syncfusion.com/common/essential-studio/licensing">help topic</a> for more information.',trailExpired:'Your Syncfusion trial license has expired. Please refer to this <a style="color:yellow;text-decoration:none;"href="https://help.syncfusion.com/common/essential-studio/licensing/licensing-errors#trial-expired">help topic</a> for more information.',versionMismatched:'The included Syncfusion license (v##LicenseVersion) is invalid for version ##Requireversion. Please refer to this <a style="color:yellow;text-decoration:none;" href="https://help.syncfusion.com/es/licensing/version-mismatch/">help topic</a> for more information.',platformMismatched:'The included Syncfusion license is invalid (Platform mismatch). Please refer to this <a style="color:yellow;text-decoration:none;" href="https://help.syncfusion.com/common/essential-studio/licensing/licensing-errors#platform-mismatch">help topic</a> for more information.',invalidKey:'The included Syncfusion license is invalid. Please refer to this <a style="color:yellow;text-decoration:none;" href="https://help.syncfusion.com/common/essential-studio/licensing/licensing-errors#invalid-key">help topic</a> for more information.'},this.manager=function(){var t=null;return{setKey:function(e){t=e},getKey:function(){return t}}}(),this.manager.setKey(t)}return t.prototype.validate=function(){if(!this.isValidated&&De&&!o(Z(ki),De)&&!o("Blazor",De)){var t=void 0;if(this.manager&&this.manager.getKey()){var e=this.getInfoFromKey();if(e&&e.length)for(var i=0,r=e;i<r.length;i++){var n=r[i];if(!this.platform.test(n.platform)||n.invalidPlatform)t=this.errors.platformMismatched;else if(-1===n.version.indexOf(this.version))t=(t=(t=this.errors.versionMismatched).replace("##LicenseVersion",n.version)).replace("##Requireversion",this.version+".x");else if(n.expiryDate){var a=new Date(n.expiryDate),l=new Date;if(!(a!==l&&a<l))break;t=this.errors.trailExpired}}else t=this.errors.invalidKey}else t=this.errors.noLicense;if(t&&"undefined"!=typeof document&&!c(document)){var h=w("div",{innerHTML:t+'<span style="position:absolute;right: 10px;top:27%;cursor:pointer;"onClick=this.parentElement.remove();><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><line x1="5" y1="5" x2="15" y2="15" stroke="yellow" stroke-width="2.5" stroke-miterlimit="10" stroke-linecap="round"></line><line x1="15" y1="5" x2="5" y2="15" stroke="yellow" stroke-width="2.5" stroke-linecap="round" stroke-miterlimit="10"></line></svg></span>',styles:'position:fixed;top:0;left:0;right:0;font-family:"Segoe UI";font-size:16px;background:repeating-linear-gradient(45deg,#d70f0f,#d70f0f 10px,#e12121 10px,#e12121 17px);color:#ffffff;z-index:999999999;text-align:center;padding:10px 50px 10px 25px;'});h.setAttribute("id","js-licensing"),document.body.appendChild(h)}this.isValidated=!0,s(Z(ki),this.isValidated,De)}},t.prototype.getDecryptedData=function(t){try{return atob(t)}catch(t){return""}},t.prototype.getInfoFromKey=function(){try{for(var t=[5439488,7929856,5111808,6488064,4587520,7667712,5439488,6881280,5177344,7208960,4194304,4456448,6619136,7733248,5242880,7077888,6356992,7602176,4587520,7274496,7471104,7143424],e=[],i=[],r=!1,n=0,o=this.manager.getKey().split(";");n<o.length;n++){var s=o[n],a=this.getDecryptedData(s);if(a){for(var l=0,h="",u=0;u<a.length;u++,l++){l===t.length&&(l=0);var c=a.charCodeAt(u);h+=String.fromCharCode(c^t[l]>>16)}this.platform.test(h)?(r=!1,(e=h.split(";")).length>3&&i.push({platform:e[0],version:e[1],expiryDate:e[2]})):h&&h.split(";").length>3&&(r=!0)}}return r&&!i.length?[{invalidPlatform:r}]:i.length?i:null}catch(t){return null}},t}(),ji=new Ei,Ii=function(t){t&&tt(t),ji.validate()},Ri=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ai=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Ni=0,Fi=0,Vi=!1,zi=function(t){function e(e,i){var r=t.call(this,e,i)||this;return r.randomId=v(),r.isStringTemplate=!1,r.needsID=!1,r.isReactHybrid=!1,c(r.enableRtl)&&r.setProperties({enableRtl:ti},!0),c(r.locale)&&r.setProperties({locale:ii},!0),r.moduleLoader=new Mi(r),r.localObserver=new Qe(r),Ze.on("notifyExternalChange",r.detectFunction,r,r.randomId),"undefined"!=typeof window&&"undefined"!=typeof document&&Ii(),p(i)||r.appendTo(),r}return Ri(e,t),e.prototype.requiredModules=function(){return[]},e.prototype.destroy=function(){this.isDestroyed||(this.enablePersistence&&this.setPersistData(),this.localObserver.destroy(),this.refreshing||(P([this.element],["e-control"]),this.trigger("destroyed",{cancel:!1}),t.prototype.destroy.call(this),this.moduleLoader.clean(),Ze.off("notifyExternalChange",this.detectFunction,this.randomId)))},e.prototype.refresh=function(){this.refreshing=!0,this.moduleLoader.clean(),this.destroy(),this.clearChanges(),this.localObserver=new Qe(this),this.preRender(),this.injectModules(),this.render(),this.refreshing=!1},e.prototype.accessMount=function(){this.mount&&!this.isReactHybrid&&this.mount()},e.prototype.getRootElement=function(){return this.isReactHybrid?this.actualElement:this.element},e.prototype.getLocalData=function(){var t=this.getModuleName()+this.element.id;return Vi?window.localStorage.getItem(t+this.ej2StatePersistenceVersion):window.localStorage.getItem(t)},e.prototype.appendTo=function(e){if(c(e)||"string"!=typeof e?c(e)||(this.element=e):this.element=M(e,document),!c(this.element)){var i="e-"+this.getModuleName().toLowerCase();S([this.element],["e-control",i]),this.isProtectedOnChange=!1,this.needsID&&!this.element.id&&(this.element.id=this.getUniqueID(this.getModuleName())),this.enablePersistence&&(this.mergePersistData(),window.addEventListener("unload",this.setPersistData.bind(this)));var r=o("ej2_instances",this.element);r&&-1!==r.indexOf(this)||t.prototype.addInstance.call(this),this.preRender(),this.injectModules(),this.render(),this.mount?this.accessMount():this.trigger("created")}},e.prototype.renderComplete=function(t){if(b()){window.sfBlazor.renderComplete(this.element,t)}this.isRendered=!0},e.prototype.dataBind=function(){this.injectModules(),t.prototype.dataBind.call(this)},e.prototype.on=function(t,e,i){if("string"==typeof t)this.localObserver.on(t,e,i);else for(var r=0,n=t;r<n.length;r++){var o=n[r];this.localObserver.on(o.event,o.handler,o.context)}},e.prototype.off=function(t,e){if("string"==typeof t)this.localObserver.off(t,e);else for(var i=0,r=t;i<r.length;i++){var n=r[i];this.localObserver.off(n.event,n.handler)}},e.prototype.notify=function(t,e){!0!==this.isDestroyed&&this.localObserver.notify(t,e)},e.prototype.getInjectedModules=function(){return this.injectedModules},e.Inject=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.prototype.injectedModules||(this.prototype.injectedModules=[]);for(var i=0;i<t.length;i++)-1===this.prototype.injectedModules.indexOf(t[i])&&this.prototype.injectedModules.push(t[i])},e.prototype.createElement=function(t,e,i){return w(t,e)},e.prototype.triggerStateChange=function(t,e){this.isReactHybrid&&(this.setState(),this.currentContext={calls:t,args:e})},e.prototype.injectModules=function(){this.injectedModules&&this.injectedModules.length&&this.moduleLoader.inject(this.requiredModules(),this.injectedModules)},e.prototype.detectFunction=function(t){var e=Object.keys(t);e.length&&(this[e[0]]=t[e[0]])},e.prototype.mergePersistData=function(){var t;c(t=Vi?window.localStorage.getItem(this.getModuleName()+this.element.id+this.ej2StatePersistenceVersion):window.localStorage.getItem(this.getModuleName()+this.element.id))||""===t||this.setProperties(JSON.parse(t),!0)},e.prototype.setPersistData=function(){this.isDestroyed||(Vi?window.localStorage.setItem(this.getModuleName()+this.element.id+this.ej2StatePersistenceVersion,this.getPersistData()):window.localStorage.setItem(this.getModuleName()+this.element.id,this.getPersistData()))},e.prototype.renderReactTemplates=function(){},e.prototype.clearTemplate=function(t,e){},e.prototype.getUniqueID=function(t){return this.isHistoryChanged()&&(Ni=0),vi=this.pageID(location.href),Fi=history.length,t+"_"+vi+"_"+Ni++},e.prototype.pageID=function(t){var e=0;if(0===t.length)return e;for(var i=0;i<t.length;i++){e=(e<<5)-e+t.charCodeAt(i),e&=e}return Math.abs(e)},e.prototype.isHistoryChanged=function(){return vi!==this.pageID(location.href)||Fi!==history.length},e.prototype.addOnPersist=function(t){for(var e=this,i={},r=0,n=t;r<n.length;r++){var a=n[r],l=void 0;p(l=o(a,this))||s(a,this.getActualProperties(l),i)}return JSON.stringify(i,function(t,i){return e.getActualProperties(i)})},e.prototype.getActualProperties=function(t){return t instanceof Di?o("properties",t):t},e.prototype.ignoreOnPersist=function(t){return JSON.stringify(this.iterateJsonProperties(this.properties,t))},e.prototype.iterateJsonProperties=function(t,e){for(var i={},r=function(r){if(-1===e.indexOf(r)){var o=t[r];if("object"!=typeof o||o instanceof Array)i[r]=o;else{var s=e.filter(function(t){return new RegExp(r+".").test(t)}).map(function(t){return t.replace(r+".","")});i[r]=n.iterateJsonProperties(n.getActualProperties(o),s)}}},n=this,o=0,s=Object.keys(t);o<s.length;o++){r(s[o])}return i},Ai([G(!1)],e.prototype,"enablePersistence",void 0),Ai([G()],e.prototype,"enableRtl",void 0),Ai([G()],e.prototype,"locale",void 0),e=Ai([U],e)}(xi);"undefined"!=typeof window&&window.addEventListener("popstate",function(){Ni=0});var Gi,_i=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Hi=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Wi={left:0,top:0,bottom:0,right:0},Ui={isDragged:!1},qi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return _i(e,t),Hi([G(0)],e.prototype,"left",void 0),Hi([G(0)],e.prototype,"top",void 0),e}(Di),Ki=function(t){function e(e,r){var n=t.call(this,r,e)||this;return n.dragLimit=i.getDefaultPosition(),n.borderWidth=i.getDefaultPosition(),n.padding=i.getDefaultPosition(),n.diffX=0,n.prevLeft=0,n.prevTop=0,n.dragProcessStarted=!1,n.eleTop=0,n.tapHoldTimer=0,n.externalInitialize=!1,n.diffY=0,n.parentScrollX=0,n.parentScrollY=0,n.droppables={},n.bind(),n}_i(e,t),i=e,e.prototype.bind=function(){this.toggleEvents(),wi.isIE&&S([this.element],"e-block-touch"),this.droppables[this.scope]={}},e.getDefaultPosition=function(){return u({},Wi)},e.prototype.toggleEvents=function(t){var e;p(this.handle)||(e=M(this.handle,this.element));var i=this.enableTapHold&&wi.isDevice&&wi.isTouch?this.mobileInitialize:this.initialize;t?Si.remove(e||this.element,wi.touchStartEvent,i):Si.add(e||this.element,wi.touchStartEvent,i,this)},e.prototype.mobileInitialize=function(t){var e=this,i=t.currentTarget;this.tapHoldTimer=setTimeout(function(){e.externalInitialize=!0,e.removeTapholdTimer(),e.initialize(t,i)},this.tapHoldThreshold),Si.add(document,wi.touchMoveEvent,this.removeTapholdTimer,this),Si.add(document,wi.touchEndEvent,this.removeTapholdTimer,this)},e.prototype.removeTapholdTimer=function(){clearTimeout(this.tapHoldTimer),Si.remove(document,wi.touchMoveEvent,this.removeTapholdTimer),Si.remove(document,wi.touchEndEvent,this.removeTapholdTimer)},e.prototype.getScrollableParent=function(t,e){return c(t)?null:t[{vertical:"scrollHeight",horizontal:"scrollWidth"}[e]]>t[{vertical:"clientHeight",horizontal:"clientWidth"}[e]]&&("vertical"===e?t.scrollTop>0:t.scrollLeft>0)?("vertical"===e?(this.parentScrollY=this.parentScrollY+(0===this.parentScrollY?t.scrollTop:t.scrollTop-this.parentScrollY),this.tempScrollHeight=t.scrollHeight):(this.parentScrollX=this.parentScrollX+(0===this.parentScrollX?t.scrollLeft:t.scrollLeft-this.parentScrollX),this.tempScrollWidth=t.scrollWidth),c(t)?t:this.getScrollableParent(t.parentNode,e)):this.getScrollableParent(t.parentNode,e)},e.prototype.getScrollableValues=function(){this.parentScrollX=0,this.parentScrollY=0;this.element.classList.contains("e-dialog")&&this.element.classList.contains("e-dlg-modal"),this.getScrollableParent(this.element.parentNode,"vertical"),this.getScrollableParent(this.element.parentNode,"horizontal")},e.prototype.initialize=function(t,e){if(this.currentStateTarget=t.target,!this.isDragStarted()){if(this.isDragStarted(!0),this.externalInitialize=!1,this.target=t.currentTarget||e,this.dragProcessStarted=!1,this.abort){var i=this.abort;"string"==typeof i&&(i=[i]);for(var r=0;r<i.length;r++)if(!c(E(t.target,i[r])))return void(this.isDragStarted()&&this.isDragStarted(!0))}this.preventDefault&&!p(t.changedTouches)&&"touchstart"!==t.type&&t.preventDefault(),this.element.setAttribute("aria-grabbed","true");var n=this.getCoordinates(t);if(this.initialPosition={x:n.pageX,y:n.pageY},!this.clone){var o=this.element.getBoundingClientRect();this.getScrollableValues(),t.clientX===t.pageX&&(this.parentScrollX=0),t.clientY===t.pageY&&(this.parentScrollY=0),this.relativeXPosition=n.pageX-(o.left+this.parentScrollX),this.relativeYPosition=n.pageY-(o.top+this.parentScrollY)}this.externalInitialize?this.intDragStart(t):(Si.add(document,wi.touchMoveEvent,this.intDragStart,this),Si.add(document,wi.touchEndEvent,this.intDestroy,this)),this.toggleEvents(!0),"touchstart"!==t.type&&this.isPreventSelect&&document.body.classList.add("e-prevent-select"),this.externalInitialize=!1,Si.trigger(document.documentElement,wi.touchStartEvent,t)}},e.prototype.intDragStart=function(t){this.removeTapholdTimer();var e=!p(t.changedTouches);if(!e||1===t.changedTouches.length){e&&t.preventDefault();var i,r=this.getCoordinates(t),n=getComputedStyle(this.element);this.margin={left:parseInt(n.marginLeft,10),top:parseInt(n.marginTop,10),right:parseInt(n.marginRight,10),bottom:parseInt(n.marginBottom,10)};var o=this.element;if(this.clone&&this.dragTarget){var s=E(t.target,this.dragTarget);c(s)||(o=s)}this.isReplaceDragEle&&(o=this.currentStateCheck(t.target,o)),this.offset=this.calculateParentPosition(o),this.position=this.getMousePosition(t,this.isDragScroll);var a=this.initialPosition.x-r.pageX,l=this.initialPosition.y-r.pageY;if(Math.sqrt(a*a+l*l)>=this.distance||this.externalInitialize){var h=this.getHelperElement(t);if(!h||c(h))return;var u=this.helperElement=h;if(this.parentClientRect=this.calculateParentPosition(u.offsetParent),this.dragStart){var d={event:t,element:o,target:this.getProperTargetElement(t),bindEvents:b()?this.bindDragEvents.bind(this):null,dragElement:u};this.trigger("dragStart",d)}this.dragArea?this.setDragArea():(this.dragLimit={left:0,right:0,bottom:0,top:0},this.borderWidth={top:0,left:0}),i={left:this.position.left-this.parentClientRect.left,top:this.position.top-this.parentClientRect.top},this.clone&&!this.enableTailMode&&(this.diffX=this.position.left-this.offset.left,this.diffY=this.position.top-this.offset.top),this.getScrollableValues();var f=getComputedStyle(o),g=parseFloat(f.marginTop);this.clone&&0!==g&&(i.top+=g),this.eleTop=isNaN(parseFloat(f.top))?0:parseFloat(f.top)-this.offset.top,this.enableScrollHandler&&!this.clone&&(i.top-=this.parentScrollY,i.left-=this.parentScrollX);var m=this.getProcessedPositionValue({top:i.top-this.diffY+"px",left:i.left-this.diffX+"px"});this.dragElePosition={top:i.top,left:i.left},j(u,this.getDragPosition({position:"absolute",left:m.left,top:m.top})),Si.remove(document,wi.touchMoveEvent,this.intDragStart),Si.remove(document,wi.touchEndEvent,this.intDestroy),b()||this.bindDragEvents(u)}}},e.prototype.bindDragEvents=function(t){x(t)?(Si.add(document,wi.touchMoveEvent,this.intDrag,this),Si.add(document,wi.touchEndEvent,this.intDragStop,this),this.setGlobalDroppables(!1,this.element,t)):(this.toggleEvents(),document.body.classList.remove("e-prevent-select"))},e.prototype.elementInViewport=function(t){for(this.top=t.offsetTop,this.left=t.offsetLeft,this.width=t.offsetWidth,this.height=t.offsetHeight;t.offsetParent;)t=t.offsetParent,this.top+=t.offsetTop,this.left+=t.offsetLeft;return this.top>=window.pageYOffset&&this.left>=window.pageXOffset&&this.top+this.height<=window.pageYOffset+window.innerHeight&&this.left+this.width<=window.pageXOffset+window.innerWidth},e.prototype.getProcessedPositionValue=function(t){return this.queryPositionInfo?this.queryPositionInfo(t):t},e.prototype.calculateParentPosition=function(t){if(c(t))return{left:0,top:0};var e=t.getBoundingClientRect(),i=getComputedStyle(t);return{left:e.left+window.pageXOffset-parseInt(i.marginLeft,10),top:e.top+window.pageYOffset-parseInt(i.marginTop,10)}},e.prototype.intDrag=function(t){if(p(t.changedTouches)||1===t.changedTouches.length){this.clone&&t.changedTouches&&wi.isDevice&&wi.isTouch&&t.preventDefault();var e,i;this.position=this.getMousePosition(t,this.isDragScroll);var r=this.getDocumentWidthHeight("Height");r<this.position.top&&(this.position.top=r);var n=this.getDocumentWidthHeight("Width");if(n<this.position.left&&(this.position.left=n),this.drag){var o=this.getProperTargetElement(t);this.trigger("drag",{event:t,element:this.element,target:o})}var s=this.checkTargetElement(t);if(s.target&&s.instance){var a=!0;this.hoverObject&&(this.hoverObject.instance!==s.instance?this.triggerOutFunction(t,s):a=!1),a&&(s.instance.dragData[this.scope]=this.droppables[this.scope],s.instance.intOver(t,s.target),this.hoverObject=s)}else this.hoverObject&&this.triggerOutFunction(t,s);var l=this.droppables[this.scope].helper;this.parentClientRect=this.calculateParentPosition(this.helperElement.offsetParent);var h=this.parentClientRect.left,u=this.parentClientRect.top,d=this.getCoordinates(t),f=d.pageX,g=d.pageY,m=this.position.left-this.diffX,y=this.position.top-this.diffY,b=getComputedStyle(l);if(this.dragArea){if(this.pageX!==f||this.skipDistanceCheck){var v=l.offsetWidth+(parseFloat(b.marginLeft)+parseFloat(b.marginRight));e=this.dragLimit.left>m&&m>0?this.dragLimit.left:this.dragLimit.right+window.pageXOffset<m+v&&m>0?m-(m-this.dragLimit.right)+window.pageXOffset-v:m<0?this.dragLimit.left:m}if(this.pageY!==g||this.skipDistanceCheck){var w=l.offsetHeight+(parseFloat(b.marginTop)+parseFloat(b.marginBottom));i=this.dragLimit.top>y&&y>0?this.dragLimit.top:this.dragLimit.bottom+window.pageYOffset<y+w&&y>0?y-(y-this.dragLimit.bottom)+window.pageYOffset-w:y<0?this.dragLimit.top:y}}else e=m,i=y;var S=u+this.borderWidth.top,P=h+this.borderWidth.left;this.dragProcessStarted&&(c(i)&&(i=this.prevTop),c(e)&&(e=this.prevLeft));var C,x;this.dragArea?(this.dragLimit.top=this.clone?this.dragLimit.top:0,C=i-S<0?this.dragLimit.top:i-S,x=e-P<0?this.dragElePosition.left:e-P):(C=i-S,x=e-P);var O=parseFloat(getComputedStyle(this.element).marginTop);if(O>0&&(this.clone&&(C+=O,y<0&&(O+y>=0?C=O+y:C-=O),C=this.dragLimit.bottom<C?this.dragLimit.bottom:C),i-S<0))if(y+O+(l.offsetHeight-S)>=0){var B=this.dragLimit.top+y-S;B+O+S<0?C-=O+S:C=B}else C-=O+S;this.enableScrollHandler&&!this.clone&&(C-=this.parentScrollY,x-=this.parentScrollX);var L=this.getProcessedPositionValue({top:C+"px",left:x+"px"});j(l,this.getDragPosition(L)),!this.elementInViewport(l)&&this.enableAutoScroll&&this.helperElement.scrollIntoView(),this.dragProcessStarted=!0,this.prevLeft=e,this.prevTop=i,this.position.left=e,this.position.top=i,this.pageX=f,this.pageY=g}},e.prototype.triggerOutFunction=function(t,e){this.hoverObject.instance.intOut(t,e.target),this.hoverObject.instance.dragData[this.scope]=null,this.hoverObject=null},e.prototype.getDragPosition=function(t){var e=u({},t);return this.axis&&("x"===this.axis?delete e.top:"y"===this.axis&&delete e.left),e},e.prototype.getDocumentWidthHeight=function(t){var e=document.body,i=document.documentElement;return Math.max(e["scroll"+t],i["scroll"+t],e["offset"+t],i["offset"+t],i["client"+t])},e.prototype.intDragStop=function(t){if(this.dragProcessStarted=!1,p(t.changedTouches)||1===t.changedTouches.length){if(-1!==["touchend","pointerup","mouseup"].indexOf(t.type)){if(this.dragStop){var e=this.getProperTargetElement(t);this.trigger("dragStop",{event:t,element:this.element,target:e,helper:this.helperElement})}this.intDestroy(t)}else this.element.setAttribute("aria-grabbed","false");var i=this.checkTargetElement(t);i.target&&i.instance&&(i.instance.dragStopCalled=!0,i.instance.dragData[this.scope]=this.droppables[this.scope],i.instance.intDrop(t,i.target)),this.setGlobalDroppables(!0),document.body.classList.remove("e-prevent-select")}},e.prototype.intDestroy=function(t){this.dragProcessStarted=!1,this.toggleEvents(),document.body.classList.remove("e-prevent-select"),this.element.setAttribute("aria-grabbed","false"),Si.remove(document,wi.touchMoveEvent,this.intDragStart),Si.remove(document,wi.touchEndEvent,this.intDragStop),Si.remove(document,wi.touchEndEvent,this.intDestroy),Si.remove(document,wi.touchMoveEvent,this.intDrag),this.isDragStarted()&&this.isDragStarted(!0)},e.prototype.onPropertyChanged=function(t,e){},e.prototype.getModuleName=function(){return"draggable"},e.prototype.isDragStarted=function(t){return t&&(Ui.isDragged=!Ui.isDragged),Ui.isDragged},e.prototype.setDragArea=function(){var t,e,i,r=0,n=0;if(i="string"===typeof this.dragArea?M(this.dragArea):this.dragArea){var o=i.getBoundingClientRect();t=i.scrollWidth?i.scrollWidth:o.right-o.left,e=i.scrollHeight?i.scrollHeight:o.bottom-o.top;for(var s=["Top","Left","Bottom","Right"],a=getComputedStyle(i),l=0;l<s.length;l++){var h=s[l],u=a["border"+h+"Width"],c=a["padding"+h],p=h.toLowerCase();this.borderWidth[p]=isNaN(parseFloat(u))?0:parseFloat(u),this.padding[p]=isNaN(parseFloat(c))?0:parseFloat(c)}r=o.top,n=o.left,this.dragLimit.left=n+this.borderWidth.left+this.padding.left,this.dragLimit.top=i.offsetTop+this.borderWidth.top+this.padding.top,this.dragLimit.right=n+t-(this.borderWidth.right+this.padding.right),this.dragLimit.bottom=r+e-(this.borderWidth.bottom+this.padding.bottom)}},e.prototype.getProperTargetElement=function(t){var e,i=this.getCoordinates(t),r=this.helperElement.style.pointerEvents||"";return g(t.target,this.helperElement)||-1!==t.type.indexOf("touch")?(this.helperElement.style.pointerEvents="none",e=document.elementFromPoint(i.clientX,i.clientY),this.helperElement.style.pointerEvents=r):e=t.target,e},e.prototype.currentStateCheck=function(t,e){return c(this.currentStateTarget)||this.currentStateTarget===t?c(e)?t:e:this.currentStateTarget},e.prototype.getMousePosition=function(t,e){var i,r,n=void 0!==t.srcElement?t.srcElement:t.target,o=this.getCoordinates(t),s=c(n.offsetParent);return e?(i=this.clone?o.pageX:o.pageX+(s?0:n.offsetParent.scrollLeft)-this.relativeXPosition,r=this.clone?o.pageY:o.pageY+(s?0:n.offsetParent.scrollTop)-this.relativeYPosition):(i=this.clone?o.pageX:o.pageX+window.pageXOffset-this.relativeXPosition,r=this.clone?o.pageY:o.pageY+window.pageYOffset-this.relativeYPosition),{left:i-(this.margin.left+this.cursorAt.left),top:r-(this.margin.top+this.cursorAt.top)}},e.prototype.getCoordinates=function(t){return t.type.indexOf("touch")>-1?t.changedTouches[0]:t},e.prototype.getHelperElement=function(t){var e;return this.clone?this.helper?e=this.helper({sender:t,element:this.target}):(e=w("div",{className:"e-drag-helper e-block-touch",innerHTML:"Draggable"}),document.body.appendChild(e)):e=this.element,e},e.prototype.setGlobalDroppables=function(t,e,i){this.droppables[this.scope]=t?null:{draggable:e,helper:i,draggedElement:this.element}},e.prototype.checkTargetElement=function(t){var e=this.getProperTargetElement(t),i=this.getDropInstance(e);if(!i&&e&&!c(e.parentNode)){var r=E(e.parentNode,".e-droppable")||e.parentElement;r&&(i=this.getDropInstance(r))}return{target:e,instance:i}},e.prototype.getDropInstance=function(t){var e,i=t&&t.ej2_instances;if(i)for(var r=0,n=i;r<n.length;r++){var o=n[r];if("droppable"===o.getModuleName()){e=o;break}}return e},e.prototype.destroy=function(){this.toggleEvents(!0),t.prototype.destroy.call(this)};var i;return Hi([_({},qi)],e.prototype,"cursorAt",void 0),Hi([G(!0)],e.prototype,"clone",void 0),Hi([G()],e.prototype,"dragArea",void 0),Hi([G()],e.prototype,"isDragScroll",void 0),Hi([G()],e.prototype,"isReplaceDragEle",void 0),Hi([G(!0)],e.prototype,"isPreventSelect",void 0),Hi([W()],e.prototype,"drag",void 0),Hi([W()],e.prototype,"dragStart",void 0),Hi([W()],e.prototype,"dragStop",void 0),Hi([G(1)],e.prototype,"distance",void 0),Hi([G()],e.prototype,"handle",void 0),Hi([G()],e.prototype,"abort",void 0),Hi([G()],e.prototype,"helper",void 0),Hi([G("default")],e.prototype,"scope",void 0),Hi([G("")],e.prototype,"dragTarget",void 0),Hi([G()],e.prototype,"axis",void 0),Hi([G()],e.prototype,"queryPositionInfo",void 0),Hi([G(!1)],e.prototype,"enableTailMode",void 0),Hi([G(!1)],e.prototype,"skipDistanceCheck",void 0),Hi([G(!0)],e.prototype,"preventDefault",void 0),Hi([G(!1)],e.prototype,"enableAutoScroll",void 0),Hi([G(!1)],e.prototype,"enableTapHold",void 0),Hi([G(750)],e.prototype,"tapHoldThreshold",void 0),Hi([G(!1)],e.prototype,"enableScrollHandler",void 0),e=i=Hi([U],e)}(xi),Yi=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),$i=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Ji=function(t){function e(e,i){var r=t.call(this,i,e)||this;return r.mouseOver=!1,r.dragData={},r.dragStopCalled=!1,r.bind(),r}return Yi(e,t),e.prototype.bind=function(){this.wireEvents()},e.prototype.wireEvents=function(){Si.add(this.element,wi.touchEndEvent,this.intDrop,this)},e.prototype.onPropertyChanged=function(t,e){},e.prototype.getModuleName=function(){return"droppable"},e.prototype.intOver=function(t,e){if(!this.mouseOver){var i=this.dragData[this.scope];this.trigger("over",{event:t,target:e,dragData:i}),this.mouseOver=!0}},e.prototype.intOut=function(t,e){this.mouseOver&&(this.trigger("out",{evt:t,target:e}),this.mouseOver=!1)},e.prototype.intDrop=function(t,e){if(this.dragStopCalled){this.dragStopCalled=!1;var i,r=!0,n=this.dragData[this.scope],o=!!n&&(n.helper&&x(n.helper));o&&(i=this.isDropArea(t,n.helper,e),this.accept&&(r=I(n.helper,this.accept))),o&&this.drop&&i.canDrop&&r&&this.trigger("drop",{event:t,target:i.target,droppedElement:n.helper,dragData:n}),this.mouseOver=!1}},e.prototype.isDropArea=function(t,e,i){var r={canDrop:!0,target:i||t.target},n="touchend"===t.type;if(n||r.target===e){e.style.display="none";var o=n?t.changedTouches[0]:t,s=document.elementFromPoint(o.clientX,o.clientY);r.canDrop=!1,r.canDrop=g(s,this.element),r.canDrop&&(r.target=s),e.style.display=""}return r},e.prototype.destroy=function(){Si.remove(this.element,wi.touchEndEvent,this.intDrop),t.prototype.destroy.call(this)},$i([G()],e.prototype,"accept",void 0),$i([G("default")],e.prototype,"scope",void 0),$i([W()],e.prototype,"drop",void 0),$i([W()],e.prototype,"over",void 0),$i([W()],e.prototype,"out",void 0),e=$i([U],e)}(xi),Xi=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Qi=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Zi={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,space:32,escape:27,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,semicolon:186,plus:187,comma:188,minus:189,dot:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},tr=function(t){function e(e,r){var n=t.call(this,r,e)||this;return n.keyPressHandler=function(t){for(var e=t.altKey,r=t.ctrlKey,o=t.shiftKey,s=t.which,a=0,l=Object.keys(n.keyConfigs);a<l.length;a++)for(var h=l[a],u=0,c=n.keyConfigs[h].split(",");u<c.length;u++){var p=c[u],d=i.getKeyConfigData(p.trim());e===d.altKey&&r===d.ctrlKey&&o===d.shiftKey&&s===d.keyCode&&(t.action=h,n.keyAction&&n.keyAction(t))}},n.bind(),n}Xi(e,t),i=e,e.prototype.destroy=function(){this.unwireEvents(),t.prototype.destroy.call(this)},e.prototype.onPropertyChanged=function(t,e){},e.prototype.bind=function(){this.wireEvents()},e.prototype.getModuleName=function(){return"keyboard"},e.prototype.wireEvents=function(){this.element.addEventListener(this.eventName,this.keyPressHandler)},e.prototype.unwireEvents=function(){this.element.removeEventListener(this.eventName,this.keyPressHandler)},e.getKeyConfigData=function(t){if(t in this.configCache)return this.configCache[t];var e=t.toLowerCase().split("+"),r={altKey:-1!==e.indexOf("alt"),ctrlKey:-1!==e.indexOf("ctrl"),shiftKey:-1!==e.indexOf("shift"),keyCode:null};return e[e.length-1].length>1&&Number(e[e.length-1])?r.keyCode=Number(e[e.length-1]):r.keyCode=i.getKeyCode(e[e.length-1]),i.configCache[t]=r,r},e.getKeyCode=function(t){return Zi[t]||t.toUpperCase().charCodeAt(0)};var i;return e.configCache={},Qi([G({})],e.prototype,"keyConfigs",void 0),Qi([G("keyup")],e.prototype,"eventName",void 0),Qi([W()],e.prototype,"keyAction",void 0),e=i=Qi([U],e)}(xi),er=function(){function t(t,e,i){this.controlName=t,this.localeStrings=e,this.setLocale(i||ii)}return t.prototype.setLocale=function(e){var i=this.intGetControlConstant(t.locale,e);this.currentLocale=i||this.localeStrings},t.load=function(t){this.locale=u(this.locale,t,{},!0)},t.prototype.getConstant=function(t){return c(this.currentLocale[t])?this.localeStrings[t]||"":this.currentLocale[t]},t.prototype.intGetControlConstant=function(t,e){return t[e]?t[e][this.controlName]:null},t.locale={},t}(),ir=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rr=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},nr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ir(e,t),rr([G(50)],e.prototype,"swipeThresholdDistance",void 0),e}(Di),or=/(Up|Down)/,sr=function(t){function e(e,i){var r=t.call(this,i,e)||this;return r.touchAction=!0,r.tapCount=0,r.startEvent=function(t){if(!0===r.touchAction){var e=r.updateChangeTouches(t);void 0!==t.changedTouches&&(r.touchAction=!1),r.isTouchMoved=!1,r.movedDirection="",r.startPoint=r.lastMovedPoint={clientX:e.clientX,clientY:e.clientY},r.startEventData=e,r.hScrollLocked=r.vScrollLocked=!1,r.tStampStart=Date.now(),r.timeOutTapHold=setTimeout(function(){r.tapHoldEvent(t)},r.tapHoldThreshold),Si.add(r.element,wi.touchMoveEvent,r.moveEvent,r),Si.add(r.element,wi.touchEndEvent,r.endEvent,r),Si.add(r.element,wi.touchCancelEvent,r.cancelEvent,r)}},r.moveEvent=function(t){var e=r.updateChangeTouches(t);r.movedPoint=e,r.isTouchMoved=!(e.clientX===r.startPoint.clientX&&e.clientY===r.startPoint.clientY);var i={};if(r.isTouchMoved){clearTimeout(r.timeOutTapHold),r.calcScrollPoints(t);i=u(i,{},{startEvents:r.startEventData,originalEvent:t,startX:r.startPoint.clientX,startY:r.startPoint.clientY,distanceX:r.distanceX,distanceY:r.distanceY,scrollDirection:r.scrollDirection,velocity:r.getVelocity(e)}),r.trigger("scroll",i),r.lastMovedPoint={clientX:e.clientX,clientY:e.clientY}}},r.cancelEvent=function(t){clearTimeout(r.timeOutTapHold),clearTimeout(r.timeOutTap),r.tapCount=0,r.swipeFn(t),Si.remove(r.element,wi.touchCancelEvent,r.cancelEvent)},r.endEvent=function(t){r.swipeFn(t),r.isTouchMoved||"function"==typeof r.tap&&(r.trigger("tap",{originalEvent:t,tapCount:++r.tapCount}),r.timeOutTap=setTimeout(function(){r.tapCount=0},r.tapThreshold)),r.modeclear()},r.swipeFn=function(t){clearTimeout(r.timeOutTapHold),clearTimeout(r.timeOutTap);var e=r.updateChangeTouches(t),i=e.clientX-r.startPoint.clientX,n=e.clientY-r.startPoint.clientY;i=Math.floor(i<0?-1*i:i),n=Math.floor(n<0?-1*n:i),r.isTouchMoved=i>1||n>1,r.endPoint=e,r.calcPoints(t);var o={originalEvent:t,startEvents:r.startEventData,startX:r.startPoint.clientX,startY:r.startPoint.clientY,distanceX:r.distanceX,distanceY:r.distanceY,swipeDirection:r.movedDirection,velocity:r.getVelocity(e)};if(r.isTouchMoved){var s=void 0,a=r.swipeSettings.swipeThresholdDistance;s=u(s,r.defaultArgs,o);var l=!1,h=r.element,c=r.isScrollable(h),p=or.test(r.movedDirection);(a<r.distanceX&&!p||a<r.distanceY&&p)&&(l=!c||r.checkSwipe(h,p)),l&&r.trigger("swipe",s)}r.modeclear()},r.modeclear=function(){r.modeClear=setTimeout(function(){r.touchAction=!0},"function"!=typeof r.tap?0:20),r.lastTapTime=(new Date).getTime(),Si.remove(r.element,wi.touchMoveEvent,r.moveEvent),Si.remove(r.element,wi.touchEndEvent,r.endEvent),Si.remove(r.element,wi.touchCancelEvent,r.cancelEvent)},r.bind(),r}return ir(e,t),e.prototype.onPropertyChanged=function(t,e){},e.prototype.bind=function(){this.wireEvents(),wi.isIE&&this.element.classList.add("e-block-touch")},e.prototype.destroy=function(){this.unwireEvents(),t.prototype.destroy.call(this)},e.prototype.wireEvents=function(){Si.add(this.element,wi.touchStartEvent,this.startEvent,this)},e.prototype.unwireEvents=function(){Si.remove(this.element,wi.touchStartEvent,this.startEvent)},e.prototype.getModuleName=function(){return"touch"},e.prototype.isScrollable=function(t){var e=getComputedStyle(t),i=e.overflow+e.overflowX+e.overflowY;return!!/(auto|scroll)/.test(i)},e.prototype.tapHoldEvent=function(t){this.tapCount=0,this.touchAction=!0;var e;Si.remove(this.element,wi.touchMoveEvent,this.moveEvent),Si.remove(this.element,wi.touchEndEvent,this.endEvent),e={originalEvent:t},this.trigger("tapHold",e),Si.remove(this.element,wi.touchCancelEvent,this.cancelEvent)},e.prototype.calcPoints=function(t){var e=this.updateChangeTouches(t);this.defaultArgs={originalEvent:t},this.distanceX=Math.abs(Math.abs(e.clientX)-Math.abs(this.startPoint.clientX)),this.distanceY=Math.abs(Math.abs(e.clientY)-Math.abs(this.startPoint.clientY)),this.distanceX>this.distanceY?this.movedDirection=e.clientX>this.startPoint.clientX?"Right":"Left":this.movedDirection=e.clientY<this.startPoint.clientY?"Up":"Down"},e.prototype.calcScrollPoints=function(t){var e=this.updateChangeTouches(t);this.defaultArgs={originalEvent:t},this.distanceX=Math.abs(Math.abs(e.clientX)-Math.abs(this.lastMovedPoint.clientX)),this.distanceY=Math.abs(Math.abs(e.clientY)-Math.abs(this.lastMovedPoint.clientY)),(this.distanceX>this.distanceY||!0===this.hScrollLocked)&&!1===this.vScrollLocked?(this.scrollDirection=e.clientX>this.lastMovedPoint.clientX?"Right":"Left",this.hScrollLocked=!0):(this.scrollDirection=e.clientY<this.lastMovedPoint.clientY?"Up":"Down",this.vScrollLocked=!0)},e.prototype.getVelocity=function(t){var e=t.clientX,i=t.clientY,r=Date.now(),n=e-this.startPoint.clientX,o=i-this.startPoint.clientX,s=r-this.tStampStart;return Math.sqrt(n*n+o*o)/s},e.prototype.checkSwipe=function(t,e){var i=["scroll","offset"],r=e?["Height","Top"]:["Width","Left"];return t[i[0]+r[0]]<=t[i[1]+r[0]]||(0===t[i[0]+r[1]]||t[i[1]+r[0]]+t[i[0]+r[1]]>=t[i[0]+r[0]])},e.prototype.updateChangeTouches=function(t){return t.changedTouches&&0!==t.changedTouches.length?t.changedTouches[0]:t},rr([W()],e.prototype,"tap",void 0),rr([W()],e.prototype,"tapHold",void 0),rr([W()],e.prototype,"swipe",void 0),rr([W()],e.prototype,"scroll",void 0),rr([G(350)],e.prototype,"tapThreshold",void 0),rr([G(750)],e.prototype,"tapHoldThreshold",void 0),rr([_({},nr)],e.prototype,"swipeSettings",void 0),e=rr([U],e)}(xi),ar=new RegExp("\\n|\\r|\\s\\s+","g"),lr=new RegExp(/'|"/g),hr=new RegExp("if ?\\("),ur=new RegExp("else if ?\\("),cr=new RegExp("else"),pr=new RegExp("for ?\\("),dr=new RegExp("(/if|/for)"),fr=new RegExp("\\((.*)\\)",""),gr=new RegExp("^[0-9]+$","g"),mr=new RegExp("[\\w\"'.\\s+]+","g"),yr=new RegExp('"(.*?)"',"g"),br=new RegExp("[\\w\"'@#$.\\s-+]+","g"),vr=new RegExp("\\${([^}]*)}","g"),wr=/^\..*/gm,Sr=/\\/gi,Pr=/\\\\/gi,Cr=new RegExp("[\\w\"'@#$.\\s+]+","g"),xr=/\window\./gm,Or=/^[\n\r.]+<tr|^<tr/,Br=/^[\n\r.]+<svg|^<path|^<g/,Lr={},Tr={compile:(new(function(){function t(){}return t.prototype.compile=function(t,e,i){return void 0===e&&(e={}),et(t,e)},t}())).compile},Mr=["script","style","iframe[src]",'link[href*="javascript:"]','object[type="text/x-scriptlet"]','object[data^="data:text/html;base64"]','img[src^="data:text/html;base64"]','[src^="javascript:"]','[dynsrc^="javascript:"]','[lowsrc^="javascript:"]','[type^="application/x-shockwave-flash"]'],Dr=[{attribute:"href",selector:'[href*="javascript:"]'},{attribute:"background",selector:'[background^="javascript:"]'},{attribute:"style",selector:'[style*="javascript:"]'},{attribute:"style",selector:'[style*="expression("]'},{attribute:"href",selector:'a[href^="data:text/html;base64"]'}],kr=["onchange","onclick","onmouseover","onmouseout","onkeydown","onload","onerror","onblur","onfocus","onbeforeload","onbeforeunload","onkeyup","onsubmit","onafterprint","onbeforeonload","onbeforeprint","onblur","oncanplay","oncanplaythrough","onchange","onclick","oncontextmenu","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onerror","onfocus","onformchange","onforminput","onhaschange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onoffline","onoine","ononline","onpagehide","onpageshow","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreadystatechange","onredo","onresize","onscroll","onseeked","onseeking","onselect","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","onundo","onunload","onvolumechange","onwaiting","onmouseenter","onmouseleave","onmousewheel","onstart","onpropertychange"],Er=function(){function t(){}return t.beforeSanitize=function(){return{selectors:{tags:Mr,attributes:Dr}}},t.sanitize=function(t){var e=this.beforeSanitize();return this.serializeValue(e,t)},t.serializeValue=function(t,e){this.removeAttrs=t.selectors.attributes,this.removeTags=t.selectors.tags,this.wrapElement=document.createElement("div"),this.wrapElement.innerHTML=e,this.removeXssTags(),this.removeJsEvents(),this.removeXssAttrs();var i=this.wrapElement.innerHTML;return this.removeElement(),i.replace("&","&")},t.removeElement=function(){for(var t=this.wrapElement.children,e=0;e<t.length;e++)for(var i=t[e].attributes,r=0;r<i.length;r++)this.wrapElement.children[e].removeAttribute(i[r].localName)},t.removeXssTags=function(){var t=this.wrapElement.querySelectorAll(this.removeTags.join(","));t.length>0&&t.forEach(function(t){B(t)})},t.removeJsEvents=function(){var t=this.wrapElement.querySelectorAll("["+kr.join("],[")+"]");t.length>0&&t.forEach(function(t){kr.forEach(function(e){t.hasAttribute(e)&&t.removeAttribute(e)})})},t.removeXssAttrs=function(){var t=this;this.removeAttrs.forEach(function(e,i){var r=t.wrapElement.querySelectorAll(e.selector);r.length>0&&r.forEach(function(t){t.removeAttribute(e.attribute)})})},t}(),jr=Object.freeze({blazorCultureFormats:si,get IntlBase(){return Ae},Ajax:hi,Animation:Li,rippleEffect:function(t,e,i){var r=function(t){return{selector:t&&t.selector?t.selector:null,ignore:t&&t.ignore?t.ignore:null,rippleFlag:t&&t.rippleFlag,isCenterRipple:t&&t.isCenterRipple,duration:t&&t.duration?t.duration:350}}(e);return!1===r.rippleFlag||void 0===r.rippleFlag&&!Ti?function(){}:(t.setAttribute("data-ripple","true"),Si.add(t,"mousedown",$,{parent:t,rippleOptions:r}),Si.add(t,"mouseup",J,{parent:t,rippleOptions:r,done:i}),Si.add(t,"mouseleave",X,{parent:t,rippleOptions:r}),wi.isPointer&&Si.add(t,"transitionend",X,{parent:t,rippleOptions:r}),function(){t.removeAttribute("data-ripple"),Si.remove(t,"mousedown",$),Si.remove(t,"mouseup",J),Si.remove(t,"mouseleave",X),Si.remove(t,"transitionend",X)})},get isRippleEnabled(){return Ti},enableRipple:function(t){return Ti=t},Base:xi,getComponent:R,removeChildInstance:function(t){for(var e=[].slice.call(t.getElementsByClassName("e-control")),i=0;i<e.length;i++){var r=e[i].classList[1].split("e-")[1],n=R(e[i],r);p(n)||n.destroy()}},Browser:wi,get versionBasedStatePersistence(){return Vi},enableVersionBasedPersistence:function(t){Vi=t},Component:zi,ChildProperty:Di,Position:qi,Draggable:Ki,Droppable:Ji,EventHandler:Si,onIntlChange:Ze,get rightToLeft(){return ti},cldrData:ei,get defaultCulture(){return ii},get defaultCurrencyCode(){return ri},Internationalization:oi,setCulture:function(t){ii=t,Ze.notify("notifyExternalChange",{locale:ii})},setCurrencyCode:function(t){ri=t,Ze.notify("notifyExternalChange",{currencyCode:ri})},loadCldr:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=0,r=t;i<r.length;i++){var n=r[i];u(ei,n,{},!0)}},enableRtl:function(t){void 0===t&&(t=!0),ti=t,Ze.notify("notifyExternalChange",{enableRtl:ti})},getNumericObject:function(t,e){var i=Ae.getDependables(ei,t,"",!0)[ni[0]],r=Ae.getDependables(ei,t,"")[ni[1]],n=o("defaultNumberingSystem",i),s=b()?o("numberSymbols",i):o("symbols-numberSystem-"+n,i),a=Ae.getSymbolPattern(e||"decimal",n,i,!1);return u(s,Ae.getFormatData(a,!0,"",!0),{dateSeparator:Ae.getDateSeparator(r)})},getNumberDependable:function(t,e){var i=Ae.getDependables(ei,t,"",!0);return Ae.getCurrencySymbol(i.numericObject,e)},getDefaultDateObject:function(t){return Ae.getDependables(ei,"",t,!1)[ni[1]]},KeyboardEvents:tr,L10n:er,ModuleLoader:Mi,Property:G,Complex:_,ComplexFactory:function(t){return function(e,i){var r={set:function(t,e,i){return function(r){var n=i(r,this);A(this,e,t,n).setProperties(r)}}({},i,t),get:function(t,e,i){return function(){var r=i({});return this.properties.hasOwnProperty(e)?this.properties[e]:A(this,e,t,r)}}({},i,t),enumerable:!0,configurable:!0};Object.defineProperty(e,i,r),q(e,i,"complexProp",{},t)}},Collection:H,CollectionFactory:function(t){return function(e,i){var r={set:function(t,e,i){return function(r){var n=this.properties.hasOwnProperty(e)?this.properties[e]:t,o=N(this,e,r,i,!0,!0);this.saveChanges(e,o,n),this.properties[e]=o}}([],i,t),get:function(t,e,i){return function(){var r=i({});if(!this.properties.hasOwnProperty(e)){var n=N(this,e,t,r,!1);this.properties[e]=n}return this.properties[e]}}([],i,t),enumerable:!0,configurable:!0};Object.defineProperty(e,i,r),q(e,i,"colProp",{},t)}},Event:W,NotifyPropertyChanges:U,CreateBuilder:function(t){var e=function(t){return this.element=t,this};return function(i){return e.prototype.hasOwnProperty("create")||((e.prototype=K(t)).create=function(){var e=u({},{},this.properties);return this.properties={},new t(e,this.element)}),new e(i)}},SwipeSettings:nr,Touch:sr,get HijriParser(){return Oe},blazorTemplates:Lr,getRandomId:st,compile:at,updateBlazorTemplate:lt,resetBlazorTemplate:ht,setTemplateEngine:ut,getTemplateEngine:ct,disableBlazorMode:function(){Me=!1},createInstance:r,setImmediate:n,getValue:o,setValue:s,deleteObject:a,containerObject:De,isObject:l,getEnumValue:function(t,e){return t[e]},merge:h,extend:u,isNullOrUndefined:c,isUndefined:p,getUniqueID:d,debounce:f,queryParams:function(t){for(var e=[],i=0,r=Object.keys(t);i<r.length;i++){var n=r[i];e.push(encodeURIComponent(n)+"="+encodeURIComponent(""+t[n]))}return e.join("&")},isObjectArray:function(t){var e=Object.prototype.toString;return"[object Array]"===e.call(t)&&"[object Object]"===e.call(t[0])},compareElementParent:g,throwError:m,print:y,formatUnit:function(t){var e=t+"";return e.match(/auto|cm|mm|in|px|pt|pc|%|em|ex|ch|rem|vw|vh|vmin|vmax/)?e:e+"px"},enableBlazorMode:function(){Me=!0},isBlazor:b,getElement:function(t){return t instanceof Node||!b()||c(t.xPath)?t:document.evaluate(t.xPath,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue},getInstance:function(t,e){var i="string"==typeof t?document.querySelector(t):t;if(i[Le])for(var r=0,n=i[Le];r<n.length;r++){var o=n[r];if(o instanceof e)return o}return null},addInstance:function(t,e){var i="string"==typeof t?document.querySelector(t):t;i[Le]?i[Le].push(e):i[Le]=[e]},uniqueID:v,createElement:w,addClass:S,removeClass:P,isVisible:x,prepend:function(t,e,i){for(var r=document.createDocumentFragment(),n=0,o=t;n<o.length;n++){var s=o[n];r.appendChild(s)}return e.insertBefore(r,e.firstElementChild),i&&O(e),t},append:function(t,e,i){for(var r=document.createDocumentFragment(),n=0,o=t;n<o.length;n++){var s=o[n];r.appendChild(s)}return e.appendChild(r),i&&O(e),t},detach:B,remove:L,attributes:T,select:M,selectAll:D,closest:E,siblings:function(t){for(var e=[],i=0,r=Array.prototype.slice.call(t.parentNode.childNodes);i<r.length;i++){var n=r[i];n.nodeType===Node.ELEMENT_NODE&&t!==n&&e.push(n)}return e},getAttributeOrDefault:function(t,e,i){var r,n=l(t);return r=n?o("attributes."+e,t):t.getAttribute(e),c(r)&&i&&(n?t.attributes[e]=i:t.setAttribute(e,i.toString()),r=i),r},setStyleAttribute:j,classList:function(t,e,i){S([t],e),P([t],i)},matches:I,includeInnerHTML:function(t,e){t.innerHTML=e},containsClass:function(t,e){return l(t)?new RegExp("\\b"+e+"\\b","i").test(t.attributes.className):t.classList.contains(e)},cloneNode:function(t,e){return l(t)?e?u({},{},t,!0):void 0:t.cloneNode(e)},Observer:Qe,SanitizeHtmlHelper:Er,registerLicense:tt,validateLicense:Ii,getVersion:function(){return ji.version}}),Ir=function(){function t(t){this.svgLink="http://www.w3.org/2000/svg",this.rootId=t}return t.prototype.getOptionValue=function(t,e){return t[e]},t.prototype.createSvg=function(t){return c(t.id)&&(t.id=this.rootId+"_svg"),this.svgObj=document.getElementById(t.id),c(document.getElementById(t.id))&&(this.svgObj=document.createElementNS(this.svgLink,"svg")),this.svgObj=this.setElementAttributes(t,this.svgObj),this.setSVGSize(t.width,t.height),this.svgObj},t.prototype.setSVGSize=function(t,e){var i=document.getElementById(this.rootId),r=c(i)?null:i.getBoundingClientRect();c(this.width)||this.width<=0?this.svgObj.setAttribute("width",t?t.toString():r.width.toString()):this.svgObj.setAttribute("width",this.width.toString()),c(this.height)||this.height<=0?this.svgObj.setAttribute("height",e?e.toString():"450"):this.svgObj.setAttribute("height",this.height.toString())},t.prototype.drawPath=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"path")),e=this.setElementAttributes(t,e)},t.prototype.drawLine=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"line")),e=this.setElementAttributes(t,e)},t.prototype.drawRectangle=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"rect")),e=this.setElementAttributes(t,e)},t.prototype.drawCircle=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"circle")),e=this.setElementAttributes(t,e)},t.prototype.drawPolyline=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polyline")),e=this.setElementAttributes(t,e)},t.prototype.drawEllipse=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"ellipse")),e=this.setElementAttributes(t,e)},t.prototype.drawPolygon=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polygon")),e=this.setElementAttributes(t,e)},t.prototype.drawImage=function(t){var e=document.createElementNS(this.svgLink,"image");return e.setAttributeNS(null,"height",t.height.toString()),e.setAttributeNS(null,"width",t.width.toString()),e.setAttributeNS("http://www.w3.org/1999/xlink","href",t.href),e.setAttributeNS(null,"x",t.x.toString()),e.setAttributeNS(null,"y",t.y.toString()),e.setAttributeNS(null,"id",t.id),e.setAttributeNS(null,"visibility",t.visibility),c(this.getOptionValue(t,"clip-path"))||e.setAttributeNS(null,"clip-path",this.getOptionValue(t,"clip-path")),c(t.preserveAspectRatio)||e.setAttributeNS(null,"preserveAspectRatio",t.preserveAspectRatio),e},t.prototype.createText=function(t,e){var i=document.createElementNS(this.svgLink,"text");return i=this.setElementAttributes(t,i),c(e)||(i.textContent=e),i},t.prototype.createTSpan=function(t,e){var i=document.createElementNS(this.svgLink,"tspan");return i=this.setElementAttributes(t,i),c(e)||(i.textContent=e),i},t.prototype.createTitle=function(t){var e=document.createElementNS(this.svgLink,"title");return e.textContent=t,e},t.prototype.createDefs=function(){return document.createElementNS(this.svgLink,"defs")},t.prototype.createClipPath=function(t){var e=document.createElementNS(this.svgLink,"clipPath");return e=this.setElementAttributes(t,e)},t.prototype.createForeignObject=function(t){var e=document.createElementNS(this.svgLink,"foreignObject");return e=this.setElementAttributes(t,e)},t.prototype.createGroup=function(t){var e=document.createElementNS(this.svgLink,"g");return e=this.setElementAttributes(t,e)},t.prototype.createPattern=function(t,e){var i=document.createElementNS(this.svgLink,e);return i=this.setElementAttributes(t,i)},t.prototype.createRadialGradient=function(t,e,i){var r;if(c(t[0].colorStop))r=t[0].color.toString();else{var n={id:this.rootId+"_"+e+"radialGradient",cx:i.cx+"%",cy:i.cy+"%",r:i.r+"%",fx:i.fx+"%",fy:i.fy+"%"};this.drawGradient("radialGradient",n,t),r="url(#"+this.rootId+"_"+e+"radialGradient)"}return r},t.prototype.createLinearGradient=function(t,e,i){var r;if(c(t[0].colorStop))r=t[0].color.toString();else{var n={id:this.rootId+"_"+e+"linearGradient",x1:i.x1+"%",y1:i.y1+"%",x2:i.x2+"%",y2:i.y2+"%"};this.drawGradient("linearGradient",n,t),r="url(#"+this.rootId+"_"+e+"linearGradient)"}return r},t.prototype.drawGradient=function(t,e,i){var r=this.createDefs(),n=document.createElementNS(this.svgLink,t);n=this.setElementAttributes(e,n);for(var o=0;o<i.length;o++){var s=document.createElementNS(this.svgLink,"stop");s.setAttribute("offset",i[o].colorStop),s.setAttribute("stop-color",i[o].color),s.setAttribute("stop-opacity",i[o].opacity?i[o].opacity:"1"),c(i[o].style)||(s.style.cssText=i[o].style),n.appendChild(s)}return r.appendChild(n),r},t.prototype.drawClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Rect";var r=this.drawRectangle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.drawCircularClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Circle";var r=this.drawCircle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.setElementAttributes=function(t,e){for(var i=Object.keys(t),r=0;r<i.length;r++)"style"===i[r]?e.style.cssText=t[i[r]]:e.setAttribute(i[r],t[i[r]]);return e},t.prototype.createCanvas=function(){return null},t}(),Rr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ar=function(){return function(t,e){this.width=t,this.height=e}}(),Nr=function(){return function(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}}(),Fr=function(){return function(t,e){this.isRight=e,this.isBottom=t}}(),Vr=function(){return function(t){this.id=t}}(),zr=function(t){function e(e,i,r,n,o,s,a,l){void 0===s&&(s="");var h=t.call(this,e)||this;return h.transform="",h.baseLine="auto",h.labelRotation=0,h.x=i,h.y=r,h.anchor=n,h.text=o,h.transform=s,h.baseLine=a,h.labelRotation=l,h}return Rr(e,t),e}(Vr),Gr=function(t){function e(e,i,r,n,o,s,a){var l=t.call(this,e)||this;return l.opacity=o,l.fill=i,l.stroke=n,l["stroke-width"]=r,l["stroke-dasharray"]=s,l.d=a,l}return Rr(e,t),e}(Vr),_r=function(){return function(t,e){this.x=t,this.y=e}}(),Hr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Wr=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Ur=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hr(e,t),Wr([G(null)],e.prototype,"size",void 0),Wr([G("")],e.prototype,"color",void 0),Wr([G("Segoe UI")],e.prototype,"fontFamily",void 0),Wr([G("Normal")],e.prototype,"fontWeight",void 0),Wr([G("Normal")],e.prototype,"fontStyle",void 0),Wr([G(1)],e.prototype,"opacity",void 0),e}(Di),qr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hr(e,t),Wr([G("")],e.prototype,"color",void 0),Wr([G(1)],e.prototype,"width",void 0),Wr([G("")],e.prototype,"dashArray",void 0),e}(Di),Kr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hr(e,t),Wr([G(0)],e.prototype,"x",void 0),Wr([G(0)],e.prototype,"y",void 0),Wr([G(0)],e.prototype,"width",void 0),Wr([G(0)],e.prototype,"height",void 0),e}(Di),Yr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hr(e,t),Wr([G(0)],e.prototype,"x",void 0),Wr([G(0)],e.prototype,"y",void 0),e}(Di),$r=function(t){function e(e,i){return t.call(this,e,i)||this}return Hr(e,t),e.prototype.preRender=function(){this.allowServerDataBinding=!1,this.initPrivateVariable(),this.isCanvas||this.removeSVG(),this.createTooltipElement()},e.prototype.initPrivateVariable=function(){this.renderer=new Ir(this.element.id),this.themeStyle=function(t){var e;switch(t){case"Highcontrast":case"HighContrast":e={tooltipFill:"#ffffff",tooltipBoldLabel:"#000000",tooltipLightLabel:"#000000",tooltipHeaderLine:"#969696"};break;case"MaterialDark":case"FabricDark":case"BootstrapDark":e={tooltipFill:"#F4F4F4",tooltipBoldLabel:"#282727",tooltipLightLabel:"#333232",tooltipHeaderLine:"#9A9A9A"};break;case"Bootstrap4":e={tooltipFill:"#020202",tooltipBoldLabel:"rgba(255, 255, 255)",tooltipLightLabel:"rgba(255, 255, 255, 0.9)",tooltipHeaderLine:"rgba(255, 255, 255, 0.2)"};break;case"Tailwind":e={tooltipFill:"#111827",tooltipBoldLabel:"#D1D5DB",tooltipLightLabel:"#F9FAFB",tooltipHeaderLine:"#6B7280"};break;case"TailwindDark":e={tooltipFill:"#F9FAFB",tooltipBoldLabel:"#6B7280",tooltipLightLabel:"#1F2937",tooltipHeaderLine:"#9CA3AF"};break;case"Bootstrap5":e={tooltipFill:"#212529",tooltipBoldLabel:"#F9FAFB",tooltipLightLabel:"#F9FAFB",tooltipHeaderLine:"#9CA3AF"};break;case"Bootstrap5Dark":e={tooltipFill:"#E9ECEF",tooltipBoldLabel:"#212529",tooltipLightLabel:"#212529",tooltipHeaderLine:"#ADB5BD"};break;case"Fluent":e={tooltipFill:"#FFFFFF",tooltipBoldLabel:"#323130",tooltipLightLabel:"#323130",tooltipHeaderLine:"#D2D0CE"};break;case"FluentDark":e={tooltipFill:"#252423",tooltipBoldLabel:"#F3F2F1",tooltipLightLabel:"#F3F2F1",tooltipHeaderLine:"#3B3A39"};break;default:e={tooltipFill:"#000816",tooltipBoldLabel:"#ffffff",tooltipLightLabel:"#dbdbdb",tooltipHeaderLine:"#ffffff"}}return e}(this.theme),this.formattedText=[],this.padding=5,this.areaMargin=10,this.isFirst=!0,this.markerPoint=[]},e.prototype.removeSVG=function(){var t=document.getElementById(this.element.id+"_svg"),e=document.getElementById(this.element.id+"parent_template");this.blazorTemplate&&ht(this.element.id+"parent_template_blazorTemplate"),t&&t.parentNode&&L(t),e&&e.parentNode&&L(e)},e.prototype.render=function(){if(this.fadeOuted=!1,this.template)this.updateTemplateFn(),this.createTemplate(this.areaBounds,this.location);else{this.renderText(this.isFirst);var t={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",t);var e=this.renderTooltipElement(this.areaBounds,this.location);this.drawMarker(e.isBottom,e.isRight,this.markerSize)}this.trigger("loaded",{tooltip:this});var i=document.getElementById("chartmeasuretext");i&&L(i),this.allowServerDataBinding=!0},e.prototype.createTooltipElement=function(){if(this.textElements=[],!this.template||this.shared){this.enableRTL&&this.element.setAttribute("dir","ltr");var t=this.renderer.createSvg({id:this.element.id+"_svg"});this.element.appendChild(t);var e=document.getElementById(this.element.id+"_group");e||(e=this.renderer.createGroup({id:this.element.id+"_group"})).setAttribute("transform","translate(0,0)"),t.appendChild(e);var i=this.renderer.drawPath({id:this.element.id+"_path","stroke-width":this.border.width,fill:this.fill||this.themeStyle.tooltipFill,opacity:"TailwindDark"!==this.theme&&"Tailwind"!==this.theme&&"Bootstrap5"!==this.theme&&"Bootstrap5Dark"!==this.theme||.75!==this.opacity?this.opacity:1,stroke:this.border.color});e.appendChild(i)}},e.prototype.drawMarker=function(t,e,i){if(this.shapes.length<=0)return null;for(var r,n=0,o=this.renderer.createGroup({id:this.element.id+"_trackball_group"}),s=mt(this.element.id+"_group"),a=(this.enableRTL?this.elementSize.width-i/2:2*this.marginX+i/2)+(e?this.arrowPadding:0),l=0,h=this.shapes;l<h.length;l++){var u=h[l];"None"!==u&&(r=new Gr(this.element.id+"_Trackball_"+n,this.palette[n],1,"#cccccc",1,null),this.markerPoint[n]&&o.appendChild(bt(new _r(a,this.markerPoint[n]-this.padding+(t?this.arrowPadding:0)),u,new Ar(i,i),"",r,null)),n++)}s.appendChild(o)},e.prototype.renderTooltipElement=function(t,e){var i,r=mt(this.element.id),n=new _r(0,0),o=new _r(0,0),s=mt(this.element.id+"_svg"),a=mt(this.element.id+"_group"),l=mt(this.element.id+"_path"),h=!1,u=!1,p=!1,d=0,f=0;if(""!==this.header&&(this.elementSize.height+=this.marginY),this.content.length>1?(i=this.sharedTooltipLocation(t,this.location.x,this.location.y),h=!0):(i=this.tooltipLocation(t,e,n,o),this.inverted?d=(u=i.x<e.x+this.clipBounds.x)?0:this.arrowPadding:(p=!(h=i.y<e.y+this.clipBounds.y),f=h?0:this.arrowPadding)),""!==this.header){var g=2,m=this.isWrap?this.wrappedText:this.header;if(this.isWrap&&"string"==typeof m&&(m.indexOf("<")>-1||m.indexOf(">")>-1)){g=m.split("<br>").length}var y=ft(this.isWrap?this.wrappedText:this.header,this.textStyle).height+this.marginY*g+(p?this.arrowPadding:0)+(this.isWrap?5:0),b="M "+(3*this.marginX+(u||h||p?0:this.arrowPadding))+" "+y+"L "+(i.width+(u||h||p?0:this.arrowPadding)-2*this.marginX)+" "+y,v=this.renderer.drawPath({id:this.element.id+"_header_path","stroke-width":1,fill:null,opacity:.8,stroke:this.themeStyle.tooltipHeaderLine,d:b});a.appendChild(v)}var w=this.border.width/2,S=new Nr(w+d,w+f,i.width-w,i.height-w);if(a.setAttribute("opacity","1"),!this.enableAnimation||this.isFirst||this.crosshair?this.updateDiv(r,i.x,i.y):this.animateTooltipDiv(r,i),s.setAttribute("height",(i.height+this.border.width+(this.inverted?0:this.arrowPadding)+5).toString()),s.setAttribute("width",(i.width+this.border.width+(this.inverted?this.arrowPadding:0)+5).toString()),s.setAttribute("opacity","1"),c(this.tooltipPlacement)||(h=this.tooltipPlacement.indexOf("Top")>-1,p=this.tooltipPlacement.indexOf("Bottom")>-1,u=this.tooltipPlacement.indexOf("Left")>-1),l.setAttribute("d",function(t,e,i,r,n,o,s,a,l,h,u){void 0===u&&(u="");var c="",p=i.x,d=i.y,f=i.x+i.width,g=i.y+i.height;return o?(c=(c=c.concat("M "+p+" "+(d+e)+" Q "+p+" "+d+" "+(p+t)+" "+d+" L "+(f-t)+" "+d+" Q "+f+" "+d+" "+f+" "+(d+e))).concat(" L "+f+" "+(g-e)+" Q "+f+" "+g+" "+(f-t)+" "+g),0!==n&&(c="RangeNavigator"===u?r.x-n>f/2?(c=c.concat(" L "+(r.x+n)+" "+g)).concat(" L "+(l+n)+" "+(g+n)+" L "+r.x+" "+g):(c=c.concat(" L "+r.x+" "+g)).concat(" L "+(l-n)+" "+(g+n)+" L "+(r.x-n)+" "+g):(c=c.concat(" L "+(r.x+n)+" "+g)).concat(" L "+l+" "+(g+n)+" L "+(r.x-n)+" "+g)),c=r.x-n>p?c.concat(" L "+(p+t)+" "+g+" Q "+p+" "+g+" "+p+" "+(g-e)+" z"):0===n?c.concat(" L "+(p+t)+" "+g+" Q "+p+" "+g+" "+p+" "+(g-e)+" z"):c.concat(" L "+p+" "+(g+e)+" z")):s?c=(c=(c=(c=(c=c.concat("M "+p+" "+(d+e)+" Q "+p+" "+d+" "+(p+t)+" "+d+" L "+(r.x-n)+" "+d)).concat(" L "+l+" "+r.y)).concat(" L "+(r.x+n)+" "+d)).concat(" L "+(f-t)+" "+d+" Q "+f+" "+d+" "+f+" "+(d+e))).concat(" L "+f+" "+(g-e)+" Q "+f+" "+g+" "+(f-t)+" "+g+" L "+(p+t)+" "+g+" Q "+p+" "+g+" "+p+" "+(g-e)+" z"):a?(c=(c=c.concat("M "+p+" "+(d+e)+" Q "+p+" "+d+" "+(p+t)+" "+d)).concat(" L "+(f-t)+" "+d+" Q "+f+" "+d+" "+f+" "+(d+e)+" L "+f+" "+(r.y-n)),c="RangeNavigator"===u?c.concat(" L "+(f+n)+" "+(h-n)):c.concat(" L "+(f+n)+" "+h),c=(c=(c="RangeNavigator"===u?c.concat(" L "+f+" "+r.y):c.concat(" L "+f+" "+(r.y+n))).concat(" L "+f+" "+(g-e)+" Q "+f+" "+g+" "+(f-t)+" "+g)).concat(" L "+(p+t)+" "+g+" Q "+p+" "+g+" "+p+" "+(g-e)+" z")):(c=c.concat("M "+(p+t)+" "+d+" Q "+p+" "+d+" "+p+" "+(d+e)+" L "+p+" "+(r.y-n)),c="RangeNavigator"===u?c.concat(" L "+(p-n)+" "+(h-n)):c.concat(" L "+(p-n)+" "+h),c=(c=(c="RangeNavigator"===u?c.concat(" L "+p+" "+r.y):c.concat(" L "+p+" "+(r.y+n))).concat(" L "+p+" "+(g-e)+" Q "+p+" "+g+" "+(p+t)+" "+g)).concat(" L "+(f-t)+" "+g+" Q "+f+" "+g+" "+f+" "+(g-e)+" L "+f+" "+(d+e)+" Q "+f+" "+d+" "+(f-t)+" "+d+" z")),c}(this.rx,this.ry,S,n,this.arrowPadding,h,p,u,o.x,o.y,this.controlName)),this.enableShadow&&"Bootstrap4"!==this.theme){var P=this.element.id+"_shadow";"Tailwind"===this.theme||"TailwindDark"===this.theme||"Bootstrap5"===this.theme||"Bootstrap5Dark"===this.theme?l.setAttribute("box-shadow","0px 1px 2px rgba(0, 0, 0, 0.06), 0px 1px 3px rgba(0, 0, 0, 0.1)"):l.setAttribute("filter",wi.isIE?"":"url(#"+P+")");var C='<filter id="'+P+'" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="3"/>';C+='<feOffset dx="3" dy="3" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="0.5"/>',C+='</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';var x=this.renderer.createDefs();x.setAttribute("id",this.element.id+"SVG_tooltip_definition"),a.appendChild(x),x.innerHTML=C}var O="Fluent"===this.theme?"#FFFFFF":"FluentDark"===this.theme?"#323130":this.border.color;return l.setAttribute("stroke",O),c(this.border.dashArray)||l.setAttribute("stroke-dasharray",this.border.dashArray),this.changeText(new _r(d,f),p,!u&&!h&&!p),this.revert&&(this.inverted=!this.inverted,this.revert=!1),new Fr(p,!u&&!h&&!p)},e.prototype.changeText=function(t,e,i){var r=document.getElementById(this.element.id+"_text");e&&r.setAttribute("transform","translate(0,"+this.arrowPadding+")"),i&&r.setAttribute("transform","translate("+this.arrowPadding+" 0)")},e.prototype.findFormattedText=function(){this.formattedText=[],""!==this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim()&&(this.formattedText=this.formattedText.concat(this.header)),this.formattedText=this.formattedText.concat(this.content)},e.prototype.renderText=function(t){var e,i,r,n,o,s=0,a=0,l=0,h=u({},this.textStyle,null,!0).properties,c=mt(this.element.id+"_group"),p="";this.findFormattedText(),this.isWrap=!1;var d="rtl"===document.body.getAttribute("dir")&&!this.enableRTL?"end":"start";this.leftSpace=this.areaBounds.x+this.location.x,this.rightSpace=this.areaBounds.x+this.areaBounds.width-this.leftSpace;var f=this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim(),g=this.header.indexOf("<b>")>-1&&this.header.indexOf("</b>")>-1,m=ft(this.formattedText[0],h).width+2*this.marginX+this.arrowPadding,y=this.location.x-m<this.location.x,b=this.areaBounds.x+this.areaBounds.width<this.location.x+m,v=""!==f?this.marginY:0,w=!0,S=!0;this.markerPoint=[];var P,C=this.shapes.length>0?10:0,x=this.shapes.length>0?5:0,O="Normal",B=this.themeStyle.tooltipLightLabel,L=22/parseFloat("13px")*parseFloat(h.size),T=[];t&&!this.isCanvas||(yt(this.element.id+"_text"),yt(this.element.id+"_header_path"),yt(this.element.id+"_trackball_group"),yt(this.element.id+"SVG_tooltip_definition"));for(var M=new zr(this.element.id+"_text",2*this.marginX,2*this.marginY+2*this.padding+(2===this.marginY?3:0),d,""),D=function(t,e,i,r){var n={},o=new Ir("");n={id:t.id,x:t.x,y:t.y,fill:i,"font-size":e.size,"font-style":e.fontStyle,"font-family":e.fontFamily,"font-weight":e.fontWeight,"text-anchor":t.anchor,transform:t.transform,opacity:e.opacity,"dominant-baseline":t.baseLine};var s="string"==typeof t.text?t.text:t.text[0],a=o.createText(n,s);return a.style.fontFamily=e.fontFamily,a.style.fontStyle=e.fontStyle,a.style.fontSize=e.size,a.style.fontWeight=e.fontWeight,a.style.color=e.color,r.appendChild(a),a}(M,h,null,c),k=1===this.formattedText.length&&this.formattedText[0].indexOf(" : <b>")>-1,E=""!==this.header,j=E&&g?16:13,I=0,R=this.formattedText.length;I<R;I++)if(r=this.formattedText[I].replace(/<(b|strong)>/g,"<b>").replace(/<\/(b|strong)>/g,"</b>").split(/<br.*?>/g),0===I&&!k&&this.isTextWrap&&(this.leftSpace<m||y)&&(this.rightSpace<m||b)&&(P=Math.round(this.leftSpace>this.rightSpace?this.leftSpace/j:this.rightSpace/j),r=(""!==f?f:this.formattedText[I]).match(new RegExp(".{1,"+P+"}","g")),this.wrappedText=g?"<b>"+r.join("<br>")+"</b>":r.join("<br>"),this.isWrap=r.length>1),""!==r[0]){0===I&&""!==f||this.markerPoint.push((""!==f?this.marginY:0)+M.y+s);for(var A=0,N=r.length;A<N;A++){e=r[A].replace(/<b>/g,"<br><b>").replace(/<\/b>/g,"</b><br>").replace(/:/g,this.enableRTL?"<br>: <br>":"<br>:<br>").split("<br>"),this.enableRTL&&e.length>0&&r[A].match(/:/g)&&(e[0]=e[0].trim(),e.reverse()),l=0,S=!0,s+=L;for(var F=0,V=e.length;F<V;F++)n=e[F],this.enableRTL&&""!==n&&this.isRTLText(n)&&(n=n.concat("")),/\S/.test(n)||""===n||(n=" "),(!S&&" "===n||""!==n.replace(/<b>/g,"").replace(/<\/b>/g,"").trim())&&(l+=" "!==n?4:0,S&&!w?(o={x:2*this.marginX+(C+x),dy:L+(S?v:0),fill:""},v=null):o=w&&S?{x:""===f?2*this.marginX+(C+x):2*this.marginX+(this.isWrap?C+x:0)}:{},S=!1,i=this.renderer.createTSpan(o,""),D.appendChild(i),n.indexOf("<b>")>-1||g&&0===F&&0===I&&(E||this.isWrap)?(O="bold",B=this.themeStyle.tooltipBoldLabel,p="font-weight:"+O,h.fontWeight=O,i.setAttribute("fill",this.textStyle.color||B)):(p="bold"===O?"font-weight:"+O:"",h.fontWeight=O,i.setAttribute("fill",this.textStyle.color||B)),(n.indexOf("</b>")>-1||g&&F===V-1&&0===I&&(E||this.isWrap))&&(O="Normal",B=this.themeStyle.tooltipLightLabel),i.textContent=n=this.getTooltipTextContent(n),l+=ft(n,h).width,""!==p&&(i.style.fontWeight=p.split("font-weight:")[1],i.style.color=i.getAttribute("fill")),i.style.fontFamily="inherit",i.style.fontStyle="inherit",i.style.fontSize="inherit",w=!1);l-=4,a=Math.max(a,l),T.push(l)}}this.elementSize=new Ar(a+(a>0?2*this.marginX:0),s),this.elementSize.width+=C+x;var z=D.childNodes[0];if(""!==f&&z&&!this.isWrap){h.fontWeight="bold";var G=(this.elementSize.width+2*this.padding)/2-ft(f,h).width/2;z.setAttribute("x",G.toString())}this.renderContentRTL(D,E,C+x,T)},e.prototype.renderContentRTL=function(t,e,i,r){if(this.enableRTL)for(var n=void 0,o=e?1:0,s=0;s<t.childNodes.length;s++)n=t.childNodes[s],e&&!(s>0)||c(n.getAttribute("x"))||(n.setAttribute("x",(this.elementSize.width-(i+r[o])).toString()),o++)},e.prototype.getTooltipTextContent=function(t){var e=t.match(/<[a-zA-Z\/](.|\n)*?>/g);if(c(e))return t;for(var i=this.isRTLText(t),r=0;r<e.length;r++)this.isValidHTMLElement(e[r].replace("<","").replace("/","").replace(">","").trim())&&(t=t.replace(e[r],i?"":""));return t},e.prototype.isValidHTMLElement=function(t){return"[object HTMLUnknownElement]"!=document.createElement(t).toString()},e.prototype.isRTLText=function(t){return/[\u0590-\u07FF\u200F\u202B\u202E\uFB1D-\uFDFD\uFE70-\uFEFC]/.test(t)},e.prototype.createTemplate=function(t,e){var i={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",i);var r=document.getElementById(this.element.id);this.isCanvas&&this.removeSVG();var n=r.firstElementChild;if(n&&L(n),i.cancel)L(mt(this.element.id+"_tooltip"));else{for(var o=w("div",{id:this.element.id+"parent_template"}),s=this.templateFn(this.data,this.controlInstance,o.id,o.id+"_blazorTemplate","");s&&s.length>0;)b()||1===s.length?(o.appendChild(s[0]),s=null):o.appendChild(s[0]);r.appendChild(o);var a=this.isCanvas?o:this.element,l=a.getBoundingClientRect();this.padding=0,this.elementSize=new Ar(l.width,l.height);var h=this.shared?this.sharedTooltipLocation(t,this.location.x,this.location.y):this.tooltipLocation(t,e,new _r(0,0),new _r(0,0));if(!this.enableAnimation||this.isFirst||this.crosshair?this.updateDiv(a,h.x,h.y):this.animateTooltipDiv(this.element,h),this.blazorTemplate){var u=function(){var i=mt(c.element.id).getBoundingClientRect();c.elementSize=new Ar(i.width,i.height);var r=c.tooltipLocation(t,e,new _r(0,0),new _r(0,0));c.updateDiv(mt(c.element.id),r.x,r.y)},c=this;u.bind(c,t,e),lt(this.element.id+"parent_template_blazorTemplate",this.blazorTemplate.name,this.blazorTemplate.parent,void 0,u)}}},e.prototype.sharedTooltipLocation=function(t,e,i){var r=this.elementSize.width+2*this.marginX,n=this.elementSize.height+2*this.marginY,o=new Nr(e+2*this.padding,i-n-this.padding,r,n);return o.y<t.y&&(o.y+=o.height+2*this.padding),o.x+o.width>t.x+t.width&&(o.x-=o.width+4*this.padding),o},e.prototype.getCurrentPosition=function(t,e,i,r){var n=this.tooltipPlacement,o=this.clipBounds.x,s=this.clipBounds.y,a=this.offset,l=this.elementSize.width+2*this.marginX,h=this.elementSize.height+2*this.marginY,u=new _r(e.x,e.y);return"Top"===n||"Bottom"===n?(u=new _r(u.x+o-this.elementSize.width/2-this.padding,u.y+s-this.elementSize.height-2*this.padding-this.arrowPadding-a),i.x=r.x=l/2,"Bottom"===n&&(u.y=e.y+s+a),t.x+t.width<u.x+l?(u.x=t.width>l?t.x+t.width-l+6:t.x,i.x=r.x=t.width>l?t.x+e.x-u.x:e.x):t.x>u.x&&(u.x=t.x,i.x=r.x=e.x)):(u=new _r(u.x+o+a,u.y+s-this.elementSize.height/2-this.padding),i.y=r.y=h/2,"Left"===n&&(u.x=e.x+o-a-(l+this.arrowPadding)),t.y+t.height<u.y+h?(u.y=t.height>h?t.y+t.height-h+6:t.y,i.y=r.y=t.height>h?t.y+e.y-u.y:e.y):t.y>u.y&&(u.y=t.y,i.y=r.y=e.y)),new Nr(u.x,u.y,l,h)},e.prototype.tooltipLocation=function(t,e,i,r){if(!c(this.tooltipPlacement)){return this.getCurrentPosition(t,e,i,r)}var n=new _r(e.x,e.y),o=this.elementSize.width+2*this.marginX,s=this.elementSize.height+2*this.marginY,a=this.offset,l=this.clipBounds.x,h=this.clipBounds.y,u=t.x,p=t.y;return this.outOfBounds=!1,this.inverted?(n=new _r(n.x+l+a,n.y+h-this.elementSize.height/2-this.padding),i.y=r.y=s/2,(n.x+o+this.arrowPadding>u+t.width||this.isNegative)&&(n.x=(e.x>t.width+t.x?t.width:e.x)+l-a-(o+this.arrowPadding)),n.x<u&&(n.x=(e.x<0?0:e.x)+l+a),n.y<=p&&(i.y-=p-n.y,r.y-=p-n.y,n.y=p),n.y+s>=p+t.height&&(i.y+=n.y+s-(p+t.height),r.y+=n.y+s-(p+t.height),n.y-=n.y+s-(p+t.height)),i.y+this.arrowPadding>s-this.ry&&(i.y=s-this.ry-this.arrowPadding,r.y=s),i.y-this.arrowPadding<this.ry&&(i.y=r.y=this.ry+this.arrowPadding),"Chart"===this.controlName&&((n.y+i.y<this.areaMargin+this.arrowPadding||t.y+t.height-(n.y+i.y)<this.areaMargin+this.arrowPadding)&&(this.outOfBounds=!0),gt(n.x,n.y,t)&&!this.outOfBounds||(this.inverted=!this.inverted,n=new _r(e.x+l-this.padding-this.elementSize.width/2,e.y+h-this.elementSize.height-2*this.padding-a-this.arrowPadding),this.revert=!0,r.x=i.x=o/2,r.y=i.y=0,(n.y<p||this.isNegative)&&(n.y=(e.y<0?0:e.y)+a+h),n.y+this.arrowPadding+s>p+t.height&&(n.y=Math.min(e.y,p+t.height)+h-this.elementSize.height-2*this.padding-a-this.arrowPadding),r.x=o/2,n.x<u&&(r.x-=u-n.x,i.x-=u-n.x,n.x=u),n.x+o>t.width+u&&(i.x+=n.x+o-(t.width+u),r.x+=n.x+o-(t.width+u),n.x-=n.x+o-(t.width+u)),this.arrowPadding+i.x>o-this.rx&&(r.x=o-this.rx-this.arrowPadding,i.x=o-this.rx-this.arrowPadding),i.x-this.arrowPadding<this.rx&&(i.x=r.x=this.rx+this.arrowPadding)))):(n=new _r(n.x+l-this.elementSize.width/2-this.padding,n.y+h-this.elementSize.height-2*this.padding-this.arrowPadding-a),i.x=r.x=o/2,(n.y<p||this.isNegative)&&(n.y=(e.y<0?0:e.y)+h+a),n.y+s+this.arrowPadding>p+t.height&&(n.y=Math.min(e.y,p+t.height)+h-this.elementSize.height-2*this.padding-this.arrowPadding-a),r.x=o/2,n.x<u&&(i.x-=u-n.x,r.x-=u-n.x,n.x=u),n.x+o>u+t.width&&(i.x+=n.x+o-(u+t.width),r.x+=n.x+o-(u+t.width),n.x-=n.x+o-(u+t.width)),i.x+this.arrowPadding>o-this.rx&&(i.x=o-this.rx-this.arrowPadding,r.x=o-this.rx-this.arrowPadding),i.x-this.arrowPadding<this.rx&&(i.x=r.x=this.rx+this.arrowPadding),"Chart"===this.controlName&&((t.x+t.width-(n.x+i.x)<this.areaMargin+this.arrowPadding||n.x+i.x<this.areaMargin+this.arrowPadding)&&(this.outOfBounds=!0),gt(n.x,n.y,t)&&!this.outOfBounds||(this.inverted=!this.inverted,this.revert=!0,n=new _r(e.x+a+l,e.y+h-this.elementSize.height/2-this.padding),r.x=i.x=0,r.y=i.y=s/2,(n.x+this.arrowPadding+o>u+t.width||this.isNegative)&&(n.x=(e.x>t.width?t.width:e.x)+l-a-(this.arrowPadding+o)),n.x<u&&(n.x=(e.x<0?0:e.x)+a+l),n.y<=p&&(r.y-=p-n.y,i.y-=p-n.y,n.y=p),n.y+s>=t.height+p&&(i.y+=n.y+s-(t.height+p),r.y+=n.y+s-(t.height+p),n.y-=n.y+s-(t.height+p)),this.arrowPadding+i.y>s-this.ry&&(i.y=s-this.arrowPadding-this.ry,r.y=s),i.y-this.arrowPadding<this.ry&&(i.y=this.arrowPadding+this.ry,r.y=0)))),new Nr(n.x,n.y,o,s)},e.prototype.animateTooltipDiv=function(t,e){var i,r=this,n=parseFloat(t.style.left),o=parseFloat(t.style.top);new Li({}).animate(t,{duration:this.duration,progress:function(s){i=s.timeStamp/s.duration,t.style.animation=null,"Chart"===r.controlName&&r.shared&&!r.enableRTL?(t.style.transition="transform 0.1s",t.style.transform="translate("+(n+i*(e.x-n))+"px,"+(o+i*(e.y-o))+"px)"):(t.style.left=n+i*(e.x-n)+"px",t.style.top=o+i*(e.y-o)+"px")},end:function(i){r.updateDiv(t,e.x,e.y),r.trigger("animationComplete",{tooltip:r})}})},e.prototype.updateDiv=function(t,e,i){"Chart"!==this.controlName||!this.shared||this.crosshair||this.enableRTL?(t.style.left=e+"px",t.style.top=i+"px"):t.style.transform="translate("+e+"px,"+i+"px)"},e.prototype.updateTemplateFn=function(){if(this.template)try{document.querySelectorAll(this.template).length?this.templateFn=at(document.querySelector(this.template).innerHTML.trim()):this.templateFn=at(this.template)}catch(t){this.templateFn=at(this.template)}},e.prototype.fadeOut=function(){var t=this,e=this.isCanvas&&!this.template?mt(this.element.id+"_svg"):mt(this.element.id),i=mt(this.element.id);if(e){var r=e.firstChild;if(r.nodeType!=Node.ELEMENT_NODE&&(r=e.firstElementChild),this.isCanvas&&!this.template&&(r=document.getElementById(this.element.id+"_group")?document.getElementById(this.element.id+"_group"):r),!r)return null;var n=parseFloat(r.getAttribute("opacity"));n=c(n)?1:n,new Li({}).animate(r,{duration:200,progress:function(e){t.progressAnimation(r,n,e.timeStamp/e.duration)},end:function(){t.fadeOuted=!0,t.endAnimation(r),i.style.transition=""}})}},e.prototype.progressAnimation=function(t,e,i){t.style.animation="",t.setAttribute("opacity",(e-i).toString())},e.prototype.endAnimation=function(t){t.setAttribute("opacity","0"),this.template&&(t.style.display="none"),this.trigger("animationComplete",{tooltip:this})},e.prototype.getPersistData=function(){return this.addOnPersist([])},e.prototype.getModuleName=function(){return"tooltip"},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.element.classList.remove("e-tooltip")},e.prototype.onPropertyChanged=function(t,e){this.blazorTemplate&&ht(this.element.id+"parent_template_blazorTemplate"),this.isFirst=!1,this.render()},Wr([G(!1)],e.prototype,"enable",void 0),Wr([G(!1)],e.prototype,"shared",void 0),Wr([G(!1)],e.prototype,"crosshair",void 0),Wr([G(!0)],e.prototype,"enableShadow",void 0),Wr([G(null)],e.prototype,"fill",void 0),Wr([G("")],e.prototype,"header",void 0),Wr([G(.75)],e.prototype,"opacity",void 0),Wr([_({size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},Ur)],e.prototype,"textStyle",void 0),Wr([G(null)],e.prototype,"template",void 0),Wr([G(!0)],e.prototype,"enableAnimation",void 0),Wr([G(300)],e.prototype,"duration",void 0),Wr([G(!1)],e.prototype,"inverted",void 0),Wr([G(!1)],e.prototype,"isNegative",void 0),Wr([_({color:"#cccccc",width:.5},qr)],e.prototype,"border",void 0),Wr([G([])],e.prototype,"content",void 0),Wr([G(10)],e.prototype,"markerSize",void 0),Wr([_({x:0,y:0},Yr)],e.prototype,"clipBounds",void 0),Wr([G([])],e.prototype,"palette",void 0),Wr([G([])],e.prototype,"shapes",void 0),Wr([_({x:0,y:0},Yr)],e.prototype,"location",void 0),Wr([G(0)],e.prototype,"offset",void 0),Wr([G(4)],e.prototype,"rx",void 0),Wr([G(4)],e.prototype,"ry",void 0),Wr([G(5)],e.prototype,"marginX",void 0),Wr([G(5)],e.prototype,"marginY",void 0),Wr([G(7)],e.prototype,"arrowPadding",void 0),Wr([G(null)],e.prototype,"data",void 0),Wr([G("Material")],e.prototype,"theme",void 0),Wr([_({x:0,y:0,width:0,height:0},Kr)],e.prototype,"areaBounds",void 0),Wr([G(null)],e.prototype,"availableSize",void 0),Wr([G()],e.prototype,"blazorTemplate",void 0),Wr([G(!1)],e.prototype,"isCanvas",void 0),Wr([G(!1)],e.prototype,"isTextWrap",void 0),Wr([G(null)],e.prototype,"tooltipPlacement",void 0),Wr([G(null)],e.prototype,"controlInstance",void 0),Wr([G("")],e.prototype,"controlName",void 0),Wr([W()],e.prototype,"tooltipRender",void 0),Wr([W()],e.prototype,"loaded",void 0),Wr([W()],e.prototype,"animationComplete",void 0),Wr([G(!1)],e.prototype,"enableRTL",void 0),e=Wr([U],e)}(zi),Jr="beforePrint",Xr="itemRendering",Qr="drillStart",Zr="itemSelected",tn="itemHighlight",en="tooltipRendering",rn="doubleClick",nn="rightClick",on="legendItemRendering",sn="legendRendering",an="Roboto, Segoe UI, Noto, Sans-serif",ln=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),hn=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},un=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ln(e,t),hn([G("#808080")],e.prototype,"color",void 0),hn([G(0)],e.prototype,"width",void 0),e}(Di),cn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ln(e,t),hn([G(10)],e.prototype,"left",void 0),hn([G(10)],e.prototype,"right",void 0),hn([G(10)],e.prototype,"top",void 0),hn([G(10)],e.prototype,"bottom",void 0),e}(Di),pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ln(e,t),hn([G(null)],e.prototype,"size",void 0),hn([G(null)],e.prototype,"color",void 0),hn([G(an)],e.prototype,"fontFamily",void 0),hn([G("Normal")],e.prototype,"fontWeight",void 0),hn([G("Normal")],e.prototype,"fontStyle",void 0),hn([G(1)],e.prototype,"opacity",void 0),e}(Di),dn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ln(e,t),hn([G("")],e.prototype,"text",void 0),hn([G("")],e.prototype,"description",void 0),e}(Di),fn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ln(e,t),hn([_({size:"14px"},pn)],e.prototype,"textStyle",void 0),hn([G("Center")],e.prototype,"alignment",void 0),e}(dn),gn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ln(e,t),hn([_({size:"15px"},pn)],e.prototype,"textStyle",void 0),hn([G("Center")],e.prototype,"alignment",void 0),hn([_({},fn)],e.prototype,"subtitleSettings",void 0),e}(dn),mn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ln(e,t),hn([G(null)],e.prototype,"from",void 0),hn([G(null)],e.prototype,"to",void 0),hn([G(null)],e.prototype,"color",void 0),hn([G(null)],e.prototype,"label",void 0),hn([G(null)],e.prototype,"value",void 0),hn([G(null)],e.prototype,"minOpacity",void 0),hn([G(null)],e.prototype,"maxOpacity",void 0),hn([G(!0)],e.prototype,"showLegend",void 0),e}(Di),yn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ln(e,t),hn([G(!1)],e.prototype,"visible",void 0),hn([G("Default")],e.prototype,"mode",void 0),hn([G("transparent")],e.prototype,"background",void 0),hn([G("Circle")],e.prototype,"shape",void 0),hn([G("")],e.prototype,"width",void 0),hn([G("")],e.prototype,"height",void 0),hn([_({size:"13px"},pn)],e.prototype,"textStyle",void 0),hn([G(null)],e.prototype,"fill",void 0),hn([G(1)],e.prototype,"opacity",void 0),hn([G(15)],e.prototype,"shapeWidth",void 0),hn([G(15)],e.prototype,"shapeHeight",void 0),hn([G(10)],e.prototype,"shapePadding",void 0),hn([G(null)],e.prototype,"imageUrl",void 0),hn([_({color:"#000000",width:0},un)],e.prototype,"border",void 0),hn([_({color:"#000000",width:0},un)],e.prototype,"shapeBorder",void 0),hn([_({},dn)],e.prototype,"title",void 0),hn([_({size:"14px"},pn)],e.prototype,"titleStyle",void 0),hn([G("Bottom")],e.prototype,"position",void 0),hn([G("None")],e.prototype,"orientation",void 0),hn([G(!1)],e.prototype,"invertedPointer",void 0),hn([G("After")],e.prototype,"labelPosition",void 0),hn([G("None")],e.prototype,"labelDisplayMode",void 0),hn([G("Center")],e.prototype,"alignment",void 0),hn([G({x:0,y:0})],e.prototype,"location",void 0),hn([G(null)],e.prototype,"showLegendPath",void 0),hn([G(null)],e.prototype,"valuePath",void 0),hn([G(!1)],e.prototype,"removeDuplicateLegend",void 0),e}(Di),bn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ln(e,t),hn([G(null)],e.prototype,"groupIndex",void 0),hn([G(null)],e.prototype,"groupName",void 0),e}(Di),vn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ln(e,t),hn([G(null)],e.prototype,"fill",void 0),hn([G(!1)],e.prototype,"autoFill",void 0),hn([_({},un)],e.prototype,"border",void 0),hn([G(0)],e.prototype,"gap",void 0),hn([G(10)],e.prototype,"padding",void 0),hn([G(1)],e.prototype,"opacity",void 0),hn([G(!0)],e.prototype,"showLabels",void 0),hn([G(null)],e.prototype,"labelPath",void 0),hn([G(null)],e.prototype,"labelFormat",void 0),hn([G("TopLeft")],e.prototype,"labelPosition",void 0),hn([_({color:null,size:"12px"},pn)],e.prototype,"labelStyle",void 0),hn([G(null)],e.prototype,"labelTemplate",void 0),hn([G("Center")],e.prototype,"templatePosition",void 0),hn([G("Trim")],e.prototype,"interSectAction",void 0),hn([H([],mn)],e.prototype,"colorMapping",void 0),e}(Di),wn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ln(e,t),hn([G(!1)],e.prototype,"visible",void 0),hn([G("")],e.prototype,"template",void 0),hn([G(null)],e.prototype,"format",void 0),hn([G(null)],e.prototype,"fill",void 0),hn([G(.75)],e.prototype,"opacity",void 0),hn([G(["Circle"])],e.prototype,"markerShapes",void 0),hn([_({},un)],e.prototype,"border",void 0),hn([_({fontFamily:an,size:"13px"},pn)],e.prototype,"textStyle",void 0),e}(Di),Sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ln(e,t),hn([G(!1)],e.prototype,"enable",void 0),hn([G(null)],e.prototype,"fill",void 0),hn([G("0.5")],e.prototype,"opacity",void 0),hn([_({},un)],e.prototype,"border",void 0),hn([G("Item")],e.prototype,"mode",void 0),e}(Di),Pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ln(e,t),hn([G(!1)],e.prototype,"enable",void 0),hn([G("#808080")],e.prototype,"fill",void 0),hn([G("0.5")],e.prototype,"opacity",void 0),hn([_({},un)],e.prototype,"border",void 0),hn([G("Item")],e.prototype,"mode",void 0),e}(Di),Cn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ln(e,t),hn([G(null)],e.prototype,"groupPath",void 0),hn([G(0)],e.prototype,"groupGap",void 0),hn([G(10)],e.prototype,"groupPadding",void 0),hn([_({},un)],e.prototype,"border",void 0),hn([G(null)],e.prototype,"fill",void 0),hn([G(!1)],e.prototype,"autoFill",void 0),hn([G(1)],e.prototype,"opacity",void 0),hn([G(!0)],e.prototype,"showHeader",void 0),hn([G(20)],e.prototype,"headerHeight",void 0),hn([G(null)],e.prototype,"headerTemplate",void 0),hn([G(null)],e.prototype,"headerFormat",void 0),hn([G("Near")],e.prototype,"headerAlignment",void 0),hn([_({color:null,size:"13px"},pn)],e.prototype,"headerStyle",void 0),hn([G("TopLeft")],e.prototype,"templatePosition",void 0),hn([H([],mn)],e.prototype,"colorMapping",void 0),e}(Di),xn=function(){return function(t,e){this.width=t,this.height=e}}(),On=function(){return function(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}}(),Bn=function(){return function(t,e,i,r,n,o){this.y=n.y,this.x=n.x,this.height=n.height,this.width=n.width,this.id=t,this.fill=e,this.opacity=r,this.stroke=i.color,this["stroke-width"]=i.width,this["stroke-dasharray"]=o}}(),Ln=function(){return function(t,e,i,r,n,o,s){this.id=t,this.opacity=n,this.fill=e,this.stroke=r,this["stroke-width"]=i,this["stroke-dasharray"]=o,this.d=s}}(),Tn=function(){return function(t,e,i,r,n,o,s,a){void 0===o&&(o=""),this.transform="",this.baseLine="auto",this.id=t,this.text=n,this.transform=o,this.anchor=r,this.x=e,this.y=i,this.baseLine=s,this.connectorText=a}}(),Mn=function(){return function(t,e){this.x=t,this.y=e}}(),Dn=function(){return function(t,e,i){this.r=t,this.g=e,this.b=i}}(),kn=function(){return function(t,e,i,r,n){this.dataOptions=t,this.type=e||"GET",this.async=i||!0,this.contentType=r,this.sendData=n}}(),En=function(){function t(t){this.treemap=t}return t.prototype.processLayoutPanel=function(){var t,e;if(au.levelsData&&au.levelsData.length>0)if(t=c(this.treemap.initialDrillDown.groupIndex)||c(this.treemap.initialDrillDown.groupName)||(c(this.treemap.drilledItems)?!c(this.treemap.drilledItems):0!==this.treemap.drilledItems.length)?au.levelsData[0]:this.getDrilldownData(au.levelsData[0],[])[0],e=u({},this.treemap.areaRect,e,!1),c(this.treemap.treeMapLegendModule)||c(this.treemap.totalRect)||"Float"!==this.treemap.legendSettings.position&&(e=this.treemap.totalRect),c(this.treemap.currentLevel)||(c(this.treemap.drilledItems)?c(this.treemap.drilledItems):0===this.treemap.drilledItems.length))!c(this.treemap.initialDrillDown.groupIndex)&&(c(this.treemap.drilledItems)?c(this.treemap.drilledItems):0===this.treemap.drilledItems.length)&&(this.treemap.currentLevel=this.treemap.initialDrillDown.groupIndex),this.calculateLayoutItems(t||au.levelsData[0],e),this.renderLayoutItems(t||au.levelsData[0]);else{var i=this.treemap.drilledItems.length-1,r=this.treemap.drilledItems[i].data,n={};n[this.treemap.drilledItems[i].data.groupName]=[r],c(this.treemap.initialDrillDown.groupIndex)||this.treemap.enableBreadcrumb||(this.treemap.currentLevel=this.treemap.drilledItems[i].data.groupIndex),this.calculateLayoutItems(n||au.levelsData[0],e),this.renderLayoutItems(n||au.levelsData[0])}},t.prototype.getDrilldownData=function(t,e){var i=this.treemap,r={},n=Mt(t).values;if(n&&n.length>0&&0===e.length){for(var o=0;o<n.length;o++)n[o].groupIndex===i.initialDrillDown.groupIndex&&n[o].name===i.initialDrillDown.groupName&&(n[o].isDrilled=!0,r[n[o].groupName]=[n[o]],e.push(r));for(var s=0;s<n.length;s++)this.getDrilldownData(n[s],e)}return e},t.prototype.calculateLayoutItems=function(t,e){this.renderItems=[],this.parentData=[],c(this.treemap.weightValuePath)||(this.treemap.layoutType.indexOf("SliceAndDice")>-1?this.computeSliceAndDiceDimensional(t,e):(e.height=e.height+e.y,e.width=e.width+e.x,this.computeSquarifyDimensional(t,e)))},t.prototype.computeSliceAndDiceDimensional=function(t,e){var i,r,n,o,s=this.treemap.leafItemSettings,a=this.treemap.levels,l=Mt(t).values;if(l&&l.length>0&&(this.sliceAndDiceProcess(l,e),this.treemap.levels.length>0))for(var h=0;h<l.length;h++)r=l[h].groupIndex,n=0===a.length||r===a.length?s.gap:a[r].groupGap,o=0===a.length?0:a[r]?a[r].showHeader?a[r].headerHeight:0:a[r-1].showHeader?a[r-1].headerHeight:0,i=l[h].rect,i=new On(i.x+n/2,i.y+(o+n/2),i.width-n,Math.abs(i.height-(n+o))),this.computeSliceAndDiceDimensional(l[h],i);return t},t.prototype.sliceAndDiceProcess=function(t,e){var i,r=e.height*e.width,n=this.treemap.levels,o=0,s=0;t.forEach(function(t){s+=t.weight}),t.forEach(function(t){t.weightArea=r*t.weight/s});var a="SliceAndDiceAuto"===this.treemap.layoutType?e.width>e.height:"SliceAndDiceHorizontal"===this.treemap.layoutType;t.sort(Lt);for(var l=0;l<t.length;l++){var h=t[l];h.isLeafItem=0===n.length||(this.treemap.isHierarchicalData||c(this.treemap.leafItemSettings.labelPath)?h.groupIndex===n.length-1:h.groupIndex===this.treemap.levels.length),a?(i=r/s*t[l].weight/e.height,o<=e.width&&(t[l].rect=new On(o+e.x,e.y,i,e.height))):(i=r/s*t[l].weight/e.width,o<=e.height&&(t[l].rect=new On(e.x,o+e.y,e.width,i))),o+=i,this.renderItems.push(t[l])}},t.prototype.computeSquarifyDimensional=function(t,e){var i,r,n,o,s,a=this.treemap.leafItemSettings,l=this.treemap.levels,h=Mt(t).values;if(h&&h.length>0&&(0===this.parentData.length&&(this.parentData=[],this.parentData.push(h)),this.calculateChildrenLayout(t,h,e),this.treemap.levels.length>0))for(var u=0;u<h.length;u++)n=(r=h[u]).groupIndex,i=r.rect,o=(r.isLeafItem?a.padding:l[n].groupPadding)/2,s=this.treemap.isHierarchicalData?0===n&&r.isLeafItem?0:l[n]&&l[n].showHeader?l[n].headerHeight:0:0===l.length?0:l[n]&&l[n].showHeader?l[n].headerHeight:0,i=new On(i.x+o,i.y+(s+o),i.width-o,i.height-o),!r.isLeafItem&&r.weight>0&&this.computeSquarifyDimensional(h[u],i)},t.prototype.calculateChildrenLayout=function(t,e,i){this.computeTotalArea(e,Rt(i)),e.sort(Xt),this.performRowsLayout(e,[],i,[])},t.prototype.performRowsLayout=function(t,e,i,r){var n=t.length;if(0===n){var o=this.getCoordinates(e,i);return f=r.concat(o)}var s=At(i),a=t[0],l=t.slice(1,n);if(this.aspectRatio(e,a,s)){var h=e.concat(a);return this.performRowsLayout(l,h,i,r)}for(var u=e.length,c=0,p=0;p<u;p+=1)c+=e[p].itemArea;var d=this.cutArea(i,c),f=(o=this.getCoordinates(e,i),r.concat(o));return this.performRowsLayout(t,[],d,f)},t.prototype.aspectRatio=function(t,e,i){if(0===t.length)return!0;var r=t.concat(e);return this.findMaxAspectRatio(t,i)>=this.findMaxAspectRatio(r,i)},t.prototype.findMaxAspectRatio=function(t,e){for(var i=t.length,r=1/0,n=-1/0,o=0,s=0;s<i;s+=1){var a=t[s].itemArea;a<r&&(r=a),a>n&&(n=a),o+=a}return Math.max(Math.pow(e,2)*n/Math.pow(o,2),Math.pow(o,2)/(Math.pow(e,2)*r))},t.prototype.cutArea=function(t,e){var i=Nt(t),r=i.width,n=i.height,o=i.x,s=i.y;if(r>=n){var a=e/n;return Ft({x:o+a,y:s,width:r-a,height:n})}var l=e/r;return Ft({x:o,y:s+l,width:r,height:n-l})},t.prototype.getCoordinates=function(t,e){for(var i,r=Nt(e),n=r.width,o=r.height,s=r.x,a=r.y,l=t.length,h=this.treemap.levels,u=this.treemap.leafItemSettings,p=0,d=0;d<l;d+=1)p+=t[d].itemArea;var f,g,m,y=p/o,b=p/n,v=s,w=a,S=[];for(d=0;d<l;d+=1){var P=t[d];if(i=P.groupIndex,P.isLeafItem=0===h.length||(this.treemap.isHierarchicalData?i===h.length:!c(u.labelPath)&&i===h.length),g=ue(this.parentData[0],P),m=g?this.treemap.areaRect:P.parent.rect,f=P.isLeafItem?u.padding:h[i].groupPadding,n>=o){var C=w+P.itemArea/y;P.rect={x:v,y:w,width:v+y,height:C},w=C}else{var x=v+P.itemArea/b;P.rect={x:v,y:w,width:x,height:w+b},v=x}P.weight>0&&(g||Math.round(e.y+f/2)<=Math.round(m.y+(m.height-m.y))&&Math.round(e.x+f/2)<=Math.round(m.x+(m.width-m.x)))&&(this.renderItems.push(P),S.push(P))}return S},t.prototype.computeTotalArea=function(t,e){for(var i=t.length,r=[],n=0;n<i;n+=1){for(var o=t.length,s=0,a=0;a<o;a+=1)s+=t[a].weight;for(var l=e/s,h=void 0,u=0;u<o;u++)(h=t[u]).itemArea=h.weight*l,r.push(h)}return r},t.prototype.onDemandProcess=function(t){var e,i={};i=t[0].parent,this.treemap.currentLevel=i.isDrilled?i.groupIndex:null;var r={};c(i.groupName)?r=i:r[i.groupName]=[i],e=u({},this.treemap.areaRect,e,!1),c(this.treemap.treeMapLegendModule)||c(this.treemap.totalRect)||(e=this.treemap.totalRect);for(var n=this.treemap.levels.length,o=0;o<n;o++){n===t[0].groupIndex?this.treemap.levels[n]=this.treemap.levels[o]:this.treemap.levels.splice(n-1,1)}this.calculateLayoutItems(r,e),this.renderLayoutItems(r)},t.prototype.renderLayoutItems=function(t){var e,i,r,n,o=this,s=this.treemap;this.renderer=s.renderer;var a,l,h,u,p,d,f,g,m,y,b,v,S,P=s.element.id,C=s.layoutType,x=this.treemap.leafItemSettings.interSectAction,O="",B=document.getElementById(s.element.id+"_Secondary_Element"),L=s.levels;this.layoutGroup=this.renderer.createGroup({id:P+"_TreeMap_"+C+"_Layout"});for(var T,M,D,k,E,j=w("div",{id:s.element.id+"_Label_Template_Group",className:"template",styles:"overflow: hidden; position: absolute;pointer-events: none;top:"+s.areaRect.y+"px;left:"+s.areaRect.x+"px;height:"+s.areaRect.height+"px;width:"+s.areaRect.width+"px;"}),I=!1,R=s.leafItemSettings,A=function(t){if(f=N.renderItems[t],l=f.groupIndex,N.treemap.drillDownView&&c(N.treemap.currentLevel)&&l>0||N.treemap.drillDownView&&l>N.treemap.currentLevel+1)return"continue";u=f.rect,I=f.isLeafItem,y=P+"_Level_Index_"+l+"_Item_Index_"+t,T=N.renderer.createGroup({id:y+"_Group"}),v=(I?R.gap:L[l].groupGap)/2;var w=N.treemap.totalRect?Nt(N.treemap.totalRect):N.treemap.areaRect;"Squarified"===s.layoutType&&(u.width=Math.abs(u.x-u.width)-v,u.height=Math.abs(u.y-u.height)-v),"TopRightBottomLeft"===s.renderDirection?u.x=w.x+w.width-u.width-Math.abs(w.x-u.x):"BottomLeftTopRight"===s.renderDirection?u.y=w.y+w.height-u.height-Math.abs(w.y-u.y):"BottomRightTopLeft"===s.renderDirection&&(u.x=w.x+w.width-u.width-Math.abs(w.x-u.x),u.y=w.y+w.height-u.height-Math.abs(w.y-u.y)),I?R.colorMapping:L[l].colorMapping,r=N.getItemColor(I,f),d=r.fill,m=r.opacity,p=I?R.labelFormat:L[l].headerFormat;var C;if(i=I?R.showLabels:L[l].showHeader,l===N.treemap.currentLevel)if(N.treemap.enableBreadcrumb){E="#"+N.treemap.breadcrumbConnector+"#",C=f.levelOrderName.replace(/#/gi,E),C=0!==l?"#"+C:C}else C=f.name;else N.treemap.enableBreadcrumb&&(f.isDrilled=!1),C=f.name;g=ie(p,f.data,N.treemap)||C||"undefined",k=Mt(f).values,g=!I&&k&&k.length>0&&N.treemap.enableDrillDown?f.isDrilled?s.enableRtl?g+" [-]":"[-] "+g:s.enableRtl?g+" [+]":"[+] "+g:g,(S=I?R.labelStyle:L[l].headerStyle).fontFamily=N.treemap.themeStyle.labelFontFamily||S.fontFamily,D=I?R.border:L[l].border,e=I?R.labelPosition:"Near"===L[l].headerAlignment?"TopLeft":"Center"===L[l].headerAlignment?"TopCenter":"TopRight",h=I?R.templatePosition:L[l].templatePosition,M=I?R.labelTemplate:L[l].headerTemplate,f.options={border:D,opacity:m,fill:d},n={cancel:!1,name:Xr,treemap:N.treemap,text:g,currentItem:f,RenderItems:N.renderItems,options:f.options},N.treemap.trigger(Xr,n,function(r){if(!r.cancel){O=" M "+u.x+" "+u.y+" L "+(u.x+u.width)+" "+u.y+" L "+(u.x+u.width)+" "+(u.y+u.height)+" L "+u.x+" "+(u.y+u.height)+"z",a=new Ln(y+"_RectPath",d,D.width,D.color,m,null,O);var s=o.renderer.drawPath(a);T.appendChild(s),i&&(n.text!==g&&(n.text=ie(n.text,f.data,o.treemap)||C),o.renderItemText(n.text.toString(),T,S,u,x,y,d,e,E)),M&&(b=o.renderTemplate(B,y,u,h,M,f,I),j.appendChild(b),o.treemap.renderReactTemplates()),T.setAttribute("aria-label",f.name),T.setAttribute("tabindex",(o.treemap.tabIndex+t+2).toString()),Qt(o.treemap,T,"treeMapSelection"),o.layoutGroup.appendChild(T)}})},N=this,F=0;F<this.renderItems.length;F++)A(F);j.childNodes.length>0&&B.appendChild(j),this.treemap.svgObject.appendChild(this.layoutGroup)},t.prototype.renderItemText=function(t,e,i,r,n,o,s,a,l){document.getElementById(this.treemap.element.id+"_Secondary_Element"),this.treemap.leafItemSettings;var h,u,p,d=[],f=[],g=0;if(d=-1!==t.indexOf("<br>")?t.split("<br>"):null,u=this.labelInterSectAction(r,t,i,n),h=wt(d&&d[0]||u[0],i),this.treemap.enableRtl){var m=wt(t,i),y=t.search("[+]")||t.search("[-]");if(r.width<m.width&&y>0){var b=t.substring(y-1,t.length),v=wt("[+]",i);u[0]=St(r.width-v.width-5,u[0],i)+b}}var w=jt(r,a,h,"Text",this.treemap);if(!c(d)){for(var S=[],P=null,C=[],x=0;x<d.length;x++)g+=(h=wt(P=St(r.width-5,d[x],i),i)).height,C.push(h.width),S.push(P);u=S,h.width=Math.max.apply(null,C),h.height=g}if("WrapByWord"===n||"Wrap"===n||"Trim"===n){for(var O=0;O<u.length;O++)g+=(h=wt(u[O],i)).height,r.height-5>g&&f.push(u[O]);if("Wrap"===n&&u.length!==f.length&&f.length){var B=f.length-1,L=f[B];L=L.substring(0,L.length-1)+"...",f.splice(B),"..."!==L&&f.push(L)}}else p=u,f.push(p);xt(new Tn(o+"_Text",w.x,w.y,"start",f,"","",l),i,i.color||this.getSaturatedColor(s),e)},t.prototype.getItemColor=function(t,e){var i=this.treemap,r=t?i.leafItemSettings.fill:i.levels[e.groupIndex].fill,n=t?i.leafItemSettings.opacity:i.levels[e.groupIndex].opacity;c(au.defaultLevelsData)||au.defaultLevelsData.length>0&&(au.levelsData=au.defaultLevelsData);var o=Mt(au.levelsData[0]).values,s=t?i.leafItemSettings.colorMapping:i.levels[e.groupIndex].colorMapping;if(s.length>0){var a=zt(s,e.data[this.treemap.equalColorValuePath],e.data[this.treemap.rangeColorValuePath],e.data[this.treemap.weightValuePath]);r=c(a.fill)?i.leafItemSettings.fill:a.fill,n=a.opacity}else for(var l=0;l<o.length;l++)o[l].levelOrderName===e.levelOrderName.split("#")[0]&&(r=c(r)?c(i.colorValuePath)?i.palette.length>0?i.palette[l%i.palette.length]:"#808080":o[l].data[i.colorValuePath]:r);return{fill:r,opacity:n}},t.prototype.getSaturatedColor=function(t){var e=t,i=se(ae(e="transparent"===e?window.getComputedStyle(document.body,null).backgroundColor:e));return Math.round((299*i.r+587*i.g+114*i.b)/1e3)>=128?"black":"white"},t.prototype.renderTemplate=function(t,e,i,r,n,o,s){var a=s?e+"_LabelTemplate":e+"_HeaderTemplate",l=s?"_LabelTemplate":"_HeaderTemplate";if(c(n.prototype))for(var h=Object.keys(o.data),u=0;u<h.length;u++)n=n.replace(new RegExp("{{:"+h[u]+"}}","g"),o.data[h[u].toString()]);var p=Et(kt(n)(o.data,this.treemap,n,this.treemap.element.id+l,!1),a,o.data),d=jt(i,r,It(p,t),"Template",this.treemap);return p.style.left=d.x+"px",p.style.top=d.y+"px",p},t.prototype.labelInterSectAction=function(t,e,i,r){var n,o=t.width-10;switch(r){case"Hide":n=[Jt(o,t.height,e,i)];break;case"Trim":n=[St(o+3,e,i)];break;case"WrapByWord":n=Yt(o,e,i);break;case"Wrap":n=$t(o,e,i)}return n},t}(),jn=function(){function t(t){return this.subQuery=null,this.isChild=!1,this.distincts=[],this.queries=[],this.key="",this.fKey="","string"==typeof t?this.fromTable=t:t&&t instanceof Array&&(this.lookups=t),this.expands=[],this.sortedColumns=[],this.groupedColumns=[],this.subQuery=null,this.isChild=!1,this.params=[],this.lazyLoad=[],this}return t.prototype.setKey=function(t){return this.key=t,this},t.prototype.using=function(t){return this.dataManager=t,this},t.prototype.execute=function(t,e,i,r){return(t=t||this.dataManager)?t.executeQuery(this,e,i,r):An.throwError('Query - execute() : dataManager needs to be is set using "using" function or should be passed as argument')},t.prototype.executeLocal=function(t){return(t=t||this.dataManager)?t.executeLocal(this):An.throwError('Query - executeLocal() : dataManager needs to be is set using "using" function or should be passed as argument')},t.prototype.clone=function(){var e=new t;return e.queries=this.queries.slice(0),e.key=this.key,e.isChild=this.isChild,e.dataManager=this.dataManager,e.fromTable=this.fromTable,e.params=this.params.slice(0),e.expands=this.expands.slice(0),e.sortedColumns=this.sortedColumns.slice(0),e.groupedColumns=this.groupedColumns.slice(0),e.subQuerySelector=this.subQuerySelector,e.subQuery=this.subQuery,e.fKey=this.fKey,e.isCountRequired=this.isCountRequired,e.distincts=this.distincts.slice(0),e.lazyLoad=this.lazyLoad.slice(0),e},t.prototype.from=function(t){return this.fromTable=t,this},t.prototype.addParams=function(t,e){return"function"==typeof e?this.params.push({key:t,fn:e}):this.params.push({key:t,value:e}),this},t.prototype.distinct=function(t){return this.distincts="string"==typeof t?[].slice.call([t],0):t.slice(0),this},t.prototype.expand=function(t){return this.expands="string"==typeof t?[].slice.call([t],0):t.slice(0),this},t.prototype.where=function(t,e,i,r,n){e=e?e.toLowerCase():null;var o=null;return"string"==typeof t?o=new In(t,e,i,r,n):t instanceof In&&(o=t),this.queries.push({fn:"onWhere",e:o}),this},t.prototype.search=function(t,e,i,r,n){"string"==typeof e&&(e=[e]),i&&"none"!==i||(i="contains");var o=An.fnOperators[i];return this.queries.push({fn:"onSearch",e:{fieldNames:e,operator:i,searchKey:t,ignoreCase:r,ignoreAccent:n,comparer:o}}),this},t.prototype.sortBy=function(t,e,i){return this.sortByForeignKey(t,e,i)},t.prototype.sortByForeignKey=function(e,i,r,n){var o,s,a=c(n)?"ascending":n;if("string"==typeof e&&An.endsWith(e.toLowerCase()," desc")&&(e=e.replace(/ desc$/i,""),i="descending"),i&&"string"!=typeof i||(a=i?i.toLowerCase():"ascending",i=An.fnSort(i)),r){o=t.filterQueries(this.queries,"onSortBy");for(var l=0;l<o.length;l++)if("string"==typeof(s=o[l].e.fieldName)){if(s===e)return this}else if(s instanceof Array)for(var h=0;h<s.length;h++)if(s[h]===e||e.toLowerCase()===s[h]+" desc")return this}return this.queries.push({fn:"onSortBy",e:{fieldName:e,comparer:i,direction:a}}),this},t.prototype.sortByDesc=function(t){return this.sortBy(t,"descending")},t.prototype.group=function(t,e,i){return this.sortBy(t,null,!0),this.queries.push({fn:"onGroup",e:{fieldName:t,comparer:e||null,format:i||null}}),this},t.prototype.page=function(t,e){return this.queries.push({fn:"onPage",e:{pageIndex:t,pageSize:e}}),this},t.prototype.range=function(t,e){return this.queries.push({fn:"onRange",e:{start:t,end:e}}),this},t.prototype.take=function(t){return this.queries.push({fn:"onTake",e:{nos:t}}),this},t.prototype.skip=function(t){return this.queries.push({fn:"onSkip",e:{nos:t}}),this},t.prototype.select=function(t){return"string"==typeof t&&(t=[].slice.call([t],0)),this.queries.push({fn:"onSelect",e:{fieldNames:t}}),this},t.prototype.hierarchy=function(t,e){return this.subQuerySelector=e,this.subQuery=t,this},t.prototype.foreignKey=function(t){return this.fKey=t,this},t.prototype.requiresCount=function(){return this.isCountRequired=!0,this},t.prototype.aggregate=function(t,e){return this.queries.push({fn:"onAggregates",e:{field:e,type:t}}),this},t.filterQueries=function(t,e){return t.filter(function(t){return t.fn===e})},t.filterQueryLists=function(t,e){for(var i=t.filter(function(t){return-1!==e.indexOf(t.fn)}),r={},n=0;n<i.length;n++)r[i[n].fn]||(r[i[n].fn]=i[n].e);return r},t}(),In=function(){function t(e,i,r,n,o){return void 0===n&&(n=!1),this.ignoreAccent=!1,this.isComplex=!1,"string"==typeof e?(this.field=e,this.operator=i.toLowerCase(),this.value=r,this.ignoreCase=n,this.ignoreAccent=o,this.isComplex=!1,this.comparer=An.fnOperators.processOperator(this.operator)):(e instanceof t&&r instanceof t||r instanceof Array)&&(this.isComplex=!0,this.condition=i.toLowerCase(),this.predicates=[e],r instanceof Array?[].push.apply(this.predicates,r):this.predicates.push(r)),this}return t.and=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.combinePredicates([].slice.call(e,0),"and")},t.prototype.and=function(e,i,r,n,o){return t.combine(this,e,i,r,"and",n,o)},t.or=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.combinePredicates([].slice.call(e,0),"or")},t.prototype.or=function(e,i,r,n,o){return t.combine(this,e,i,r,"or",n,o)},t.fromJson=function(t){if(t instanceof Array){for(var e=[],i=0,r=t.length;i<r;i++)e.push(this.fromJSONData(t[i]));return e}var n=t;return this.fromJSONData(n)},t.prototype.validate=function(t){var e,i,r=this.predicates?this.predicates:[];if(!this.isComplex&&this.comparer)return this.comparer.call(this,An.getObject(this.field,t),this.value,this.ignoreCase,this.ignoreAccent);e="and"===this.condition;for(var n=0;n<r.length;n++)if(i=r[n].validate(t),e){if(!i)return!1}else if(i)return!0;return e},t.prototype.toJson=function(){var t,e;if(this.isComplex){t=[],e=this.predicates;for(var i=0;i<e.length;i++)t.push(e[i].toJson())}return{isComplex:this.isComplex,field:this.field,operator:this.operator,value:this.value,ignoreCase:this.ignoreCase,ignoreAccent:this.ignoreAccent,condition:this.condition,predicates:t}},t.combinePredicates=function(e,i){if(1===e.length){if(!(e[0]instanceof Array))return e[0];e=e[0]}return new t(e[0],i,e.slice(1))},t.combine=function(e,i,r,n,o,s,a){return i instanceof t?t[o](e,i):"string"==typeof i?t[o](e,new t(i,r,n,s,a)):An.throwError("Predicate - "+o+" : invalid arguments")},t.fromJSONData=function(e){for(var i=e.predicates||[],r=i.length,n=[],o=0;o<r;o++)n.push(this.fromJSONData(i[o]));return e.isComplex?new t(n[0],e.condition,n.slice(1)):new t(e.field,e.operator,e.value,e.ignoreCase,e.ignoreAccent)},t}(),Rn={GroupGuid:"{271bbba0-1ee7}"},An=function(){function t(){}return t.getValue=function(t,e){return"function"==typeof t?t.call(e||{}):t},t.endsWith=function(t,e){return t.slice&&t.slice(-e.length)===e},t.startsWith=function(t,e){return t.slice(0,e.length)===e},t.fnSort=function(e){return"ascending"===(e=e?t.toLowerCase(e):"ascending")?this.fnAscending:this.fnDescending},t.fnAscending=function(t,e){return c(t)&&c(e)?-1:null===e||void 0===e?-1:"string"==typeof t?t.localeCompare(e):null===t||void 0===t?1:t-e},t.fnDescending=function(t,e){return c(t)&&c(e)?-1:null===e||void 0===e?1:"string"==typeof t?-1*t.localeCompare(e):null===t||void 0===t?-1:e-t},t.extractFields=function(t,e){for(var i={},r=0;r<e.length;r++)i=this.setValue(e[r],this.getObject(e[r],t),i);return i},t.select=function(t,e){for(var i=[],r=0;r<t.length;r++)i.push(this.extractFields(t[r],e));return i},t.group=function(e,i,r,n,o,s,a){n=n||1;var l=e;if(l.GroupGuid===Rn.GroupGuid){for(var h=function(t){if(c(o))l[t].items=u.group(l[t].items,i,r,l.level+1,null,s,a),l[t].count=l[t].items.length;else{var e=-1,n=o.filter(function(e){return e.key===l[t].key});e=o.indexOf(n[0]),l[t].items=u.group(l[t].items,i,r,l.level+1,o[e].items,s,a),l[t].count=o[e].count}},u=this,p=0;p<l.length;p++)h(p);return l.childLevels+=1,l}var d={},f=[];f.GroupGuid=Rn.GroupGuid,f.level=n,f.childLevels=0,f.records=l;for(var g=function(t){var e=m.getVal(l,t,i);if(c(s)||(e=s(e,i)),!d[e]&&(d[e]={key:e,count:0,items:[],aggregates:{},field:i},f.push(d[e]),!c(o))){var n=o.filter(function(t){return t.key===d[e].key});d[e].count=n[0].count}d[e].count=c(o)?d[e].count+=1:d[e].count,(!a||a&&r.length)&&d[e].items.push(l[t])},m=this,y=0;y<l.length;y++)g(y);if(r&&r.length){var b=function(e){for(var i={},n=void 0,s=r,a=0;a<r.length;a++)if(n=t.aggregates[r[a].type],c(o))n&&(i[s[a].field+" - "+s[a].type]=n(f[e].items,s[a].field));else{var l=o.filter(function(t){return t.key===f[e].key});n&&(i[s[a].field+" - "+s[a].type]=n(l[0].items,s[a].field))}f[e].aggregates=i};for(y=0;y<f.length;y++)b(y)}if(a&&f.length&&r.length)for(y=0;y<f.length;y++)f[y].items=[];return l.length&&f||l},t.buildHierarchy=function(t,e,i,r,n){var o,s={};for(r.result&&(r=r.result),r.GroupGuid&&this.throwError("DataManager: Do not have support Grouping in hierarchy"),o=0;o<r.length;o++){(s[a=this.getObject(t,r[o])]||(s[a]=[])).push(r[o])}for(o=0;o<i.length;o++){var a=this.getObject(n||t,i[o]);i[o][e]=s[a]}},t.getFieldList=function(t,e,i){if(void 0===i&&(i=""),void 0===e||null===e)return this.getFieldList(t,[],i);for(var r=t,n=0,o=Object.keys(t);n<o.length;n++){var s=o[n];"object"!=typeof r[s]||r[s]instanceof Array?e.push(i+s):this.getFieldList(r[s],e,i+s+".")}return e},t.getObject=function(t,e){if(!t)return e;if(e){if(-1===t.indexOf("."))return e[t];for(var i=e,r=t.split("."),n=0;n<r.length&&null!=i;n++)i=i[r[n]];return i}},t.setValue=function(t,e,i){var r,n,o=t.toString().split("."),s=i||{},a=s,l=o.length;for(r=0;r<l;r++)n=o[r],r+1===l?a[n]=void 0===e?void 0:e:c(a[n])&&(a[n]={}),a=a[n];return s},t.sort=function(t,e,i){if(t.length<=1)return t;var r=parseInt((t.length/2).toString(),10),n=t.slice(0,r),o=t.slice(r);return n=this.sort(n,e,i),o=this.sort(o,e,i),this.merge(n,o,e,i)},t.ignoreDiacritics=function(e){if("string"!=typeof e)return e;return e.split("").map(function(e){return e in t.diacritics?t.diacritics[e]:e}).join("")},t.merge=function(t,e,i,r){for(var n,o=[];t.length>0||e.length>0;)n=t.length>0&&e.length>0?r?r(this.getVal(t,0,i),this.getVal(e,0,i),t[0],e[0])<=0?t:e:t[0][i]<t[0][i]?t:e:t.length>0?t:e,o.push(n.shift());return o},t.getVal=function(t,e,i){return i?this.getObject(i,t[e]):t[e]},t.toLowerCase=function(t){return t?"string"==typeof t?t.toLowerCase():t.toString():0===t||!1===t?t.toString():""},t.callAdaptorFunction=function(t,e,i,r){if(e in t){var n=t[e](i,r);c(n)||(i=n)}return i},t.getAddParams=function(e,i,r){var n={};return t.callAdaptorFunction(e,"addParams",{dm:i,query:r,params:r.params,reqParams:n}),n},t.isPlainObject=function(t){return!!t&&t.constructor===Object},t.isCors=function(){var t=null;try{t=new window.XMLHttpRequest}catch(t){}return!!t&&"withCredentials"in t},t.getGuid=function(t){var e;return(t||"")+"00000000-0000-4000-0000-000000000000".replace(/0/g,function(t,i){if("crypto"in window&&"getRandomValues"in crypto){var r=new Uint8Array(1);window.crypto.getRandomValues(r),e=r[0]%16|0}else e=16*Math.random()|0;return"0123456789abcdef"[19===i?3&e|8:e]})},t.isNull=function(t){return void 0===t||null===t},t.getItemFromComparer=function(e,i,r){var n,o,s,a=0,l="string"==typeof t.getVal(e,0,i);if(e.length)for(;c(n)&&a<e.length;)n=t.getVal(e,a,i),s=e[a++];for(;a<e.length;a++)c(o=t.getVal(e,a,i))||(l&&(n=+n,o=+o),r(n,o)>0&&(n=o,s=e[a]));return s},t.distinct=function(e,i,r){r=!c(r)&&r;var n,o=[],s={};return e.forEach(function(a,l){(n="object"==typeof e[l]?t.getVal(e,l,i):e[l])in s||(o.push(r?e[l]:n),s[n]=1)}),o},t.processData=function(t,e){var i=this.prepareQuery(t),r=new qn(e);t.requiresCounts&&i.requiresCount();var n=r.executeLocal(i),o={result:t.requiresCounts?n.result:n,count:n.count,aggregates:JSON.stringify(n.aggregates)};return t.requiresCounts?o:n},t.prepareQuery=function(e){var i=this,r=new jn;if(e.select&&r.select(e.select),e.where){t.parse.parseJson(e.where).filter(function(t){if(c(t.condition))r.where(t.field,t.operator,t.value,t.ignoreCase,t.ignoreAccent);else{var e=[];t.field?e.push(new In(t.field,t.operator,t.value,t.ignoreCase,t.ignoreAccent)):e=e.concat(i.getPredicate(t.predicates)),"or"==t.condition?r.where(In.or(e)):"and"==t.condition&&r.where(In.and(e))}})}if(e.search){t.parse.parseJson(e.search).filter(function(t){return r.search(t.key,t.fields,t.operator,t.ignoreCase,t.ignoreAccent)})}return e.aggregates&&e.aggregates.filter(function(t){return r.aggregate(t.type,t.field)}),e.sorted&&e.sorted.filter(function(t){return r.sortBy(t.name,t.direction)}),e.skip&&r.skip(e.skip),e.take&&r.take(e.take),e.group&&e.group.filter(function(t){return r.group(t)}),r},t.getPredicate=function(t){for(var e=[],i=0;i<t.length;i++){var r=t[i];if(r.field)e.push(new In(r.field,r.operator,r.value,r.ignoreCase,r.ignoreAccent));else{for(var n=[],o=this.getPredicate(r.predicates),s=0,a=Object.keys(o);s<a.length;s++){var l=a[s];n.push(o[l])}e.push("or"==r.condition?In.or(n):In.and(n))}}return e},t.serverTimezoneOffset=null,t.timeZoneHandling=!0,t.throwError=function(t){try{throw new Error(t)}catch(t){throw t.message+"\n"+t.stack}},t.aggregates={sum:function(e,i){for(var r,n=0,o="number"!=typeof t.getVal(e,0,i),s=0;s<e.length;s++)r=t.getVal(e,s,i),isNaN(r)||null===r||(o&&(r=+r),n+=r);return n},average:function(e,i){return t.aggregates.sum(e,i)/e.length},min:function(e,i){var r;return"function"==typeof i&&(r=i,i=null),t.getObject(i,t.getItemFromComparer(e,i,r||t.fnAscending))},max:function(e,i){var r;return"function"==typeof i&&(r=i,i=null),t.getObject(i,t.getItemFromComparer(e,i,r||t.fnDescending))},truecount:function(t,e){return new qn(t).executeLocal((new jn).where(e,"equal",!0,!0)).length},falsecount:function(t,e){return new qn(t).executeLocal((new jn).where(e,"equal",!1,!0)).length},count:function(t,e){return t.length}},t.operatorSymbols={"<":"lessthan",">":"greaterthan","<=":"lessthanorequal",">=":"greaterthanorequal","==":"equal","!=":"notequal","*=":"contains","$=":"endswith","^=":"startswith"},t.odBiOperator={"<":" lt ",">":" gt ","<=":" le ",">=":" ge ","==":" eq ","!=":" ne ",lessthan:" lt ",lessthanorequal:" le ",greaterthan:" gt ",greaterthanorequal:" ge ",equal:" eq ",notequal:" ne "},t.odUniOperator={"$=":"endswith","^=":"startswith","*=":"substringof",endswith:"endswith",startswith:"startswith",contains:"substringof"},t.odv4UniOperator={"$=":"endswith","^=":"startswith","*=":"contains",endswith:"endswith",startswith:"startswith",contains:"contains"},t.diacritics={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"},t.fnOperators={equal:function(e,i,r,n){return n&&(e=t.ignoreDiacritics(e),i=t.ignoreDiacritics(i)),r?t.toLowerCase(e)===t.toLowerCase(i):e===i},notequal:function(e,i,r,n){return n&&(e=t.ignoreDiacritics(e),i=t.ignoreDiacritics(i)),!t.fnOperators.equal(e,i,r)},lessthan:function(e,i,r){return r?t.toLowerCase(e)<t.toLowerCase(i):(c(e)&&(e=void 0),e<i)},greaterthan:function(e,i,r){return r?t.toLowerCase(e)>t.toLowerCase(i):e>i},lessthanorequal:function(e,i,r){return r?t.toLowerCase(e)<=t.toLowerCase(i):(c(e)&&(e=void 0),e<=i)},greaterthanorequal:function(e,i,r){return r?t.toLowerCase(e)>=t.toLowerCase(i):e>=i},contains:function(e,i,r,n){return n&&(e=t.ignoreDiacritics(e),i=t.ignoreDiacritics(i)),r?!c(e)&&!c(i)&&-1!==t.toLowerCase(e).indexOf(t.toLowerCase(i)):!c(e)&&!c(i)&&-1!==e.toString().indexOf(i)},notnull:function(t){return null!==t},isnull:function(t){return null===t},startswith:function(e,i,r,n){return n&&(e=t.ignoreDiacritics(e),i=t.ignoreDiacritics(i)),r?e&&i&&t.startsWith(t.toLowerCase(e),t.toLowerCase(i)):e&&i&&t.startsWith(e,i)},endswith:function(e,i,r,n){return n&&(e=t.ignoreDiacritics(e),i=t.ignoreDiacritics(i)),r?e&&i&&t.endsWith(t.toLowerCase(e),t.toLowerCase(i)):e&&i&&t.endsWith(e,i)},processSymbols:function(e){var i=t.operatorSymbols[e];if(i){return t.fnOperators[i]}return t.throwError("Query - Process Operator : Invalid operator")},processOperator:function(e){var i=t.fnOperators[e];return i||t.fnOperators.processSymbols(e)}},t.parse={parseJson:function(e){return"string"==typeof e?e=JSON.parse(e,t.parse.jsonReviver):e instanceof Array?t.parse.iterateAndReviveArray(e):"object"==typeof e&&null!==e&&t.parse.iterateAndReviveJson(e),e},iterateAndReviveArray:function(e){for(var i=0;i<e.length;i++)"object"==typeof e[i]&&null!==e[i]?t.parse.iterateAndReviveJson(e[i]):"string"!=typeof e[i]||/^[\s]*\[|^[\s]*\{(.)+:|\"/g.test(e[i])?e[i]=t.parse.parseJson(e[i]):e[i]=t.parse.jsonReviver("",e[i])},iterateAndReviveJson:function(e){for(var i,r=0,n=Object.keys(e);r<n.length;r++){var o=n[r];t.startsWith(o,"__")||("object"==typeof(i=e[o])?i instanceof Array?t.parse.iterateAndReviveArray(i):i&&t.parse.iterateAndReviveJson(i):e[o]=t.parse.jsonReviver(e[o],i))}},jsonReviver:function(e,i){if("string"==typeof i){var r=/^\/Date\(([+-]?[0-9]+)([+-][0-9]{4})?\)\/$/.exec(i),n=t.timeZoneHandling?t.serverTimezoneOffset:null;if(r)return t.dateParse.toTimeZone(new Date(parseInt(r[1],10)),n,!0);if(/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*){1})([zZ]|([+\-])(\d\d):?(\d\d))?$/.test(i)){var o=i.indexOf("Z")>-1||i.indexOf("z")>-1,s=i.split(/[^0-9.]/);if(o)i=t.dateParse.toTimeZone(new Date(parseInt(s[0],10),parseInt(s[1],10)-1,parseInt(s[2],10),parseInt(s[3],10),parseInt(s[4],10),parseInt(s[5],10)),t.serverTimezoneOffset,!1);else{var a=new Date(parseInt(s[0],10),parseInt(s[1],10)-1,parseInt(s[2],10),parseInt(s[3],10),parseInt(s[4],10),parseInt(s[5],10)),l=parseInt(s[6],10),h=parseInt(s[7],10);if(isNaN(l)&&isNaN(h))return a;i.indexOf("+")>-1?a.setHours(a.getHours()-l,a.getMinutes()-h):a.setHours(a.getHours()+l,a.getMinutes()+h),i=t.dateParse.toTimeZone(a,t.serverTimezoneOffset,!1)}null==t.serverTimezoneOffset&&(i=t.dateParse.addSelfOffset(i))}}return i},isJson:function(e){return"string"==typeof e[0]?e:t.parse.parseJson(e)},isGuid:function(t){return null!=/[A-Fa-f0-9]{8}(?:-[A-Fa-f0-9]{4}){3}-[A-Fa-f0-9]{12}/i.exec(t)},replacer:function(e,i){return t.isPlainObject(e)?t.parse.jsonReplacer(e,i):e instanceof Array?t.parse.arrayReplacer(e):e instanceof Date?t.parse.jsonReplacer({val:e},i).val:e},jsonReplacer:function(e,i){for(var r,n=0,o=Object.keys(e);n<o.length;n++){var s=o[n];if((r=e[s])instanceof Date){var a=r;null==t.serverTimezoneOffset?e[s]=t.dateParse.toTimeZone(a,null).toJSON():(a=new Date(+a+36e5*t.serverTimezoneOffset),e[s]=t.dateParse.toTimeZone(t.dateParse.addSelfOffset(a),null).toJSON())}}return e},arrayReplacer:function(e){for(var i=0;i<e.length;i++)t.isPlainObject(e[i])?e[i]=t.parse.jsonReplacer(e[i]):e[i]instanceof Date&&(e[i]=t.parse.jsonReplacer({date:e[i]}).date);return e},jsonDateReplacer:function(e,i){if("value"===e&&i){if("string"==typeof i){var r=/^\/Date\(([+-]?[0-9]+)([+-][0-9]{4})?\)\/$/.exec(i);if(r)i=t.dateParse.toTimeZone(new Date(parseInt(r[1],10)),null,!0);else if(/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*){1})([zZ]|([+\-])(\d\d):?(\d\d))?$/.test(i)){var n=i.split(/[^0-9]/);i=t.dateParse.toTimeZone(new Date(parseInt(n[0],10),parseInt(n[1],10)-1,parseInt(n[2],10),parseInt(n[3],10),parseInt(n[4],10),parseInt(n[5],10)),null,!0)}}if(i instanceof Date)return i=t.dateParse.addSelfOffset(i),null===t.serverTimezoneOffset?t.dateParse.toTimeZone(t.dateParse.addSelfOffset(i),null).toJSON():(i=t.dateParse.toTimeZone(i,i.getTimezoneOffset()/60*2-t.serverTimezoneOffset,!1)).toJSON()}return i}},t.dateParse={addSelfOffset:function(t){return new Date(+t-6e4*t.getTimezoneOffset())},toUTC:function(t){return new Date(+t+6e4*t.getTimezoneOffset())},toTimeZone:function(e,i,r){if(null===i)return e;var n=r?t.dateParse.toUTC(e):e;return new Date(+n-36e5*i)},toLocalTime:function(t){var e=t,i=-e.getTimezoneOffset(),r=i>=0?"+":"-",n=function(t){var e=Math.floor(Math.abs(t));return(e<10?"0":"")+e};return e.getFullYear()+"-"+n(e.getMonth()+1)+"-"+n(e.getDate())+"T"+n(e.getHours())+":"+n(e.getMinutes())+":"+n(e.getSeconds())+r+n(i/60)+":"+n(i%60)}},t}(),Nn=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Fn={GroupGuid:"{271bbba0-1ee7}"},Vn=function(){function t(e){this.options={from:"table",requestType:"json",sortBy:"sorted",select:"select",skip:"skip",group:"group",take:"take",search:"search",count:"requiresCounts",where:"where",aggregates:"aggregates",expand:"expand"},this.type=t,this.dataSource=e,this.pvt={}}return t.prototype.processResponse=function(t,e,i,r){return t},t}(),zn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Nn(e,t),e.prototype.processQuery=function(t,e){for(var i,r,n,o=t.dataSource.json.slice(0),s=o.length,a=!0,l={},h=0,u=[],c=0;c<e.lazyLoad.length;c++)h++,l[e.lazyLoad[c].key]=e.lazyLoad[c].value;var p={};for(c=0;c<e.queries.length;c++)"onPage"!==(r=e.queries[c]).fn&&"onGroup"!==r.fn||!e.lazyLoad.length?(i=this[r.fn].call(this,o,r.e,e),"onAggregates"===r.fn?p[r.e.field+" - "+r.e.type]=i:o=void 0!==i?i:o,"onPage"!==r.fn&&"onSkip"!==r.fn&&"onTake"!==r.fn&&"onRange"!==r.fn||(a=!1),a&&(s=o.length)):("onGroup"===r.fn&&u.push(r.e),"onPage"===r.fn&&(n=r.e));if(h){var d={query:e,lazyLoad:l,result:o,group:u,page:n},f=this.lazyLoadGroup(d);o=f.result,s=f.count}return e.isCountRequired&&(o={result:o,count:s,aggregates:p}),o},e.prototype.lazyLoadGroup=function(t){var e=0,i=this.getAggregate(t.query),r=t.result;if(c(t.lazyLoad.onDemandGroupInfo)){s=t.group[0].fieldName;e=(r=An.group(r,s,i,null,null,t.group[0].comparer,!0)).length;a=r;t.page&&(r=this.onPage(r,t.page,t.query)),this.formGroupResult(r,a)}else{for(var n=t.lazyLoad.onDemandGroupInfo,o=n.where.length-1;o>=0;o--)r=this.onWhere(r,n.where[o]);if(t.group.length!==n.level){var s=t.group[n.level].fieldName;r=An.group(r,s,i,null,null,t.group[0].comparer,!0)}e=r.length;var a=r;r=(r=r.slice(n.skip)).slice(0,n.take),t.group.length!==n.level&&this.formGroupResult(r,a)}return{result:r,count:e}},e.prototype.formGroupResult=function(t,e){if(t.length&&e.length){t.GroupGuid=e.GroupGuid,t.childLevels=e.childLevels,t.level=e.level,t.records=e.records}return t},e.prototype.getAggregate=function(t){var e=jn.filterQueries(t.queries,"onAggregates"),i=[];if(e.length)for(var r=void 0,n=0;n<e.length;n++)r=e[n].e,i.push({type:r.type,field:An.getValue(r.field,t)});return i},e.prototype.batchRequest=function(t,e,i){var r,n=e.deletedRecords.length;for(r=0;r<e.addedRecords.length;r++)this.insert(t,e.addedRecords[r]);for(r=0;r<e.changedRecords.length;r++)this.update(t,i.key,e.changedRecords[r]);for(r=0;r<n;r++)this.remove(t,i.key,e.deletedRecords[r]);return e},e.prototype.onWhere=function(t,e){return t&&t.length?t.filter(function(t){if(e)return e.validate(t)}):t},e.prototype.onAggregates=function(t,e){var i=An.aggregates[e.type];return t&&i&&0!==t.length?i(t,e.field):null},e.prototype.onSearch=function(t,e){return t&&t.length?(0===e.fieldNames.length&&An.getFieldList(t[0],e.fieldNames),t.filter(function(t){for(var i=0;i<e.fieldNames.length;i++)if(e.comparer.call(t,An.getObject(e.fieldNames[i],t),e.searchKey,e.ignoreCase,e.ignoreAccent))return!0;return!1})):t},e.prototype.onSortBy=function(t,e,i){if(!t||!t.length)return t;var r,n=An.getValue(e.fieldName,i);if(!n)return t.sort(e.comparer);if(n instanceof Array){for(var o=(n=n.slice(0)).length-1;o>=0;o--)n[o]&&(r=e.comparer,An.endsWith(n[o]," desc")&&(r=An.fnSort("descending"),n[o]=n[o].replace(" desc","")),t=An.sort(t,n[o],r));return t}return An.sort(t,n,e.comparer)},e.prototype.onGroup=function(t,e,i){if(!t||!t.length)return t;var r=this.getAggregate(i);return An.group(t,An.getValue(e.fieldName,i),r,null,null,e.comparer)},e.prototype.onPage=function(t,e,i){var r=An.getValue(e.pageSize,i),n=(An.getValue(e.pageIndex,i)-1)*r,o=n+r;return t&&t.length?t.slice(n,o):t},e.prototype.onRange=function(t,e){return t&&t.length?t.slice(An.getValue(e.start),An.getValue(e.end)):t},e.prototype.onTake=function(t,e){return t&&t.length?t.slice(0,An.getValue(e.nos)):t},e.prototype.onSkip=function(t,e){return t&&t.length?t.slice(An.getValue(e.nos)):t},e.prototype.onSelect=function(t,e){return t&&t.length?An.select(t,An.getValue(e.fieldNames)):t},e.prototype.insert=function(t,e,i,r,n){return c(n)?t.dataSource.json.push(e):t.dataSource.json.splice(n,0,e)},e.prototype.remove=function(t,e,i,r){var n,o=t.dataSource.json;for("object"!=typeof i||i instanceof Date||(i=An.getObject(e,i)),n=0;n<o.length&&An.getObject(e,o[n])!==i;n++);return n!==o.length?o.splice(n,1):null},e.prototype.update=function(t,e,i,r){var n,s,a=t.dataSource.json;for(c(e)||(s=o(e,i)),n=0;n<a.length&&(c(e)||o(e,a[n])!==s);n++);return n<a.length?h(a[n],i):null},e}(Vn),Gn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Nn(e,t),e.prototype.processQuery=function(t,e,i){var r,n,o=this.getQueryRequest(e),s=jn.filterQueryLists(e.queries,["onSelect","onPage","onSkip","onTake","onRange"]),a=e.params,l=t.dataSource.url,h=null,u=this.options,p={sorts:[],groups:[],filters:[],searches:[],aggregates:[]};"onPage"in s?(r=s.onPage,n=((n=An.getValue(r.pageIndex,e))-1)*(h=An.getValue(r.pageSize,e))):"onRange"in s&&(n=(r=s.onRange).start,h=r.end-r.start);for(var d=0;d<o.sorts.length;d++)r=An.getValue(o.sorts[d].e.fieldName,e),p.sorts.push(An.callAdaptorFunction(this,"onEachSort",{name:r,direction:o.sorts[d].e.direction},e));i&&(r=this.getFiltersFrom(i,e))&&p.filters.push(An.callAdaptorFunction(this,"onEachWhere",r.toJson(),e));for(d=0;d<o.filters.length;d++){var f=An.callAdaptorFunction(this,"onEachWhere",o.filters[d].e.toJson(),e);this.getModuleName&&"ODataV4Adaptor"===this.getModuleName()&&!c(o.filters[d].e.key)&&o.filters.length>1&&(f="("+f+")"),p.filters.push(f);for(var g=0,m="object"==typeof p.filters[d]?Object.keys(p.filters[d]):[];g<m.length;g++){var y=m[g];An.isNull(p[y])&&delete p[y]}}for(d=0;d<o.searches.length;d++)r=o.searches[d].e,p.searches.push(An.callAdaptorFunction(this,"onEachSearch",{fields:r.fieldNames,operator:r.operator,key:r.searchKey,ignoreCase:r.ignoreCase},e));for(d=0;d<o.groups.length;d++)p.groups.push(An.getValue(o.groups[d].e.fieldName,e));for(d=0;d<o.aggregates.length;d++)r=o.aggregates[d].e,p.aggregates.push({type:r.type,field:An.getValue(r.field,e)});var b={};if(this.getRequestQuery(u,e,s,p,b),An.callAdaptorFunction(this,"addParams",{dm:t,query:e,params:a,reqParams:b}),e.lazyLoad.length)for(d=0;d<e.lazyLoad.length;d++)b[e.lazyLoad[d].key]=e.lazyLoad[d].value;for(var v=0,w=Object.keys(b);v<w.length;v++){y=w[v];(An.isNull(b[y])||""===b[y]||0===b[y].length)&&delete b[y]}u.skip in b&&u.take in b||null===h||(b[u.skip]=An.callAdaptorFunction(this,"onSkip",n,e),b[u.take]=An.callAdaptorFunction(this,"onTake",h,e));var S=this.pvt;return this.pvt={},"json"===this.options.requestType?{data:JSON.stringify(b,An.parse.jsonDateReplacer),url:l,pvtData:S,type:"POST",contentType:"application/json; charset=utf-8"}:(r=this.convertToQueryString(b,e,t),r=(-1!==t.dataSource.url.indexOf("?")?"&":"/")+r,{type:"GET",url:r.length?l.replace(/\/*$/,r):l,pvtData:S})},e.prototype.getRequestQuery=function(t,e,i,r,n){var o=n;o[t.from]=e.fromTable,t.apply&&e.distincts.length&&(o[t.apply]="onDistinct"in this?An.callAdaptorFunction(this,"onDistinct",e.distincts):""),!e.distincts.length&&t.expand&&(o[t.expand]="onExpand"in this&&"onSelect"in i?An.callAdaptorFunction(this,"onExpand",{selects:An.getValue(i.onSelect.fieldNames,e),expands:e.expands},e):e.expands),o[t.select]="onSelect"in i&&!e.distincts.length?An.callAdaptorFunction(this,"onSelect",An.getValue(i.onSelect.fieldNames,e),e):"",o[t.count]=e.isCountRequired?An.callAdaptorFunction(this,"onCount",e.isCountRequired,e):"",o[t.search]=r.searches.length?An.callAdaptorFunction(this,"onSearch",r.searches,e):"",o[t.skip]="onSkip"in i?An.callAdaptorFunction(this,"onSkip",An.getValue(i.onSkip.nos,e),e):"",o[t.take]="onTake"in i?An.callAdaptorFunction(this,"onTake",An.getValue(i.onTake.nos,e),e):"",o[t.where]=r.filters.length||r.searches.length?An.callAdaptorFunction(this,"onWhere",r.filters,e):"",o[t.sortBy]=r.sorts.length?An.callAdaptorFunction(this,"onSortBy",r.sorts,e):"",o[t.group]=r.groups.length?An.callAdaptorFunction(this,"onGroup",r.groups,e):"",o[t.aggregates]=r.aggregates.length?An.callAdaptorFunction(this,"onAggregates",r.aggregates,e):"",o.param=[]},e.prototype.convertToQueryString=function(t,e,i){return""},e.prototype.processResponse=function(t,e,i,r,n,o){if(r&&r.getResponseHeader("Content-Type")&&-1!==r.getResponseHeader("Content-Type").indexOf("application/json")){var s=An.timeZoneHandling;e&&!e.timeZoneHandling&&(An.timeZoneHandling=!1),t=An.parse.parseJson(t),An.timeZoneHandling=s}var a=n,l=a.pvtData||{},h=t?t.groupDs:[];if(r&&r.getResponseHeader("Content-Type")&&-1!==r.getResponseHeader("Content-Type").indexOf("xml"))return i.isCountRequired?{result:[],count:0}:[];var u=JSON.parse(a.data);if(u&&"batch"===u.action&&t&&t.addedRecords)return o.addedRecords=t.addedRecords,o;t&&t.d&&(t=t.d);var p={};t&&"count"in t&&(p.count=t.count),p.result=t&&t.result?t.result:t;var d=!1;if(Array.isArray(t.result)&&t.result.length){if(c(t.result[0].key)||(p.result=this.formRemoteGroupedData(p.result,1,l.groups.length-1)),i&&i.lazyLoad.length&&l.groups.length)for(var f=0;f<i.lazyLoad.length;f++)if("onDemandGroupInfo"===i.lazyLoad[f].key){var g=i.lazyLoad[f].value.level;l.groups.length===g&&(d=!0)}}return d||this.getAggregateResult(l,t,p,h,i),An.isNull(p.count)?p.result:{result:p.result,count:p.count,aggregates:p.aggregates}},e.prototype.formRemoteGroupedData=function(t,e,i){for(var r=0;r<t.length;r++)t[r].items.length&&Object.keys(t[r].items[0]).indexOf("key")>-1&&this.formRemoteGroupedData(t[r].items,e+1,i-1);return t.GroupGuid=Fn.GroupGuid,t.level=e,t.childLevels=i,t.records=t[0].items.length?this.getGroupedRecords(t,!c(t[0].items.records)):[],t},e.prototype.getGroupedRecords=function(t,e){for(var i=[],r=0;r<t.length;r++)if(e)i=i.concat(t[r].items.records);else for(var n=0;n<t[r].items.length;n++)i.push(t[r].items[n]);return i},e.prototype.onGroup=function(t){return this.pvt.groups=t,t},e.prototype.onAggregates=function(t){this.pvt.aggregates=t},e.prototype.batchRequest=function(t,e,i,r,n){return{type:"POST",url:t.dataSource.batchUrl||t.dataSource.crudUrl||t.dataSource.removeUrl||t.dataSource.url,contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(u({},{changed:e.changedRecords,added:e.addedRecords,deleted:e.deletedRecords,action:"batch",table:i[void 0],key:i[void 0]},An.getAddParams(this,t,r)))}},e.prototype.beforeSend=function(t,e){},e.prototype.insert=function(t,e,i,r){return{url:t.dataSource.insertUrl||t.dataSource.crudUrl||t.dataSource.url,data:JSON.stringify(u({},{value:e,table:i,action:"insert"},An.getAddParams(this,t,r)))}},e.prototype.remove=function(t,e,i,r,n){return{type:"POST",url:t.dataSource.removeUrl||t.dataSource.crudUrl||t.dataSource.url,data:JSON.stringify(u({},{key:i,keyColumn:e,table:r,action:"remove"},An.getAddParams(this,t,n)))}},e.prototype.update=function(t,e,i,r,n){return{type:"POST",url:t.dataSource.updateUrl||t.dataSource.crudUrl||t.dataSource.url,data:JSON.stringify(u({},{value:i,action:"update",keyColumn:e,key:An.getObject(e,i),table:r},An.getAddParams(this,t,n)))}},e.prototype.getFiltersFrom=function(t,e){var i,r=e.fKey,n=r,o=e.key,s=[];"object"!=typeof t[0]&&(n=null);for(var a=0;a<t.length;a++)i="object"==typeof t[0]?An.getObject(o||n,t[a]):t[a],s.push(new In(r,"equal",i));return In.or(s)},e.prototype.getAggregateResult=function(t,e,i,r,n){var o=e;if(e&&e.result&&(o=e.result),t&&t.aggregates&&t.aggregates.length){var s=t.aggregates,a=void 0,l=o,h={};e.aggregate&&(l=e.aggregate);for(var u=0;u<s.length;u++)(a=An.aggregates[s[u].type])&&(h[s[u].field+" - "+s[u].type]=a(l,s[u].field));i.aggregates=h}var p=Array.isArray(e.result)&&e.result.length&&!c(e.result[0].key);if(t&&t.groups&&t.groups.length&&!p){var d=t.groups;for(u=0;u<d.length;u++){c(r)||(r=An.group(r,d[u]));var f=jn.filterQueries(n.queries,"onGroup")[u].e;o=An.group(o,d[u],t.aggregates,null,r,f.comparer)}i.result=o}return i},e.prototype.getQueryRequest=function(t){var e={sorts:[],groups:[],filters:[],searches:[],aggregates:[]};return e.sorts=jn.filterQueries(t.queries,"onSortBy"),e.groups=jn.filterQueries(t.queries,"onGroup"),e.filters=jn.filterQueries(t.queries,"onWhere"),e.searches=jn.filterQueries(t.queries,"onSearch"),e.aggregates=jn.filterQueries(t.queries,"onAggregates"),e},e.prototype.addParams=function(t){var e=t.reqParams;t.params.length&&(e.params={});for(var i=0,r=t.params;i<r.length;i++){var n=r[i];if(e[n.key])throw new Error("Query() - addParams: Custom Param is conflicting other request arguments");e[n.key]=n.value,n.fn&&(e[n.key]=n.fn.call(t.query,n.key,t.query,t.dm)),e.params[n.key]=e[n.key]}},e}(Vn),_n=function(t){function e(e){var i=t.call(this)||this;return i.options=u({},i.options,{requestType:"get",accept:"application/json;odata=light;q=1,application/json;odata=verbose;q=0.5",multipartAccept:"multipart/mixed",sortBy:"$orderby",select:"$select",skip:"$skip",take:"$top",count:"$inlinecount",where:"$filter",expand:"$expand",batch:"$batch",changeSet:"--changeset_",batchPre:"batch_",contentId:"Content-Id: ",batchContent:"Content-Type: multipart/mixed; boundary=",changeSetContent:"Content-Type: application/http\nContent-Transfer-Encoding: binary ",batchChangeSetContentType:"Content-Type: application/json; charset=utf-8 ",updateType:"PUT"}),u(i.options,e||{}),i}return Nn(e,t),e.prototype.getModuleName=function(){return"ODataAdaptor"},e.prototype.onPredicate=function(t,i,r){var n,o,s="",a=t.value,l=typeof a,h=t.field?e.getField(t.field):null;if(a instanceof Date&&(a="datetime'"+An.parse.replacer(a)+"'"),"string"===l&&(a=a.replace(/'/g,"''"),t.ignoreCase&&(a=a.toLowerCase()),a="'"+(a=encodeURIComponent(a))+"'",r&&(h="cast("+h+", 'Edm.String')"),An.parse.isGuid(a)&&(o="guid"),t.ignoreCase&&(o||(h="tolower("+h+")"),a=a.toLowerCase())),n=An.odBiOperator[t.operator])return s+=h,s+=n,o&&(s+=o),s+a;if("substringof"===(n=c(this.getModuleName)||"ODataV4Adaptor"!==this.getModuleName()?An.odUniOperator[t.operator]:An.odv4UniOperator[t.operator])){var u=a;a=h,h=u}return s+=n+"(",s+=h+",",o&&(s+=o),s+=a+")"},e.prototype.addParams=function(e){t.prototype.addParams.call(this,e),delete e.reqParams.params},e.prototype.onComplexPredicate=function(t,e,i){for(var r=[],n=0;n<t.predicates.length;n++)r.push("("+this.onEachWhere(t.predicates[n],e,i)+")");return r.join(" "+t.condition+" ")},e.prototype.onEachWhere=function(t,e,i){return t.isComplex?this.onComplexPredicate(t,e,i):this.onPredicate(t,e,i)},e.prototype.onWhere=function(t){return this.pvt.search&&t.push(this.onEachWhere(this.pvt.search,null,!0)),t.join(" and ")},e.prototype.onEachSearch=function(t){t.fields&&0===t.fields.length&&An.throwError("Query() - Search : oData search requires list of field names to search");for(var e=this.pvt.search||[],i=0;i<t.fields.length;i++)e.push(new In(t.fields[i],t.operator,t.key,t.ignoreCase));this.pvt.search=e},e.prototype.onSearch=function(t){return this.pvt.search=In.or(this.pvt.search),""},e.prototype.onEachSort=function(t){var i=[];if(t.name instanceof Array)for(var r=0;r<t.name.length;r++)i.push(e.getField(t.name[r])+("descending"===t.direction?" desc":""));else i.push(e.getField(t.name)+("descending"===t.direction?" desc":""));return i.join(",")},e.prototype.onSortBy=function(t){return t.reverse().join(",")},e.prototype.onGroup=function(t){return this.pvt.groups=t,[]},e.prototype.onSelect=function(t){for(var i=0;i<t.length;i++)t[i]=e.getField(t[i]);return t.join(",")},e.prototype.onAggregates=function(t){return this.pvt.aggregates=t,""},e.prototype.onCount=function(t){return!0===t?"allpages":""},e.prototype.beforeSend=function(t,e,i){An.endsWith(i.url,this.options.batch)&&"post"===i.type.toLowerCase()?(e.setRequestHeader("Accept",this.options.multipartAccept),e.setRequestHeader("DataServiceVersion","2.0"),e.overrideMimeType("text/plain; charset=x-user-defined")):e.setRequestHeader("Accept",this.options.accept),e.setRequestHeader("DataServiceVersion","2.0"),e.setRequestHeader("MaxDataServiceVersion","2.0")},e.prototype.processResponse=function(t,e,i,r,n,o){if(n&&"GET"===n.type&&!this.rootUrl&&t["odata.metadata"]){var s=t["odata.metadata"].split("/$metadata#");this.rootUrl=s[0],this.resourceTableName=s[1]}if(!c(t.d)){var a=i&&i.isCountRequired?t.d.results:t.d;if(!c(a))for(var l=0;l<a.length;l++)c(a[l].__metadata)||delete a[l].__metadata}var h=n&&n.pvtData,u=this.processBatchResponse(t,i,r,n,o);if(u)return u;var p=r&&n.getResponseHeader("DataServiceVersion"),d=null,f=p&&parseInt(p,10)||2;if(i&&i.isCountRequired){(t.__count||t["odata.count"])&&(d=t.__count||t["odata.count"]),t.d&&(t=t.d),(t.__count||t["odata.count"])&&(d=t.__count||t["odata.count"])}3===f&&t.value&&(t=t.value),t.d&&(t=t.d),f<3&&t.results&&(t=t.results);var g={};return g.count=d,g.result=t,this.getAggregateResult(h,t,g,null,i),An.isNull(d)?g.result:{result:g.result,count:g.count,aggregates:g.aggregates}},e.prototype.convertToQueryString=function(t,e,i){var r=[],n=t.table||"";delete t.table,i.dataSource.requiresFormat&&(t.$format="json");for(var o=0,s=Object.keys(t);o<s.length;o++){var a=s[o];r.push(a+"="+t[a])}return r=r.join("&"),i.dataSource.url&&-1!==i.dataSource.url.indexOf("?")&&!n?r:r.length?n+"?"+r:n||""},e.prototype.localTimeReplacer=function(t,e){for(var i=0,r=c(e)?[]:Object.keys(e);i<r.length;i++){var n=r[i];e[n]instanceof Date&&(e[n]=An.dateParse.toLocalTime(e[n]))}return e},e.prototype.insert=function(t,e,i){return{url:(t.dataSource.insertUrl||t.dataSource.url).replace(/\/*$/,i?"/"+i:""),data:JSON.stringify(e,this.options.localTime?this.localTimeReplacer:null)}},e.prototype.remove=function(t,e,i,r){var n;return n="string"!=typeof i||An.parse.isGuid(i)?"("+i+")":"('"+i+"')",{type:"DELETE",url:(t.dataSource.removeUrl||t.dataSource.url).replace(/\/*$/,r?"/"+r:"")+n}},e.prototype.update=function(t,e,i,r,n,o){"PATCH"!==this.options.updateType||c(o)||(i=this.compareAndRemove(i,o,e));var s;return s="string"!=typeof i[e]||An.parse.isGuid(i[e])?"("+i[e]+")":"('"+i[e]+"')",{type:this.options.updateType,url:(t.dataSource.updateUrl||t.dataSource.url).replace(/\/*$/,r?"/"+r:"")+s,data:JSON.stringify(i,this.options.localTime?this.localTimeReplacer:null),accept:this.options.accept}},e.prototype.batchRequest=function(t,e,i,r,n){var o=i.guid=An.getGuid(this.options.batchPre),s=this.rootUrl?this.rootUrl+"/"+this.options.batch:t.dataSource.url.replace(/\/*$/,"/"+this.options.batch);i.url=this.resourceTableName?this.resourceTableName:i.url;var a={url:i.url,key:i.key,cid:1,cSet:An.getGuid(this.options.changeSet)},l="--"+o+"\n";return l+="Content-Type: multipart/mixed; boundary="+a.cSet.replace("--","")+"\n",this.pvt.changeSet=0,l+=this.generateInsertRequest(e.addedRecords,a,t),l+=this.generateUpdateRequest(e.changedRecords,a,t,n?n.changedRecords:[]),l+=this.generateDeleteRequest(e.deletedRecords,a,t),l+=a.cSet+"--\n",l+="--"+o+"--",{type:"POST",url:s,dataType:"json",contentType:"multipart/mixed; charset=UTF-8;boundary="+o,data:l}},e.prototype.generateDeleteRequest=function(t,e,i){if(!t)return"";var r={method:"DELETE ",url:function(t,e,i){var r=An.getObject(i,t[e]);if("number"==typeof r||An.parse.isGuid(r))return"("+r+")";if(r instanceof Date){return"("+t[e][i].toJSON()+")"}return"('"+r+"')"},data:function(t,e){return""}};return this.generateBodyContent(t,e,r,i)+"\n"},e.prototype.generateInsertRequest=function(t,e,i){if(!t)return"";var r={method:"POST ",url:function(t,e,i){return""},data:function(t,e){return JSON.stringify(t[e])+"\n\n"}};return this.generateBodyContent(t,e,r,i)},e.prototype.generateUpdateRequest=function(t,e,i,r){var n=this;if(!t)return"";t.forEach(function(t){return t=n.compareAndRemove(t,r.filter(function(i){return An.getObject(e.key,i)===An.getObject(e.key,t)})[0],e.key)});var o={method:this.options.updateType+" ",url:function(t,e,i){if("number"==typeof t[e][i]||An.parse.isGuid(t[e][i]))return"("+t[e][i]+")";if(t[e][i]instanceof Date){return"("+t[e][i].toJSON()+")"}return"('"+t[e][i]+"')"},data:function(t,e){return JSON.stringify(t[e])+"\n\n"}};return this.generateBodyContent(t,e,o,i)},e.getField=function(t){return t.replace(/\./g,"/")},e.prototype.generateBodyContent=function(t,e,i,r){for(var n="",o=0;o<t.length;o++)n+="\n"+e.cSet+"\n",n+=this.options.changeSetContent+"\n\n",n+=i.method,"POST "===i.method?n+=(r.dataSource.insertUrl||r.dataSource.crudUrl||e.url)+i.url(t,o,e.key)+" HTTP/1.1\n":"PUT "===i.method||"PATCH "===i.method?n+=(r.dataSource.updateUrl||r.dataSource.crudUrl||e.url)+i.url(t,o,e.key)+" HTTP/1.1\n":"DELETE "===i.method&&(n+=(r.dataSource.removeUrl||r.dataSource.crudUrl||e.url)+i.url(t,o,e.key)+" HTTP/1.1\n"),n+="Accept: "+this.options.accept+"\n",n+="Content-Id: "+this.pvt.changeSet+++"\n",n+=this.options.batchChangeSetContentType+"\n",c(t[o]["@odata.etag"])?n+="\n":(n+="If-Match: "+t[o]["@odata.etag"]+"\n\n",delete t[o]["@odata.etag"]),n+=i.data(t,o);return n},e.prototype.processBatchResponse=function(t,e,i,r,n){if(i&&i.getResponseHeader("Content-Type")&&-1!==i.getResponseHeader("Content-Type").indexOf("xml"))return e.isCountRequired?{result:[],count:0}:[];if(r&&this.options.batch&&An.endsWith(r.url,this.options.batch)&&"post"===r.type.toLowerCase()){var o=i.getResponseHeader("Content-Type"),s=void 0,a=void 0,l=t+"";if(o=o.substring(o.indexOf("=batchresponse")+1),(l=l.split(o)).length<2)return{};l=l[1];var h=/(?:\bContent-Type.+boundary=)(changesetresponse.+)/i.exec(l);h&&l.replace(h[0],"");for(var c=h?h[1]:"",p=(l=l.split(c)).length;p>-1;p--)/\bContent-ID:/i.test(l[p])&&/\bHTTP.+201/.test(l[p])&&(s=parseInt(/\bContent-ID: (\d+)/i.exec(l[p])[1],10),n.addedRecords[s]&&(a=An.parse.parseJson(/^\{.+\}/m.exec(l[p])[0]),u({},n.addedRecords[s],this.processResponse(a))));return n}return null},e.prototype.compareAndRemove=function(t,e,i){var r=this;return c(e)?t:(Object.keys(t).forEach(function(n){if(n!==i&&"@odata.etag"!==n)if(An.isPlainObject(t[n])){r.compareAndRemove(t[n],e[n]);0===Object.keys(t[n]).filter(function(t){return"@odata.etag"!==t}).length&&delete t[n]}else t[n]===e[n]?delete t[n]:t[n]&&e[n]&&t[n].valueOf()===e[n].valueOf()&&delete t[n]}),t)},e}(Gn),Hn=(function(t){function e(e){var i=t.call(this,e)||this;return i.options=u({},i.options,{requestType:"get",accept:"application/json, text/javascript, */*; q=0.01",multipartAccept:"multipart/mixed",sortBy:"$orderby",select:"$select",skip:"$skip",take:"$top",count:"$count",search:"$search",where:"$filter",expand:"$expand",batch:"$batch",changeSet:"--changeset_",batchPre:"batch_",contentId:"Content-Id: ",batchContent:"Content-Type: multipart/mixed; boundary=",changeSetContent:"Content-Type: application/http\nContent-Transfer-Encoding: binary ",batchChangeSetContentType:"Content-Type: application/json; charset=utf-8 ",updateType:"PATCH",localTime:!1,apply:"$apply"}),u(i.options,e||{}),i}Nn(e,t),e.prototype.getModuleName=function(){return"ODataV4Adaptor"},e.prototype.onCount=function(t){return!0===t?"true":""},e.prototype.onPredicate=function(e,i,r){var n="",o=e.value,s=o instanceof Date;if(i instanceof jn)for(var a=this.getQueryRequest(i),l=0;l<a.filters.length;l++)a.filters[l].e.key===e.value&&(r=!0);return n=t.prototype.onPredicate.call(this,e,i,r),s&&(n=n.replace(/datetime'(.*)'$/,"$1")),An.parse.isGuid(o)&&(n=n.replace("guid","").replace(/'/g,"")),n},e.prototype.onEachSearch=function(t){var e=this.pvt.searches||[];e.push(t.key),this.pvt.searches=e},e.prototype.onSearch=function(t){return this.pvt.searches.join(" OR ")},e.prototype.onExpand=function(t){var e=this,i={},r={},n=t.expands.slice(),o=[];return t.selects.filter(function(t){return t.indexOf(".")>-1}).forEach(function(t){var r=t.split(".");if(r[0]in i||(i[r[0]]=[]),2==r.length)i[r[0]].length&&-1!==Object.keys(i).indexOf(r[0])?-1!==i[r[0]][0].indexOf("$expand")&&-1===i[r[0]][0].indexOf(";$select=")?i[r[0]][0]=i[r[0]][0]+";$select="+r[1]:i[r[0]][0]=i[r[0]][0]+","+r[1]:i[r[0]].push("$select="+r[1]);else{for(var n="$select="+r[r.length-1],o="",s="",a=1;a<r.length-1;a++)o=o+"$expand="+r[a]+"(",s+=")";var l=o+n+s;if(i[r[0]].length&&-1!==Object.keys(i).indexOf(r[0])&&e.expandQueryIndex(i[r[0]],!0)){var h=e.expandQueryIndex(i[r[0]]);i[r[0]][h]=i[r[0]][h]+l.replace("$expand=",",")}else i[r[0]].push(l)}}),Object.keys(i).forEach(function(t){-1===n.indexOf(t)&&n.push(t)}),n.forEach(function(t){r[t]=t in i?t+"("+i[t].join(";")+")":t}),Object.keys(r).forEach(function(t){return o.push(r[t])}),o.join(",")},e.prototype.expandQueryIndex=function(t,e){for(var i=0;i<t.length;i++)if(-1!==t[i].indexOf("$expand"))return!!e||i;return!e&&0},e.prototype.onDistinct=function(t){return"groupby(("+t.map(function(t){return _n.getField(t)}).join(",")+"))"},e.prototype.onSelect=function(e){return t.prototype.onSelect.call(this,e.filter(function(t){return-1===t.indexOf(".")}))},e.prototype.beforeSend=function(t,e,i){"POST"!==i.type&&"PUT"!==i.type&&"PATCH"!==i.type||e.setRequestHeader("Prefer","return=representation"),e.setRequestHeader("Accept",this.options.accept)},e.prototype.processResponse=function(e,i,r,n,o,s){if(o&&"GET"===o.type&&!this.rootUrl&&e["@odata.context"]){var a=e["@odata.context"].split("/$metadata#");this.rootUrl=a[0],this.resourceTableName=a[1]}var l=o&&o.pvtData,h=t.prototype.processBatchResponse.call(this,e,r,n,o,s);if(h)return h;var u=null;r&&r.isCountRequired&&"@odata.count"in e&&(u=e["@odata.count"]),e=c(e.value)?e:e.value;var p={};return p.count=u,p.result=e,this.getAggregateResult(l,e,p,null,r),An.isNull(u)?p.result:{result:p.result,count:u,aggregates:p.aggregates}}}(_n),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Nn(e,t),e.prototype.getModuleName=function(){return"WebApiAdaptor"},e.prototype.insert=function(t,e,i){return{type:"POST",url:t.dataSource.url,data:JSON.stringify(e)}},e.prototype.remove=function(t,e,i,r){return{type:"DELETE",url:t.dataSource.url+"/"+i,data:JSON.stringify(i)}},e.prototype.update=function(t,e,i,r){return{type:"PUT",url:t.dataSource.url,data:JSON.stringify(i)}},e.prototype.batchRequest=function(t,e,i){var r=this,n=i.guid=An.getGuid(this.options.batchPre),o=t.dataSource.url.replace(/\/*$/,"/"+this.options.batch);i.url=this.resourceTableName?this.resourceTableName:i.url;for(var s=[],a=function(r,o){e.addedRecords.forEach(function(o,a){var l=function(t,e,i){return""};s.push("--"+n),s.push("Content-Type: application/http; msgtype=request",""),s.push("POST /api/"+(t.dataSource.insertUrl||t.dataSource.crudUrl||i.url)+l(e.addedRecords,r,i.key)+" HTTP/1.1"),s.push("Content-Type: application/json; charset=utf-8"),s.push("Host: "+location.host),s.push("",o?JSON.stringify(o):"")})},l=0,h=e.addedRecords.length;l<h;l++)a(l);var u=function(o,a){e.changedRecords.forEach(function(a,l){r.options.updateType;var h=function(t,e,i){return""};s.push("--"+n),s.push("Content-Type: application/http; msgtype=request",""),s.push("PUT /api/"+(t.dataSource.updateUrl||t.dataSource.crudUrl||i.url)+h(e.changedRecords,o,i.key)+" HTTP/1.1"),s.push("Content-Type: application/json; charset=utf-8"),s.push("Host: "+location.host),s.push("",a?JSON.stringify(a):"")})};for(l=0,h=e.changedRecords.length;l<h;l++)u(l);var c=function(r,o){e.deletedRecords.forEach(function(o,a){var l=function(t,e,i){var r=An.getObject(i,t[e]);if("number"==typeof r||An.parse.isGuid(r))return"/"+r;if(r instanceof Date){return"/"+t[e][i].toJSON()}return"/'"+r+"'"};s.push("--"+n),s.push("Content-Type: application/http; msgtype=request",""),s.push("DELETE /api/"+(t.dataSource.removeUrl||t.dataSource.crudUrl||i.url)+l(e.deletedRecords,r,i.key)+" HTTP/1.1"),s.push("Content-Type: application/json; charset=utf-8"),s.push("Host: "+location.host),s.push("",o?JSON.stringify(o):"")})};for(l=0,h=e.deletedRecords.length;l<h;l++)c(l);return s.push("--"+n+"--",""),{type:"POST",url:o,contentType:"multipart/mixed; boundary="+n,data:s.join("\r\n")}},e.prototype.beforeSend=function(t,e,i){e.setRequestHeader("Accept","application/json, text/javascript, */*; q=0.01")},e.prototype.processResponse=function(t,e,i,r,n,o){var s=n&&n.pvtData,a=null,l={};if(n&&"post"!==n.type.toLowerCase()){var h=r&&n.getResponseHeader("DataServiceVersion"),u=h&&parseInt(h,10)||2;i&&i.isCountRequired&&(An.isNull(t.Count)||(a=t.Count)),u<3&&t.Items&&(t=t.Items),l.count=a,l.result=t,this.getAggregateResult(s,t,l,null,i)}return l.result=l.result||t,An.isNull(a)?l.result:{result:l.result,count:l.count,aggregates:l.aggregates}}}(_n),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Nn(e,t),e.prototype.processQuery=function(t,e,i){var r=(new Gn).processQuery(t,e,i),n=An.parse.parseJson(r.data),o={};if(n.param)for(var s=0;s<n.param.length;s++){var a=n.param[s],l=Object.keys(a)[0];o[l]=a[l]}o.value=n;return{data:JSON.stringify(o),url:r.url,pvtData:r.pvtData,type:"POST",contentType:"application/json; charset=utf-8"}}}(Gn),function(t){function e(){var e=t.call(this)||this;return s("beforeSend",Gn.prototype.beforeSend,e),e}return Nn(e,t),e.prototype.insert=function(t,e,i,r,n){return this.pvt.position=n,this.updateType="add",{url:t.dataSource.insertUrl||t.dataSource.crudUrl||t.dataSource.url,data:JSON.stringify(u({},{value:e,table:i,action:"insert"},An.getAddParams(this,t,r)))}},e.prototype.remove=function(e,i,r,n,o){return t.prototype.remove.call(this,e,i,r),{type:"POST",url:e.dataSource.removeUrl||e.dataSource.crudUrl||e.dataSource.url,data:JSON.stringify(u({},{key:r,keyColumn:i,table:n,action:"remove"},An.getAddParams(this,e,o)))}},e.prototype.update=function(t,e,i,r,n){return this.updateType="update",this.updateKey=e,{type:"POST",url:t.dataSource.updateUrl||t.dataSource.crudUrl||t.dataSource.url,data:JSON.stringify(u({},{value:i,action:"update",keyColumn:e,key:i[e],table:r},An.getAddParams(this,t,n)))}},e.prototype.processResponse=function(e,i,r,n,o,s,a){var l;if(e="batch"===(o?JSON.parse(o.data):e).action?An.parse.parseJson(e):e,"add"===this.updateType&&t.prototype.insert.call(this,i,e,null,null,this.pvt.position),"update"===this.updateType&&t.prototype.update.call(this,i,this.updateKey,e),this.updateType=void 0,e.added)for(l=0;l<e.added.length;l++)t.prototype.insert.call(this,i,e.added[l]);if(e.changed)for(l=0;l<e.changed.length;l++)t.prototype.update.call(this,i,a.key,e.changed[l]);if(e.deleted)for(l=0;l<e.deleted.length;l++)t.prototype.remove.call(this,i,a.key,e.deleted[l]);return e},e.prototype.batchRequest=function(t,e,i,r,n){return{type:"POST",url:t.dataSource.batchUrl||t.dataSource.crudUrl||t.dataSource.url,contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(u({},{changed:e.changedRecords,added:e.addedRecords,deleted:e.deletedRecords,action:"batch",table:i.url,key:i.key},An.getAddParams(this,t,r)))}},e.prototype.addParams=function(t){(new Gn).addParams(t)},e}(zn)),Wn=function(t){function e(e){var i=t.call(this)||this;return i.options=u({},i.options,{getData:new Function,addRecord:new Function,updateRecord:new Function,deleteRecord:new Function,batchUpdate:new Function}),u(i.options,e||{}),i}return Nn(e,t),e.prototype.getModuleName=function(){return"CustomDataAdaptor"},e}(Gn),Un=(function(t){function e(e){var i=t.call(this)||this;return i.opt=e,i.schema=i.opt.response,i.query=i.opt.query,i.getVariables=i.opt.getVariables?i.opt.getVariables:function(){},i.getQuery=function(){return i.query},i}Nn(e,t),e.prototype.getModuleName=function(){return"GraphQLAdaptor"},e.prototype.processQuery=function(e,i){var r=t.prototype.processQuery.apply(this,arguments),n=JSON.parse(r.data),o={};["skip","take","sorted","table","select","where","search","requiresCounts","aggregates","params"].filter(function(t){o[t]="searchwhereparams".indexOf(t)>-1?JSON.stringify(n[t]):n[t]});var s=this.getVariables()||{};s.datamanager=o;var a=JSON.stringify({query:this.getQuery(),variables:s});return r.data=a,r},e.prototype.processResponse=function(t,e,i,r,n){var s,a,l=t,h=o(this.schema.result,l.data);this.schema.count&&(s=o(this.schema.count,l.data)),this.schema.aggregates&&(a=c(a=o(this.schema.aggregates,l.data))?a:An.parse.parseJson(a));var u=n.pvtData||{},p={result:h,aggregates:a},d=p;return u&&u.groups&&u.groups.length&&this.getAggregateResult(u,d,p,null,i),c(s)?p.result:{result:p.result,count:s,aggregates:a}},e.prototype.insert=function(){var e=t.prototype.insert.apply(this,arguments);return this.generateCrudData(e,"insert")},e.prototype.update=function(){var e=t.prototype.update.apply(this,arguments);return this.generateCrudData(e,"update")},e.prototype.remove=function(){var e=t.prototype.remove.apply(this,arguments);return this.generateCrudData(e,"remove")},e.prototype.batchRequest=function(e,i,r,n,o){var s=t.prototype.batchRequest.apply(this,arguments),a=JSON.parse(s.data);return a.key=r.key,s.data=JSON.stringify(a),this.generateCrudData(s,"batch")},e.prototype.generateCrudData=function(t,e){var i=JSON.parse(t.data);return t.data=JSON.stringify({query:this.opt.getMutation(e),variables:i}),t}}(Gn),function(t){function e(e,i,r){var n=t.call(this)||this;n.isCrudAction=!1,n.isInsertAction=!1,c(e)||(n.cacheAdaptor=e),n.pageSize=r,n.guidId=An.getGuid("cacheAdaptor");window.localStorage.setItem(n.guidId,JSON.stringify({keys:[],results:[]}));var o=n.guidId;return c(i)||setInterval(function(){var t;t=An.parse.parseJson(window.localStorage.getItem(o));for(var e=[],r=0;r<t.results.length;r++){var n=+new Date,s=+new Date(t.results[r].timeStamp);t.results[r].timeStamp=n-s,n-s>i&&e.push(r)}for(r=0;r<e.length;r++)t.results.splice(e[r],1),t.keys.splice(e[r],1);window.localStorage.removeItem(o),window.localStorage.setItem(o,JSON.stringify(t))},i),n}return Nn(e,t),e.prototype.generateKey=function(t,e){var i=this.getQueryRequest(e),r=jn.filterQueryLists(e.queries,["onSelect","onPage","onSkip","onTake","onRange"]),n=t;"onPage"in r&&(n+=r.onPage.pageIndex),i.sorts.forEach(function(t){n+=t.e.direction+t.e.fieldName}),i.groups.forEach(function(t){n+=t.e.fieldName}),i.searches.forEach(function(t){n+=t.e.searchKey});for(var o=0;o<i.filters.length;o++){var s=i.filters[o];if(s.e.isComplex){var a=e.clone();a.queries=[];for(var l=0;l<s.e.predicates.length;l++)a.queries.push({fn:"onWhere",e:s.e.predicates[l],filter:e.queries.filter});n+=s.e.condition+this.generateKey(t,a)}else n+=s.e.field+s.e.operator+s.e.value}return n},e.prototype.processQuery=function(t,e,i){var r,n=this.generateKey(t.dataSource.url,e),o=(r=An.parse.parseJson(window.localStorage.getItem(this.guidId)))?r.results[r.keys.indexOf(n)]:null;return null==o||this.isCrudAction||this.isInsertAction?(this.isCrudAction=null,this.isInsertAction=null,this.cacheAdaptor.processQuery.apply(this.cacheAdaptor,[].slice.call(arguments,0))):o},e.prototype.processResponse=function(t,e,i,r,n,o){if(this.isInsertAction||n&&this.cacheAdaptor.options.batch&&An.endsWith(n.url,this.cacheAdaptor.options.batch)&&"post"===n.type.toLowerCase())return this.cacheAdaptor.processResponse(t,e,i,r,n,o);t=this.cacheAdaptor.processResponse.apply(this.cacheAdaptor,[].slice.call(arguments,0));var s=i?this.generateKey(e.dataSource.url,i):e.dataSource.url,a={},l=(a=An.parse.parseJson(window.localStorage.getItem(this.guidId))).keys.indexOf(s);for(-1!==l&&(a.results.splice(l,1),a.keys.splice(l,1)),a.results[a.keys.push(s)-1]={keys:s,result:t.result,timeStamp:new Date,count:t.count};a.results.length>this.pageSize;)a.results.splice(0,1),a.keys.splice(0,1);return window.localStorage.setItem(this.guidId,JSON.stringify(a)),t},e.prototype.beforeSend=function(t,e,i){!c(this.cacheAdaptor.options.batch)&&An.endsWith(i.url,this.cacheAdaptor.options.batch)&&"post"===i.type.toLowerCase()&&e.setRequestHeader("Accept",this.cacheAdaptor.options.multipartAccept),t.dataSource.crossDomain||e.setRequestHeader("Accept",this.cacheAdaptor.options.accept)},e.prototype.update=function(t,e,i,r){return this.isCrudAction=!0,this.cacheAdaptor.update(t,e,i,r)},e.prototype.insert=function(t,e,i){return this.isInsertAction=!0,this.cacheAdaptor.insert(t,e,i)},e.prototype.remove=function(t,e,i,r){return this.isCrudAction=!0,this.cacheAdaptor.remove(t,e,i,r)},e.prototype.batchRequest=function(t,e,i){return this.cacheAdaptor.batchRequest(t,e,i)},e}(Gn)),qn=function(){function t(t,e,i){var r=this;this.dateParse=!0,this.timeZoneHandling=!0,this.requests=[],t||this.dataSource||(t=[]),i=i||t.adaptor,t&&!1===t.timeZoneHandling&&(this.timeZoneHandling=t.timeZoneHandling);var n;return t instanceof Array?n={json:t,offline:!0}:"object"==typeof t?(t.json||(t.json=[]),n={url:t.url,insertUrl:t.insertUrl,removeUrl:t.removeUrl,updateUrl:t.updateUrl,crudUrl:t.crudUrl,batchUrl:t.batchUrl,json:t.json,headers:t.headers,accept:t.accept,data:t.data,timeTillExpiration:t.timeTillExpiration,cachingPageSize:t.cachingPageSize,enableCaching:t.enableCaching,requestType:t.requestType,key:t.key,crossDomain:t.crossDomain,jsonp:t.jsonp,dataType:t.dataType,offline:void 0!==t.offline?t.offline:!(t.adaptor instanceof Hn||t.adaptor instanceof Wn)&&!t.url,requiresFormat:t.requiresFormat}):An.throwError("DataManager: Invalid arguments"),void 0!==n.requiresFormat||An.isCors()||(n.requiresFormat=!!c(n.crossDomain)||n.crossDomain),void 0===n.dataType&&(n.dataType="json"),this.dataSource=n,this.defaultQuery=e,n.url&&n.offline&&!n.json.length?(this.isDataAvailable=!1,this.adaptor=i||new _n,this.dataSource.offline=!1,this.ready=this.executeQuery(e||new jn),this.ready.then(function(t){r.dataSource.offline=!0,r.isDataAvailable=!0,n.json=t.result,r.adaptor=new zn})):this.adaptor=n.offline?new zn:new _n,!n.jsonp&&this.adaptor instanceof _n&&(n.jsonp="callback"),this.adaptor=i||this.adaptor,n.enableCaching&&(this.adaptor=new Un(this.adaptor,n.timeTillExpiration,n.cachingPageSize)),this}return t.prototype.setDefaultQuery=function(t){return this.defaultQuery=t,this},t.prototype.executeLocal=function(e){this.defaultQuery||e instanceof jn||An.throwError("DataManager - executeLocal() : A query is required to execute"),this.dataSource.json||An.throwError("DataManager - executeLocal() : Json data is required to execute"),e=e||this.defaultQuery;var i=this.adaptor.processQuery(this,e);if(e.subQuery){var r=e.subQuery.fromTable,n=e.subQuery.lookups,o=e.isCountRequired?i.result:i;n&&n instanceof Array&&An.buildHierarchy(e.subQuery.fKey,r,o,n,e.subQuery.key);for(var s=0;s<o.length;s++)o[s][r]instanceof Array&&(o[s]=u({},{},o[s]),o[s][r]=this.adaptor.processResponse(e.subQuery.using(new t(o[s][r].slice(0))).executeLocal(),this,e))}return this.adaptor.processResponse(i,this,e)},t.prototype.executeQuery=function(e,i,r,n){var o=this,s="makeRequest";"function"==typeof e&&(n=r,r=i,i=e,e=null),e||(e=this.defaultQuery),e instanceof jn||An.throwError("DataManager - executeQuery() : A query is required to execute");var a=new Kn,l={query:e};if(!this.dataSource.offline&&void 0!==this.dataSource.url&&""!==this.dataSource.url||!c(this.adaptor[s])||this.isCustomDataAdaptor(this.adaptor)){var h=this.adaptor.processQuery(this,e);c(this.adaptor[s])?!c(h.url)||this.isCustomDataAdaptor(this.adaptor)?this.makeRequest(h,a,l,e):(l=t.getDeferedArgs(e,h,l),a.resolve(l)):this.adaptor[s](h,a,l,e)}else t.nextTick(function(){var i=o.executeLocal(e);l=t.getDeferedArgs(e,i,l),a.resolve(l)});return(i||r)&&a.promise.then(i,r),n&&a.promise.then(n,n),a.promise},t.getDeferedArgs=function(t,e,i){return t.isCountRequired?(i.result=e.result,i.count=e.count,i.aggregates=e.aggregates):i.result=e,i},t.nextTick=function(t){(window.setImmediate||window.setTimeout)(t,0)},t.prototype.extendRequest=function(t,e,i){return u({},{type:"GET",dataType:this.dataSource.dataType,crossDomain:this.dataSource.crossDomain,jsonp:this.dataSource.jsonp,cache:!0,processData:!1,onSuccess:e,onFailure:i},t)},t.prototype.makeRequest=function(t,e,i,r){var n=this,o=!!r.subQuerySelector,s=function(t){i.error=t,e.reject(i)},a=function(t,r,n,o,s,a,l){i.xhr=n,i.count=r?parseInt(r.toString(),10):0,i.result=t,i.request=o,i.aggregates=a,i.actual=s,i.virtualSelectRecords=l,e.resolve(i)},l=function(t,e){var l=new Kn,h={parent:i};r.subQuery.isChild=!0;var u=n.adaptor.processQuery(n,r.subQuery,t?n.adaptor.processResponse(t):e),c=n.makeRequest(u,l,h,r.subQuery);return o||l.then(function(e){t&&(An.buildHierarchy(r.subQuery.fKey,r.subQuery.fromTable,t,e,r.subQuery.key),a(t,e.count,e.xhr))},s),c},h=this.extendRequest(t,function(t,e){if(n.isGraphQLAdaptor(n.adaptor)&&!c(t.errors))return s(t.errors);n.isCustomDataAdaptor(n.adaptor)&&(e=u({},n.ajaxReqOption,e)),-1===e.httpRequest.getResponseHeader("Content-Type").indexOf("xml")&&n.dateParse&&(t=An.parse.parseJson(t));var i=n.adaptor.processResponse(t,n,r,e.httpRequest,e),h=0,p=null,d=t.virtualSelectRecords;r.isCountRequired&&(h=i.count,p=i.aggregates,i=i.result),r.subQuery?o||l(i,e):a(i,h,e.httpRequest,e.type,t,p,d)},s);if(this.isCustomDataAdaptor(this.adaptor)){this.ajaxReqOption=h;var p=h;this.adaptor.options.getData({data:p.data,onSuccess:p.onSuccess,onFailure:p.onFailure})}else{var d=new hi(h);d.beforeSend=function(){n.beforeSend(d.httpRequest,d)},(h=d.send()).catch(function(t){return!0}),this.requests.push(d)}if(o){var f=r.subQuerySelector.call(this,{query:r.subQuery,parent:r});f&&f.length?Promise.all([h,l(null,f)]).then(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=t[0],s=n.adaptor.processResponse(i[0],n,r,n.requests[0].httpRequest,n.requests[0]),l=0;r.isCountRequired&&(l=s.count,s=s.result);var h=n.adaptor.processResponse(i[1],n,r.subQuery,n.requests[1].httpRequest,n.requests[1]);l=0,r.subQuery.isCountRequired&&(l=h.count,h=h.result),An.buildHierarchy(r.subQuery.fKey,r.subQuery.fromTable,s,h,r.subQuery.key),o=!1,a(s,l,n.requests[0].httpRequest)}):o=!1}return h},t.prototype.beforeSend=function(t,e){this.adaptor.beforeSend(this,t,e);for(var i,r=this.dataSource.headers,n=0;r&&n<r.length;n++){i=[];for(var o=0,s=Object.keys(r[n]);o<s.length;o++){var a=s[o];i.push(a),t.setRequestHeader(a,r[n][a])}}},t.prototype.saveChanges=function(t,e,i,r,n){var o=this;i instanceof jn&&(r=i,i=null);var s={url:i,key:e||this.dataSource.key},a=this.adaptor.batchRequest(this,t,s,r||new jn,n);if(this.dataSource.offline)return a;if(c(this.adaptor.doAjaxRequest)){if(this.isCustomDataAdaptor(this.adaptor))return this.doAjaxRequest(a,this.adaptor.options.batchUpdate);var l=new Kn,h=new hi(a);return h.beforeSend=function(){o.beforeSend(h.httpRequest,h)},h.onSuccess=function(e,i){o.isGraphQLAdaptor(o.adaptor)&&(c(e.errors)||h.onFailure(JSON.stringify(e.errors))),l.resolve(o.adaptor.processResponse(e,o,null,i.httpRequest,i,t,s))},h.onFailure=function(t){l.reject([{error:t}])},h.send().catch(function(t){return!0}),l.promise}return this.adaptor.doAjaxRequest(a)},t.prototype.insert=function(t,e,i,r){e instanceof jn&&(i=e,e=null);var n=this.adaptor.insert(this,t,e,i,r);return this.dataSource.offline?n:c(this.adaptor.doAjaxRequest)?this.doAjaxRequest(n,this.adaptor.options.addRecord):this.adaptor.doAjaxRequest(n)},t.prototype.remove=function(t,e,i,r){"object"==typeof e&&(e=An.getObject(t,e)),i instanceof jn&&(r=i,i=null);var n=this.adaptor.remove(this,t,e,i,r);if(this.dataSource.offline)return n;if(c(this.adaptor.doAjaxRequest)){var o=this.adaptor.options.deleteRecord;return this.doAjaxRequest(n,o)}return this.adaptor.doAjaxRequest(n)},t.prototype.update=function(t,e,i,r,n){i instanceof jn&&(r=i,i=null);var o=this.adaptor.update(this,t,e,i,r,n);if(this.dataSource.offline)return o;if(c(this.adaptor.doAjaxRequest)){var s=this.adaptor.options.updateRecord;return this.doAjaxRequest(o,s)}return this.adaptor.doAjaxRequest(o)},t.prototype.isCustomDataAdaptor=function(t){return this.adaptor.getModuleName&&"CustomDataAdaptor"===this.adaptor.getModuleName()},t.prototype.isGraphQLAdaptor=function(t){return this.adaptor.getModuleName&&"GraphQLAdaptor"===this.adaptor.getModuleName()},t.prototype.successFunc=function(t,e){if(this.isGraphQLAdaptor(this.adaptor)){var i=JSON.parse(t);c(i.errors)||this.failureFunc(JSON.stringify(i.errors))}this.isCustomDataAdaptor(this.adaptor)&&(e=u({},this.ajaxReqOption,e));try{An.parse.parseJson(t)}catch(e){t=[]}t=this.adaptor.processResponse(An.parse.parseJson(t),this,null,e.httpRequest,e),this.ajaxDeffered.resolve(t)},t.prototype.failureFunc=function(t){this.ajaxDeffered.reject([{error:t}])},t.prototype.doAjaxRequest=function(t,e){var i=this;if(t=u({},{type:"POST",contentType:"application/json; charset=utf-8",processData:!1},t),this.ajaxDeffered=new Kn,this.isCustomDataAdaptor(this.adaptor))this.ajaxReqOption=t,e.call(this,{data:t.data,onSuccess:this.successFunc.bind(this),onFailure:this.failureFunc.bind(this)});else{var r=new hi(t);r.beforeSend=function(){i.beforeSend(r.httpRequest,r)},r.onSuccess=this.successFunc.bind(this),r.onFailure=this.failureFunc.bind(this),r.send().catch(function(t){return!0})}return this.ajaxDeffered.promise},t}(),Kn=function(){return function(){var t=this;this.promise=new Promise(function(e,i){t.resolve=e,t.reject=i}),this.then=this.promise.then.bind(this.promise),this.catch=this.promise.catch.bind(this.promise)}}();(Gi||(Gi={})).mapsTitleFont={size:"14px",fontWeight:"Medium",color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"};var Yn,$n=function(){function t(t){this.control=t}return t.prototype.print=function(t){var e=this;this.printWindow=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no"),this.printWindow.moveTo(0,0),this.printWindow.resizeTo(screen.availWidth,screen.availHeight);var i={cancel:!1,htmlContent:this.getHTMLContent(t),name:Jr};this.control.trigger(Jr,i,function(){i.cancel||y(i.htmlContent,e.printWindow)})},t.prototype.getHTMLContent=function(t){var e=w("div");return t?t instanceof Array?t.forEach(function(t){e.appendChild(Bt(t).cloneNode(!0))}):t instanceof Element?e.appendChild(t.cloneNode(!0)):e.appendChild(Bt(t).cloneNode(!0)):e.appendChild(this.control.element.cloneNode(!0)),e},t.prototype.getModuleName=function(){return"Print"},t.prototype.destroy=function(t){},t}(),Jn=function(){function t(t){this.control=t}return t.prototype.export=function(t,e,i){var r=this;return new Promise(function(n,o){var s=w("canvas",{id:"ej2-canvas",attrs:{height:r.control.availableSize.height.toString(),width:r.control.availableSize.width.toString()}}),a=!(wi.userAgent.toString().indexOf("HeadlessChrome")>-1),l='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+r.control.svgObject.outerHTML+"</svg>",h=window.URL.createObjectURL(new Blob("SVG"===t?[l]:[(new XMLSerializer).serializeToString(r.control.svgObject)],{type:"image/svg+xml"}));if("SVG"===t)i?ye(e,t,h,a):n(null);else{var u=new Image,c=s.getContext("2d");u.onload=function(){c.drawImage(u,0,0),window.URL.revokeObjectURL(h),i?ye(e,t,s.toDataURL("image/png").replace("image/png","image/octet-stream"),a):"JPEG"===t?n(s.toDataURL("image/jpeg")):"PNG"===t&&n(s.toDataURL("image/png"))},u.src=h}})},t.prototype.getModuleName=function(){return"ImageExport"},t.prototype.destroy=function(t){},t}(),Xn=function(){function t(t){this.table={},this.nElements=0,this.toStr=t||function(t){return"[object String]"===Object.prototype.toString.call(t)?"$s"+t:"$o"+t.toString()}}return t.prototype.getValue=function(t){var e=this.table["$"+this.toStr(t)];if(void 0!==e)return e.value},t.prototype.setValue=function(t,e){var i="$"+this.toStr(t);this.table[i];this.nElements++,this.table[i]={key:t,value:e}},t.prototype.remove=function(t){var e="$"+this.toStr(t),i=this.table[e];return delete this.table[e],this.nElements--,i.value},t.prototype.keys=function(){for(var t=[],e=Object.keys(this.table),i=0;i<e.length;i++){var r=this.table[e[i]];t.push(r.key)}return t},t.prototype.values=function(){for(var t=[],e=Object.keys(this.table),i=0;i<e.length;i++){var r=this.table[e[i]];t.push(r.value)}return t},t.prototype.containsKey=function(t){return!(void 0===this.getValue(t))},t.prototype.clear=function(){this.table={},this.nElements=0},t.prototype.size=function(){return this.nElements},t}(),Qn=function(){function t(t){this.stringStartMark="/",this.internalValue="",this.isSaving6=!1,this.position6=-1,this.internalValue=this.normalizeValue(t)}return Object.defineProperty(t.prototype,"status",{get:function(){return this.status6},set:function(t){this.status6=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving6},set:function(t){this.isSaving6=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index6},set:function(t){this.index6=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position6},set:function(t){this.position6=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.internalValue},set:function(t){var e=t;null!==t&&t.length>0?(e=t,this.internalValue=this.normalizeValue(e)):this.internalValue=e},enumerable:!0,configurable:!0}),t.prototype.save=function(t){t.write(this.toString())},t.prototype.toString=function(){return this.stringStartMark+this.escapeString(this.value)},t.prototype.clone=function(e){var i=new t;return i.value=this.internalValue,i},t.prototype.escapeString=function(e){for(var i="",r=0,n=e.length;r<n;r++){var o=e[r];t.delimiters.indexOf(o);i+=o}return i},t.prototype.normalizeValue=function(t,e){return t},t.delimiters="()<>[]{}/%}",t.replacements=[" ","\t","\n","\r"],t}(),Zn=function(){function t(){this.forTest="test",this.forTest=t.obj}return t.obj="obj",t.endObj="endobj",t.r="R",t.whiteSpace=" ",t.slash="/",t.newLine="\r\n",t.stream="stream",t.endStream="endstream",t.xref="xref",t.f="f",t.n="n",t.trailer="trailer",t.startxref="startxref",t.eof="%%EOF",t.header="%PDF-1.5",t.beginText="BT",t.endText="ET",t.beginPath="m",t.appendLineSegment="l",t.stroke="S",t.fill="f",t.fillEvenOdd="f*",t.fillStroke="B",t.fillStrokeEvenOdd="B*",t.appendbeziercurve="c",t.appendRectangle="re",t.saveState="q",t.restoreState="Q",t.paintXObject="Do",t.modifyCtm="cm",t.modifyTM="Tm",t.setLineWidth="w",t.setLineCapStyle="J",t.setLineJoinStyle="j",t.setDashPattern="d",t.setFlatnessTolerance="i",t.closePath="h",t.closeStrokePath="s",t.closeFillStrokePath="b",t.setCharacterSpace="Tc",t.setWordSpace="Tw",t.setHorizontalScaling="Tz",t.setTextLeading="TL",t.setFont="Tf",t.setRenderingMode="Tr",t.setTextRise="Ts",t.setTextScaling="Tz",t.setCoords="Td",t.goToNextLine="T*",t.setText="Tj",t.setTextWithFormatting="TJ",t.setTextOnNewLine="'",t.selectcolorspaceforstroking="CS",t.selectcolorspacefornonstroking="cs",t.setrbgcolorforstroking="RG",t.setrbgcolorfornonstroking="rg",t.setcmykcolorforstroking="K",t.setcmykcolorfornonstroking="k",t.setgraycolorforstroking="G",t.setgraycolorfornonstroking="g",t.clipPath="W",t.clipPathEvenOdd="W*",t.endPath="n",t.setGraphicsState="gs",t.comment="%",t.evenOdd="*",t.setMiterLimit="M",t.setColorAndPattern="scn",t.setColorAndPatternStroking="SCN",t}(),to=function(){return function(){this.pages="Pages",this.kids="Kids",this.count="Count",this.resources="Resources",this.type="Type",this.size="Size",this.mediaBox="MediaBox",this.parent="Parent",this.root="Root",this.decodeParms="DecodeParms",this.filter="Filter",this.font="Font",this.type1="Type1",this.baseFont="BaseFont",this.encoding="Encoding",this.subtype="Subtype",this.contents="Contents",this.procset="ProcSet",this.colorSpace="ColorSpace",this.extGState="ExtGState",this.pattern="Pattern",this.xObject="XObject",this.length="Length",this.width="Width",this.height="Height",this.bitsPerComponent="BitsPerComponent",this.image="Image",this.dctdecode="DCTDecode",this.columns="Columns",this.blackIs1="BlackIs1",this.k="K",this.s="S",this.predictor="Predictor",this.deviceRgb="DeviceRGB",this.next="Next",this.action="Action",this.link="Link",this.a="A",this.annot="Annot",this.p="P",this.c="C",this.rect="Rect",this.uri="URI",this.annots="Annots",this.ca="ca",this.CA="CA",this.xyz="XYZ",this.fit="Fit",this.dest="Dest",this.BM="BM",this.flatedecode="FlateDecode",this.rotate="Rotate",this.bBox="BBox",this.form="Form",this.w="W",this.cIDFontType2="CIDFontType2",this.cIDToGIDMap="CIDToGIDMap",this.identity="Identity",this.dw="DW",this.fontDescriptor="FontDescriptor",this.cIDSystemInfo="CIDSystemInfo",this.fontName="FontName",this.flags="Flags",this.fontBBox="FontBBox",this.missingWidth="MissingWidth",this.stemV="StemV",this.italicAngle="ItalicAngle",this.capHeight="CapHeight",this.ascent="Ascent",this.descent="Descent",this.leading="Leading",this.avgWidth="AvgWidth",this.fontFile2="FontFile2",this.maxWidth="MaxWidth",this.xHeight="XHeight",this.stemH="StemH",this.registry="Registry",this.ordering="Ordering",this.supplement="Supplement",this.type0="Type0",this.identityH="Identity-H",this.toUnicode="ToUnicode",this.descendantFonts="DescendantFonts",this.background="Background",this.shading="Shading",this.matrix="Matrix",this.antiAlias="AntiAlias",this.function="Function",this.extend="Extend",this.shadingType="ShadingType",this.coords="Coords",this.domain="Domain",this.range="Range",this.functionType="FunctionType",this.bitsPerSample="BitsPerSample",this.patternType="PatternType",this.paintType="PaintType",this.tilingType="TilingType",this.xStep="XStep",this.yStep="YStep"}}(),eo=function(){function t(t){if(this.position7=-1,this.primitiveItems=new Xn,this.prefix="<<",this.suffix=">>",this.resources=[],this.object=null,this.archive=!0,this.isFont=!1,void 0===t)this.primitiveItems=new Xn,this.encrypt=!0,this.dictionaryProperties=new to;else{this.primitiveItems=new Xn;for(var e=t.items.keys(),i=t.items.values(),r=0;r<t.items.size();r++)this.primitiveItems.setValue(e[r],i[r]);this.status=t.status,this.freezeChanges(this),this.encrypt=!0,this.dictionaryProperties=new to}}return Object.defineProperty(t.prototype,"items",{get:function(){return this.primitiveItems},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this.status7},set:function(t){this.status7=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving7},set:function(t){this.isSaving7=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index7},set:function(t){this.index7=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return this.object},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position7},set:function(t){this.position7=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Count",{get:function(){return this.primitiveItems.size()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Dictionary",{get:function(){return this},enumerable:!0,configurable:!0}),t.prototype.getArchive=function(){return this.archive},t.prototype.setArchive=function(t){this.archive=t},t.prototype.setEncrypt=function(t){this.encrypt=t,this.modify()},t.prototype.getEncrypt=function(){return this.encrypt},t.prototype.freezeChanges=function(t){this.bChanged=!1},t.prototype.clone=function(e){return new t},t.prototype.modify=function(){this.bChanged=!0},t.prototype.remove=function(t){"string"!=typeof t?(this.primitiveItems.remove(t.value),this.modify()):this.remove(new Qn(t))},t.prototype.containsKey=function(t){return this.primitiveItems.containsKey(t.toString())},t.prototype.onBeginSave=function(){this.beginSave.sender.beginSave()},t.prototype.onFontDictionaryBeginSave=function(){this.fontDictionaryBeginSave.sender.fontDictionaryBeginSave()},t.prototype.onDescendantFontBeginSave=function(){this.descendantFontBeginSave.sender.descendantFontBeginSave()},t.prototype.onTemplateBeginSave=function(){this.pageBeginDrawTemplate.sender.pageBeginSave()},t.prototype.onBeginAnnotationSave=function(){this.annotationBeginSave.sender.beginSave()},t.prototype.onSectionBeginSave=function(t){var e=this.sectionBeginSave;e.sender.beginSave(e.state,t)},t.prototype.save=function(t,e){void 0===e?this.save(t,!0):(t.write(this.prefix),void 0!==this.beginSave&&this.onBeginSave(),void 0!==this.descendantFontBeginSave&&this.onDescendantFontBeginSave(),void 0!==this.fontDictionaryBeginSave&&this.onFontDictionaryBeginSave(),void 0!==this.annotationBeginSave&&this.onBeginAnnotationSave(),void 0!==this.sectionBeginSave&&this.onSectionBeginSave(t),void 0!==this.pageBeginDrawTemplate&&this.onTemplateBeginSave(),this.Count>0&&this.saveItems(t),t.write(this.suffix),t.write(Zn.newLine))},t.prototype.saveItems=function(t){t.write(Zn.newLine);for(var e=this.primitiveItems.keys(),i=this.primitiveItems.values(),r=0;r<e.length;r++){var n=e[r];new Qn(n).save(t),t.write(Zn.whiteSpace);i[r].save(t),t.write(Zn.newLine)}},t}(),io=function(){return function(t){this.sender=t}}(),ro=function(){return function(t){this.sender=t}}(),no=function(){return function(t){this.sender=t}}(),oo=function(){return function(t){this.sender=t}}(),so=function(){return function(t,e){this.sender=t,this.state=e}}(),ao=function(){return function(t){this.sender=t}}(),lo=function(){function t(t){this.position5=-1,this.value=t}return Object.defineProperty(t.prototype,"intValue",{get:function(){return this.value},set:function(t){this.value=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInteger",{get:function(){return this.integer},set:function(t){this.integer=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this.status5},set:function(t){this.status5=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving5},set:function(t){this.isSaving5=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index5},set:function(t){this.index5=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position5},set:function(t){this.position5=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return null},enumerable:!0,configurable:!0}),t.prototype.save=function(t){t.write(this.intValue.toString())},t.prototype.clone=function(e){return new t(this.value)},t.floatToString=function(t){var e=t.toFixed(2);return"0.00"===e&&(e=".00"),e},t.min=function(t,e,i){var r=Math.min(t,e);return Math.min(i,r)},t}(),ho=function(){function t(e){if(this.startMark="[",this.endMark="]",this.position9=-1,this.clonedObject9=null,this.isFont=!1,void 0===e)this.internalElements=[];else if(void 0===e||e instanceof t){var i=e;this.internalElements=[];for(n=0;n<i.elements.length;n++)this.internalElements.push(i.elements[n])}else for(var r=e,n=0;n<r.length;n++){var o=new lo(r[n]);this.add(o)}}return t.prototype.items=function(t){return this.internalElements[t]},Object.defineProperty(t.prototype,"count",{get:function(){return this.internalElements.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this.status9},set:function(t){this.status9=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving9},set:function(t){this.isSaving9=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return this.clonedObject9},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position9},set:function(t){this.position9=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index9},set:function(t){this.index9=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"CrossTable",{get:function(){return this.pdfCrossTable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"elements",{get:function(){return this.internalElements},enumerable:!0,configurable:!0}),t.prototype.add=function(t){void 0===this.internalElements&&(this.internalElements=[]),this.internalElements.push(t),this.markedChange()},t.prototype.markedChange=function(){this.bChanged=!0},t.prototype.contains=function(t){for(var e=0;e<this.internalElements.length;e++){var i=this.internalElements[e],r=t;if(null!=i&&void 0!==i&&null!=r&&void 0!==r&&i.value===r.value)return!0}return!1},t.prototype.getItems=function(t){return this.internalElements[t]},t.prototype.save=function(t){t.write(this.startMark);for(var e=0,i=this.count;e<i;e++)this.getItems(e).save(t),e+1!==i&&t.write(Zn.whiteSpace);t.write(this.endMark)},t.prototype.clone=function(e){this.clonedObject9=null;for(var i=new t,r=0;r<this.internalElements.length;r++){var n=this.internalElements[r];i.add(n.clone(e))}return i.pdfCrossTable=e,this.clonedObject9=i,i},t.fromRectangle=function(e){return new t([e.x,e.y,e.width,e.height])},t.prototype.insert=function(t,e){if(t<this.internalElements.length&&t>0){for(var i=[],r=0;r<t;r++)i.push(this.internalElements[r]);i.push(e);for(r=t;r<this.internalElements.length;r++)i.push(this.internalElements[r]);this.internalElements=i}else this.internalElements.push(e);this.markChanged()},t.prototype.indexOf=function(t){return this.internalElements.indexOf(t)},t.prototype.remove=function(t){var e=this.internalElements.indexOf(t);this.internalElements[e]=null,this.markChanged()},t.prototype.removeAt=function(t){if(this.internalElements.length>t){for(var e=[],i=0;i<t;i++)e.push(this.internalElements[i]);for(i=t+1;i<this.internalElements.length;i++)e.push(this.internalElements[i]);this.internalElements=e}this.markChanged()},t.prototype.clear=function(){this.internalElements=[],this.markChanged()},t.prototype.markChanged=function(){this.bChanged=!0},t}(),uo=function(){function t(){}return t.save=function(t,e){if(null===t||void 0===t||""===t)throw new Error("ArgumentException: fileName cannot be undefined, null or empty");var i=t.substring(t.lastIndexOf(".")+1,t.length),r=this.getMimeType(i);if(""!==r&&(e=new Blob([e],{type:r})),this.isMicrosoftBrowser)navigator.msSaveBlob(e,t);else{var n=document.createElementNS("http://www.w3.org/1999/xhtml","a");this.saveInternal(t,i,e,n,"download"in n)}},t.saveInternal=function(t,e,i,r,n){if(n){r.download=t;var o=window.URL.createObjectURL(i);r.href=o;var s=document.createEvent("MouseEvent");s.initEvent("click",!0,!0),r.dispatchEvent(s),setTimeout(function(){window.URL.revokeObjectURL(o),o=void 0})}else if("docx"!==e&&"xlsx"!==e){var a=window.URL.createObjectURL(i);window.open(a,"_blank")||(window.location.href=a)}else{var l=new FileReader;l.onloadend=function(){window.open(l.result,"_blank")||(window.location.href=l.result)},l.readAsDataURL(i)}},t.getMimeType=function(t){var e="";switch(t){case"html":e="text/html";break;case"pdf":e="application/pdf";break;case"docx":e="application/vnd.openxmlformats-officedocument.wordprocessingml.document";break;case"xlsx":e="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";break;case"txt":e="text/plain"}return e},t}(),co=(function(){function t(){this.contentPos=0,this.bufferText="",this.bufferBlob=new Blob([""],{type:"text/plain"}),this.currentState="Initial",this.namespaceStack=[],this.namespaceStack.push(new co),this.namespaceStack[0].set("xmlns","http://www.w3.org/2000/xmlns/","Special"),this.namespaceStack.push(new co),this.namespaceStack[1].set("xml","http://www.w3.org/XML/1998/namespace","Special"),this.namespaceStack.push(new co),this.namespaceStack[2].set("","","Implied"),this.elementStack=[],this.elementStack.push(new po),this.elementStack[0].set("","","",this.namespaceStack.length-1),this.attributeStack=[],uo.isMicrosoftBrowser=!!navigator.msSaveBlob}Object.defineProperty(t.prototype,"buffer",{get:function(){return this.flush(),this.bufferBlob},enumerable:!0,configurable:!0}),t.prototype.writeProcessingInstruction=function(t,e){if(void 0===t||null===t||0===t.length)throw new Error("ArgumentException: name should not be undefined, null or empty");if(this.checkName(t),void 0!==e&&null!==e||(e=""),3===t.length&&"xml"===t&&"Initial"!==this.currentState)throw new Error("InvalidArgumentException: Cannot write XML declaration.WriteStartDocument method has already written it");if("Initial"!==this.currentState||void 0===this.bufferBlob)throw new Error("InvalidOperationException: Wrong Token");this.writeStartDocument(),this.writeProcessingInstructionInternal(t,e)},t.prototype.writeStartDocument=function(t){if("Initial"!==this.currentState||void 0===this.bufferBlob)throw new Error("InvalidOperationException: Wrong Token");this.currentState="StartDocument",this.rawText('<?xml version="1.0" encoding="utf-8'),null!==t&&void 0!==t&&(this.rawText('" standalone="'),this.rawText(t?"yes":"no")),this.rawText('"?>')},t.prototype.writeEndDocument=function(){for(;this.elementStack.length-1>0;)this.writeEndElement();this.currentState="EndDocument",this.flush()},t.prototype.writeStartElement=function(t,e,i){if(void 0===this.bufferBlob)throw new Error("InvalidOperationException: Wrong Token");if(void 0===e||null===e||0===e.length)throw new Error("ArgumentException: localName cannot be undefined, null or empty");if(this.checkName(e),"Initial"===this.currentState&&this.writeStartDocument(),"StartElement"===this.currentState&&this.startElementContent(),this.currentState="StartElement",void 0===t||null===t)void 0!==i&&null!==i&&(t=this.lookupPrefix(i)),void 0!==t&&null!==t||(t="");else if(t.length>0&&(void 0!==i&&null!==i||(i=this.lookupNamespace(t)),void 0===i||null===i||void 0!==i&&0===i.length))throw new Error("ArgumentException: Cannot use a prefix with an empty namespace");void 0!==i&&null!==i||(i=this.lookupNamespace(t)),this.writeStartElementInternal(t,e,i)},t.prototype.writeEndElement=function(){"StartElement"===this.currentState?(this.startElementContent(),this.currentState="ElementContent"):"ElementContent"===this.currentState&&(this.currentState="ElementContent"),this.currentState="EndElement";var t=this.elementStack.length-1;this.writeEndElementInternal(this.elementStack[t].prefix,this.elementStack[t].localName),this.namespaceStack.splice(this.elementStack[t].previousTop+1),this.elementStack.splice(t),this.bufferText.length>10240&&this.flush()},t.prototype.writeElementString=function(t,e,i,r){this.writeStartElement(t,e,i),void 0!==r&&null!==r&&0!==r.length&&this.writeString(r),this.writeEndElement()},t.prototype.writeAttributeString=function(t,e,i,r){this.writeStartAttribute(t,e,i,r),this.writeStringInternal(r,!0),this.writeEndAttribute()},t.prototype.writeString=function(t){this.writeInternal(t,!1)},t.prototype.writeRaw=function(t){this.writeInternal(t,!0)},t.prototype.writeInternal=function(t,e){if(void 0!==t&&null!==t){if("StartElement"!==this.currentState&&"ElementContent"!==this.currentState)throw new Error("InvalidOperationException: Wrong Token");"StartElement"===this.currentState&&this.startElementContent(),this.currentState="ElementContent",e?this.rawText(t):this.writeStringInternal(t,!1)}},t.prototype.save=function(t){for(;this.elementStack.length-1>0;)this.writeEndElement();""!==this.bufferText&&this.flush(),uo.save(t,this.buffer)},t.prototype.destroy=function(){this.bufferBlob=void 0;for(var t=0;t<this.namespaceStack.length;t++)this.namespaceStack[t].destroy();this.namespaceStack=[];for(t=0;t<this.elementStack.length;t++)this.elementStack[t].destroy();this.elementStack=[],this.bufferText="",this.contentPos=0},t.prototype.flush=function(){void 0!==this.bufferBlob&&(this.bufferBlob=new Blob([this.bufferBlob,this.bufferText],{type:"text/plain"}),this.bufferText="")},t.prototype.writeProcessingInstructionInternal=function(t,e){this.bufferText+="<?",this.rawText(t),e.length>0&&(this.bufferText+=" ",e=e.replace(/\?\>/g,"? >"),this.bufferText+=e),this.bufferText+="?",this.bufferText+=">"},t.prototype.writeStartAttribute=function(t,e,i,r){if(void 0===e||null===e||0===e.length){if("xmlns"!==t)throw new Error("ArgumentException: localName cannot be undefined, null or empty");e="xmlns",t=""}if("StartElement"!==this.currentState)throw new Error("InvalidOperationException: Wrong Token");this.checkName(e),this.writeStartAttributePrefixAndNameSpace(t,e,i,r)},t.prototype.writeStartAttributePrefixAndNameSpace=function(t,e,i,r){void 0!==t&&null!==t||(void 0!==i&&null!==i&&("xmlns"===e&&"http://www.w3.org/2000/xmlns/"===i||(t=this.lookupPrefix(i))),void 0!==t&&null!==t||(t="")),void 0!==i&&null!==i||(void 0!==t&&null!==t&&t.length>0&&(i=this.lookupNamespace(t)),void 0!==i&&null!==i||(i="")),this.writeStartAttributeSpecialAttribute(t,e,i,r)},t.prototype.writeStartAttributeSpecialAttribute=function(t,e,i,r){if(0===t.length){if("x"===e[0]&&"xmlns"===e)return this.skipPushAndWrite(t,e,i),void this.pushNamespaceExplicit("",r);i.length>0&&(t=this.lookupPrefix(i))}else{if("x"===t[0]){if("xmlns"===t)return this.skipPushAndWrite(t,e,i),void this.pushNamespaceExplicit(e,r);if("xml"===t&&("space"===e||"lang"===e))return void this.skipPushAndWrite(t,e,i)}0===i.length&&(t="")}void 0!==t&&null!==t&&0!==t.length&&this.pushNamespaceImplicit(t,i),this.skipPushAndWrite(t,e,i)},t.prototype.writeEndAttribute=function(){this.currentState="StartElement",this.bufferText+='"'},t.prototype.writeStartElementInternal=function(t,e,i){this.bufferText+="<",t.length>0&&(this.rawText(t),this.bufferText+=":"),this.rawText(e);var r=this.elementStack.length;this.elementStack.push(new po),this.elementStack[r].set(t,e,i,this.namespaceStack.length-1),this.pushNamespaceImplicit(t,i);for(var n=0;n<this.attributeStack.length;n++)this.attributeStack[n].destroy();this.attributeStack=[]},t.prototype.writeEndElementInternal=function(t,e){this.contentPos!==this.bufferText.length+1?(this.bufferText+="</",void 0!==t&&null!==t&&0!==t.length&&(this.rawText(t),this.bufferText+=":"),this.rawText(e),this.bufferText+=">"):(this.bufferText=this.bufferText.substring(0,this.bufferText.length-1),this.bufferText+=" />")},t.prototype.writeStartAttributeInternal=function(t,e,i){this.bufferText+=" ",void 0!==t&&null!==t&&t.length>0&&(this.rawText(t),this.bufferText+=":"),this.rawText(e),this.bufferText+="=",this.bufferText+='"'},t.prototype.writeNamespaceDeclaration=function(t,e){this.writeStartNamespaceDeclaration(t),this.writeStringInternal(e,!0),this.bufferText+='"'},t.prototype.writeStartNamespaceDeclaration=function(t){void 0===t||null===t||0===t.length?this.rawText(' xmlns="'):(this.rawText(" xmlns:"),this.rawText(t),this.bufferText+="=",this.bufferText+='"')},t.prototype.writeStringInternal=function(t,e){null!==t&&void 0!==t||(t=""),t=(t=(t=t.replace(/\&/g,"&")).replace(/\</g,"<")).replace(/\>/g,">"),e&&(t=t.replace(/\"/g,""")),this.bufferText+=t,e||(this.contentPos=0)},t.prototype.startElementContent=function(){for(var t=this.elementStack[this.elementStack.length-1].previousTop,e=this.namespaceStack.length-1;e>t;e--)"NeedToWrite"===this.namespaceStack[e].kind&&this.writeNamespaceDeclaration(this.namespaceStack[e].prefix,this.namespaceStack[e].namespaceUri);this.bufferText+=">",this.contentPos=this.bufferText.length+1},t.prototype.rawText=function(t){this.bufferText+=t},t.prototype.addNamespace=function(t,e,i){var r=this.namespaceStack.length;this.namespaceStack.push(new co),this.namespaceStack[r].set(t,e,i)},t.prototype.lookupPrefix=function(t){for(var e=this.namespaceStack.length-1;e>=0;e--)if(this.namespaceStack[e].namespaceUri===t)return this.namespaceStack[e].prefix},t.prototype.lookupNamespace=function(t){for(var e=this.namespaceStack.length-1;e>=0;e--)if(this.namespaceStack[e].prefix===t)return this.namespaceStack[e].namespaceUri},t.prototype.lookupNamespaceIndex=function(t){for(var e=this.namespaceStack.length-1;e>=0;e--)if(this.namespaceStack[e].prefix===t)return e;return-1},t.prototype.pushNamespaceImplicit=function(t,e){var i,r=this.lookupNamespaceIndex(t);if(-1!==r){if(r>this.elementStack[this.elementStack.length-1].previousTop){if(this.namespaceStack[r].namespaceUri!==e)throw new Error("XmlException namespace Uri needs to be the same as the one that is already declared");return}if("Special"===this.namespaceStack[r].kind){if("xml"!==t)throw new Error('InvalidArgumentException: Prefix "xmlns" is reserved for use by XML.');if(e!==this.namespaceStack[r].namespaceUri)throw new Error("InvalidArgumentException: Xml String");i="Implied"}else i=this.namespaceStack[r].namespaceUri===e?"Implied":"NeedToWrite"}else{if("http://www.w3.org/XML/1998/namespace"===e&&"xml"!==t||"http://www.w3.org/2000/xmlns/"===e&&"xmlns"!==t)throw new Error("InvalidArgumentException");i="NeedToWrite"}this.addNamespace(t,e,i)},t.prototype.pushNamespaceExplicit=function(t,e){var i=this.lookupNamespaceIndex(t);-1!==i&&i>this.elementStack[this.elementStack.length-1].previousTop?this.namespaceStack[i].kind="Written":this.addNamespace(t,e,"Written")},t.prototype.addAttribute=function(t,e,i){var r=this.attributeStack.length;this.attributeStack.push(new fo),this.attributeStack[r].set(t,e,i);for(var n=0;n<r;n++)if(this.attributeStack[n].isDuplicate(t,e,i))throw new Error("XmlException: duplicate attribute name")},t.prototype.skipPushAndWrite=function(t,e,i){this.addAttribute(t,e,i),this.writeStartAttributeInternal(t,e,i)},t.prototype.checkName=function(t){if(/[ !@#$%^&*()+\=\[\]{};':"\\|,<>\/?]/.test(t))throw new Error("InvalidArgumentException: invalid name character")}}(),function(){function t(){}return t.prototype.set=function(t,e,i){this.prefix=t,this.namespaceUri=e,this.kind=i},t.prototype.destroy=function(){this.prefix=void 0,this.namespaceUri=void 0,this.kind=void 0},t}()),po=function(){function t(){}return t.prototype.set=function(t,e,i,r){this.previousTop=r,this.prefix=t,this.namespaceUri=i,this.localName=e},t.prototype.destroy=function(){this.previousTop=void 0,this.prefix=void 0,this.localName=void 0,this.namespaceUri=void 0},t}(),fo=function(){function t(){}return t.prototype.set=function(t,e,i){this.prefix=t,this.namespaceUri=i,this.localName=e},t.prototype.isDuplicate=function(t,e,i){return this.localName===e&&(this.prefix===t||this.namespaceUri===i)},t.prototype.destroy=function(){this.prefix=void 0,this.namespaceUri=void 0,this.localName=void 0},t}(),go=function(){function t(t){this.emitBOM=!0,this.encodingType="Ansi",this.initBOM(t)}return Object.defineProperty(t.prototype,"includeBom",{get:function(){return this.emitBOM},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this.encodingType},set:function(t){this.encodingType=t},enumerable:!0,configurable:!0}),t.prototype.initBOM=function(t){this.emitBOM=void 0===t||null===t||t},t.prototype.getByteCount=function(t){if(we(t,"string"),""===t){return this.utf8Len(t.charCodeAt(0))}return null!==this.type&&void 0!==this.type||(this.type="Ansi"),this.getByteCountInternal(t,0,t.length)},t.prototype.utf8Len=function(t){return t<=127?1:t<=2047?2:t<=65535?3:t<=2097151?4:0},t.prototype.isHighSurrogate=function(t){return t>=55296&&t<=56319},t.prototype.toCodepoint=function(t,e){return((t=(1023&t)<<10)|1023&e)+65536},t.prototype.getByteCountInternal=function(t,e,i){var r=0;if("Utf8"===this.encodingType||"Unicode"===this.encodingType){for(var n="Utf8"===this.encodingType,o=0;o<i;o++){var s=t.charCodeAt(n?e:e++);if(this.isHighSurrogate(s))if(n){var a=s,l=t.charCodeAt(++e);r+=this.utf8Len(this.toCodepoint(a,l))}else r+=4,++o;else r+=n?this.utf8Len(s):2;n&&e++}return r}return r=i},t.prototype.getBytes=function(t,e,i){if(we(t,"string"),we(e,"charIndex"),we(i,"charCount"),e<0||i<0)throw new RangeError("Argument Out Of Range Exception: charIndex or charCount is less than zero");if(t.length-e<i)throw new RangeError("Argument Out Of Range Exception: charIndex and charCount do not denote a valid range in string");if(""===t)return new ArrayBuffer(0);null!==this.type&&void 0!==this.type||(this.type="Ansi");var r=this.getByteCountInternal(t,e,i);switch(this.type){case"Utf8":return this.getBytesOfUtf8Encoding(r,t,e,i);case"Unicode":return this.getBytesOfUnicodeEncoding(r,t,e,i);default:return this.getBytesOfAnsiEncoding(r,t,e,i)}},t.prototype.getString=function(t,e,i){if(we(t,"bytes"),we(e,"index"),we(i,"count"),e<0||i<0)throw new RangeError("Argument Out Of Range Exception: index or count is less than zero");if(t.byteLength-e<i)throw new RangeError("Argument Out Of Range Exception: index and count do not denote a valid range in bytes");if(0===t.byteLength||0===i)return"";null!==this.type&&void 0!==this.type||(this.type="Ansi");var r="",n=new Uint8Array(t);switch(this.type){case"Utf8":return this.getStringOfUtf8Encoding(n,e,i);case"Unicode":var o=new Uint16Array(t);return r=this.getStringofUnicodeEncoding(o,e,i);default:for(var s=e,a=0;a<i;a++){var l=n[s];r+=String.fromCharCode(l),s++}return r}},t.prototype.getBytesOfAnsiEncoding=function(t,e,i,r){for(var n=new ArrayBuffer(t),o=new Uint8Array(n),s=0,a=0;a<r;a++){var l=e.charCodeAt(i++);o[s]=l<2048?l:63,s++}return n},t.prototype.getBytesOfUtf8Encoding=function(t,e,i,r){for(var n=new ArrayBuffer(t),o=new Uint8Array(n),s=i,a=0,l=0;l<r;l++){var h=e.charCodeAt(s);h<=127?o[a]=h:h<2048?(o[a]=192|h>>6,o[++a]=128|63&h):h<55296||h>=57344?(o[a]=224|h>>12,o[++a]=128|h>>6&63,o[++a]=128|63&h):(o[a]=239,o[++a]=191,o[++a]=189),++a,++s}return n},t.prototype.getBytesOfUnicodeEncoding=function(t,e,i,r){for(var n=new ArrayBuffer(t),o=new Uint16Array(n),s=0;s<r;s++){var a=e.charCodeAt(s);o[s]=a}return n},t.prototype.getStringOfUtf8Encoding=function(t,e,i){for(var r=0,n=e,o="";r<i;r++){for(var s=t[n++];n>t.length;)return o;s>127&&(s>191&&s<224&&n<i?s=(31&s)<<6|63&t[n]:s>223&&s<240&&n<t.byteLength?s=(15&s)<<12|(63&t[n])<<6|63&t[++n]:s>239&&s<248&&n<t.byteLength&&(s=(7&s)<<18|(63&t[n])<<12|(63&t[++n])<<6|63&t[++n]),++n),o+=String.fromCharCode(s)}return o},t.prototype.getStringofUnicodeEncoding=function(t,e,i){if(i>t.length)throw new RangeError("ArgumentOutOfRange_Count");for(var r=new Uint16Array(i),n=0;n<i&&n<t.length;n++)r[n]=t[e++];return String.fromCharCode.apply(null,r)},t.prototype.destroy=function(){this.emitBOM=void 0,this.encodingType=void 0},t}(),mo=function(){function t(t){this.bufferBlob=new Blob([""]),this.bufferText="",this.init(t),uo.isMicrosoftBrowser=!!navigator.msSaveBlob}return Object.defineProperty(t.prototype,"buffer",{get:function(){return this.flush(),this.bufferBlob},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"encoding",{get:function(){return this.enc},enumerable:!0,configurable:!0}),t.prototype.init=function(t){null===t||void 0===t?(this.enc=new go(!1),this.enc.type="Utf8"):(this.enc=t,this.setBomByte())},t.prototype.setBomByte=function(){if(this.encoding.includeBom)switch(this.encoding.type){case"Unicode":var t=new ArrayBuffer(2),e=new Uint8Array(t);e[0]=255,e[1]=254,this.bufferBlob=new Blob([t]);break;case"Utf8":var i=new ArrayBuffer(3),r=new Uint8Array(i);r[0]=239,r[1]=187,r[2]=191,this.bufferBlob=new Blob([i]);break;default:this.bufferBlob=new Blob([""])}},t.prototype.save=function(t){""!==this.bufferText&&this.flush(),uo.save(t,this.buffer)},t.prototype.write=function(t){if(void 0===this.encoding)throw new Error("Object Disposed Exception: current writer is disposed");we(t,"string"),this.bufferText+=t,this.bufferText.length>=10240&&this.flush()},t.prototype.flush=function(){if(void 0!==this.bufferText&&null!==this.bufferText&&0!==this.bufferText.length){var t=this.encoding.getBytes(this.bufferText,0,this.bufferText.length);this.bufferText="",this.bufferBlob=new Blob([this.bufferBlob,t])}},t.prototype.writeLine=function(t){if(void 0===this.encoding)throw new Error("Object Disposed Exception: current writer is disposed");we(t,"string"),this.bufferText=this.bufferText+t+"\r\n",this.bufferText.length>=10240&&this.flush()},t.prototype.destroy=function(){this.bufferBlob=void 0,this.bufferText=void 0,this.enc instanceof go&&this.enc.destroy(),this.enc=void 0},t}(),yo=new Int16Array(286),bo=new Uint8Array(286),vo=new Int16Array(30),wo=new Uint8Array(30),So=function(){function t(e){this.pendingBuffer=new Uint8Array(65536),this.pendingBufLength=0,this.pendingBufCache=0,this.pendingBufBitsInCache=0,this.bufferPosition=0,this.extraBits=0,this.currentHash=0,this.matchStart=0,this.matchLength=0,this.matchPrevAvail=!1,this.blockStart=0,this.stringStart=0,this.lookAhead=0,this.totalBytesIn=0,this.inputOffset=0,this.inputEnd=0,this.windowSize=32768,this.windowMask=this.windowSize-1,this.hashSize=32768,this.hashMask=this.hashSize-1,this.hashShift=Math.floor(17/3),this.maxDist=this.windowSize-262,this.checkSum=1,this.noWrap=!1,t.isHuffmanTreeInitiated||(t.initHuffmanTree(),t.isHuffmanTreeInitiated=!0),this.treeLiteral=new Po(this,286,257,15),this.treeDistances=new Po(this,30,1,15),this.treeCodeLengths=new Po(this,19,4,7),this.arrDistances=new Uint16Array(16384),this.arrLiterals=new Uint8Array(16384),this.stream=[],this.dataWindow=new Uint8Array(2*this.windowSize),this.hashHead=new Int16Array(this.hashSize),this.hashPrevious=new Int16Array(this.windowSize),this.blockStart=this.stringStart=1,this.noWrap=e,e||this.writeZLibHeader()}return Object.defineProperty(t.prototype,"compressedData",{get:function(){return this.stream},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getCompressedString",{get:function(){var t="";if(void 0!==this.stream)for(var e=0;e<this.stream.length;e++)t+=String.fromCharCode.apply(null,this.stream[e]);return t},enumerable:!0,configurable:!0}),t.prototype.write=function(t,e,i){if(void 0===t||null===t)throw new Error("ArgumentException: data cannot null or undefined");var r=e+i;if(0>e||e>r||r>t.length)throw new Error("ArgumentOutOfRangeException: Offset or length is incorrect");if("string"==typeof t){var n=new go(!1);n.type="Utf8",r=e+(t=new Uint8Array(n.getBytes(t,0,t.length))).length}for(this.inputBuffer=t,this.inputOffset=e,this.inputEnd=r,this.noWrap||(this.checkSum=Co.checksumUpdate(this.checkSum,this.inputBuffer,this.inputOffset,r));this.inputEnd!==this.inputOffset||0!==this.pendingBufLength;)this.pendingBufferFlush(),this.compressData(!1)},t.prototype.writeZLibHeader=function(){var t=30720;t|=64,t+=31-t%31,this.pendingBufferWriteShortBytes(t)},t.prototype.pendingBufferWriteShortBytes=function(t){this.pendingBuffer[this.pendingBufLength++]=t>>8,this.pendingBuffer[this.pendingBufLength++]=t},t.prototype.compressData=function(t){var e;do{this.fillWindow();var i=t&&this.inputEnd===this.inputOffset;e=this.compressSlow(i,t)}while(0===this.pendingBufLength&&e);return e},t.prototype.compressSlow=function(t,e){if(this.lookAhead<262&&!t)return!1;for(;this.lookAhead>=262||t;){if(0===this.lookAhead)return this.lookAheadCompleted(e);this.stringStart>=2*this.windowSize-262&&this.slideWindow();var i=this.matchStart,r=this.matchLength;if(this.lookAhead>=3&&this.discardMatch(),r>=3&&this.matchLength<=r?r=this.matchPreviousBest(i,r):this.matchPreviousAvailable(),this.bufferPosition>=16384)return this.huffmanIsFull(e)}return!0},t.prototype.discardMatch=function(){var t=this.insertString();0!==t&&this.stringStart-t<=this.maxDist&&this.findLongestMatch(t)&&this.matchLength<=5&&3===this.matchLength&&this.stringStart-this.matchStart>4096&&(this.matchLength=2)},t.prototype.matchPreviousAvailable=function(){this.matchPrevAvail&&this.huffmanTallyLit(255&this.dataWindow[this.stringStart-1]),this.matchPrevAvail=!0,this.stringStart++,this.lookAhead--},t.prototype.matchPreviousBest=function(t,e){this.huffmanTallyDist(this.stringStart-1-t,e),e-=2;do{this.stringStart++,this.lookAhead--,this.lookAhead>=3&&this.insertString()}while(--e>0);return this.stringStart++,this.lookAhead--,this.matchPrevAvail=!1,this.matchLength=2,e},t.prototype.lookAheadCompleted=function(t){return this.matchPrevAvail&&this.huffmanTallyLit(255&this.dataWindow[this.stringStart-1]),this.matchPrevAvail=!1,this.huffmanFlushBlock(this.dataWindow,this.blockStart,this.stringStart-this.blockStart,t),this.blockStart=this.stringStart,!1},t.prototype.huffmanIsFull=function(t){var e=this.stringStart-this.blockStart;this.matchPrevAvail&&e--;var i=t&&0===this.lookAhead&&!this.matchPrevAvail;return this.huffmanFlushBlock(this.dataWindow,this.blockStart,e,i),this.blockStart+=e,!i},t.prototype.fillWindow=function(){for(this.stringStart>=this.windowSize+this.maxDist&&this.slideWindow();this.lookAhead<262&&this.inputOffset<this.inputEnd;){var t=2*this.windowSize-this.lookAhead-this.stringStart;t>this.inputEnd-this.inputOffset&&(t=this.inputEnd-this.inputOffset),this.dataWindow.set(this.inputBuffer.subarray(this.inputOffset,this.inputOffset+t),this.stringStart+this.lookAhead),this.inputOffset+=t,this.totalBytesIn+=t,this.lookAhead+=t}this.lookAhead>=3&&this.updateHash()},t.prototype.slideWindow=function(){this.dataWindow.set(this.dataWindow.subarray(this.windowSize,this.windowSize+this.windowSize),0),this.matchStart-=this.windowSize,this.stringStart-=this.windowSize,this.blockStart-=this.windowSize;for(var t=0;t<this.hashSize;++t){var e=65535&this.hashHead[t];this.hashHead[t]=e>=this.windowSize?e-this.windowSize:0}for(t=0;t<this.windowSize;t++){e=65535&this.hashPrevious[t];this.hashPrevious[t]=e>=this.windowSize?e-this.windowSize:0}},t.prototype.insertString=function(){var t,e=(this.currentHash<<this.hashShift^this.dataWindow[this.stringStart+2])&this.hashMask;return this.hashPrevious[this.stringStart&this.windowMask]=t=this.hashHead[e],this.hashHead[e]=this.stringStart,this.currentHash=e,65535&t},t.prototype.findLongestMatch=function(t){var e,i=4096,r=258,n=this.stringStart,o=this.stringStart+this.matchLength,s=Math.max(this.matchLength,2),a=Math.max(this.stringStart-this.maxDist,0),l=this.stringStart+258-1,h=this.dataWindow[o-1],u=this.dataWindow[o],c=this.dataWindow;s>=32&&(i>>=2),r>this.lookAhead&&(r=this.lookAhead);do{if(c[t+s]===u&&c[t+s-1]===h&&c[t]===c[n]&&c[t+1]===c[n+1]){for(e=t+2,n+=2;c[++n]===c[++e]&&c[++n]===c[++e]&&c[++n]===c[++e]&&c[++n]===c[++e]&&c[++n]===c[++e]&&c[++n]===c[++e]&&c[++n]===c[++e]&&c[++n]===c[++e]&&n<l;);if(n>o){if(this.matchStart=t,o=n,(s=n-this.stringStart)>=r)break;h=c[o-1],u=c[o]}n=this.stringStart}}while((t=65535&this.hashPrevious[t&this.windowMask])>a&&0!=--i);return this.matchLength=Math.min(s,this.lookAhead),this.matchLength>=3},t.prototype.updateHash=function(){this.currentHash=this.dataWindow[this.stringStart]<<this.hashShift^this.dataWindow[this.stringStart+1]},t.prototype.huffmanTallyLit=function(t){return this.arrDistances[this.bufferPosition]=0,this.arrLiterals[this.bufferPosition++]=t,this.treeLiteral.codeFrequencies[t]++,this.bufferPosition>=16384},t.prototype.huffmanTallyDist=function(t,e){this.arrDistances[this.bufferPosition]=t,this.arrLiterals[this.bufferPosition++]=e-3;var i=this.huffmanLengthCode(e-3);this.treeLiteral.codeFrequencies[i]++,i>=265&&i<285&&(this.extraBits+=Math.floor((i-261)/4));var r=this.huffmanDistanceCode(t-1);return this.treeDistances.codeFrequencies[r]++,r>=4&&(this.extraBits+=Math.floor(r/2-1)),this.bufferPosition>=16384},t.prototype.huffmanFlushBlock=function(t,e,i,r){this.treeLiteral.codeFrequencies[256]++,this.treeLiteral.buildTree(),this.treeDistances.buildTree(),this.treeLiteral.calculateBLFreq(this.treeCodeLengths),this.treeDistances.calculateBLFreq(this.treeCodeLengths),this.treeCodeLengths.buildTree();for(var n=4,o=18;o>n;o--)this.treeCodeLengths.codeLengths[Po.huffCodeLengthOrders[o]]>0&&(n=o+1);var s=14+3*n+this.treeCodeLengths.getEncodedLength()+this.treeLiteral.getEncodedLength()+this.treeDistances.getEncodedLength()+this.extraBits,a=this.extraBits;for(o=0;o<286;o++)a+=this.treeLiteral.codeFrequencies[o]*bo[o];for(o=0;o<30;o++)a+=this.treeDistances.codeFrequencies[o]*wo[o];s>=a&&(s=a),e>=0&&i+4<s>>3?this.huffmanFlushStoredBlock(t,e,i,r):s==a?(this.pendingBufferWriteBits(2+(r?1:0),3),this.treeLiteral.setStaticCodes(yo,bo),this.treeDistances.setStaticCodes(vo,wo),this.huffmanCompressBlock(),this.huffmanReset()):(this.pendingBufferWriteBits(4+(r?1:0),3),this.huffmanSendAllTrees(n),this.huffmanCompressBlock(),this.huffmanReset())},t.prototype.huffmanFlushStoredBlock=function(t,e,i,r){this.pendingBufferWriteBits(0+(r?1:0),3),this.pendingBufferAlignToByte(),this.pendingBufferWriteShort(i),this.pendingBufferWriteShort(~i),this.pendingBufferWriteByteBlock(t,e,i),this.huffmanReset()},t.prototype.huffmanLengthCode=function(t){if(255===t)return 285;for(var e=257;t>=8;)e+=4,t>>=1;return e+t},t.prototype.huffmanDistanceCode=function(t){for(var e=0;t>=4;)e+=2,t>>=1;return e+t},t.prototype.huffmanSendAllTrees=function(t){this.treeCodeLengths.buildCodes(),this.treeLiteral.buildCodes(),this.treeDistances.buildCodes(),this.pendingBufferWriteBits(this.treeLiteral.treeLength-257,5),this.pendingBufferWriteBits(this.treeDistances.treeLength-1,5),this.pendingBufferWriteBits(t-4,4);for(var e=0;e<t;e++)this.pendingBufferWriteBits(this.treeCodeLengths.codeLengths[Po.huffCodeLengthOrders[e]],3);this.treeLiteral.writeTree(this.treeCodeLengths),this.treeDistances.writeTree(this.treeCodeLengths)},t.prototype.huffmanReset=function(){this.bufferPosition=0,this.extraBits=0,this.treeLiteral.reset(),this.treeDistances.reset(),this.treeCodeLengths.reset()},t.prototype.huffmanCompressBlock=function(){for(var t=0;t<this.bufferPosition;t++){var e=255&this.arrLiterals[t],i=this.arrDistances[t];if(0!=i--){var r=this.huffmanLengthCode(e);this.treeLiteral.writeCodeToStream(r);var n=Math.floor((r-261)/4);n>0&&n<=5&&this.pendingBufferWriteBits(e&(1<<n)-1,n);var o=this.huffmanDistanceCode(i);this.treeDistances.writeCodeToStream(o),(n=Math.floor(o/2-1))>0&&this.pendingBufferWriteBits(i&(1<<n)-1,n)}else this.treeLiteral.writeCodeToStream(e)}this.treeLiteral.writeCodeToStream(256)},t.prototype.pendingBufferWriteBits=function(t,e){var i=new Uint32Array(1);i[0]=this.pendingBufCache|t<<this.pendingBufBitsInCache,this.pendingBufCache=i[0],this.pendingBufBitsInCache+=e,this.pendingBufferFlushBits()},t.prototype.pendingBufferFlush=function(t){if(this.pendingBufferFlushBits(),this.pendingBufLength>0){var e=new Uint8Array(this.pendingBufLength);e.set(this.pendingBuffer.subarray(0,this.pendingBufLength),0),this.stream.push(e)}this.pendingBufLength=0},t.prototype.pendingBufferFlushBits=function(){for(var t=0;this.pendingBufBitsInCache>=8&&this.pendingBufLength<65536;)this.pendingBuffer[this.pendingBufLength++]=this.pendingBufCache,this.pendingBufCache>>=8,this.pendingBufBitsInCache-=8,t++;return t},t.prototype.pendingBufferWriteByteBlock=function(t,e,i){var r=t.subarray(e,e+i);this.pendingBuffer.set(r,this.pendingBufLength),this.pendingBufLength+=i},t.prototype.pendingBufferWriteShort=function(t){this.pendingBuffer[this.pendingBufLength++]=t,this.pendingBuffer[this.pendingBufLength++]=t>>8},t.prototype.pendingBufferAlignToByte=function(){this.pendingBufBitsInCache>0&&(this.pendingBuffer[this.pendingBufLength++]=this.pendingBufCache),this.pendingBufCache=0,this.pendingBufBitsInCache=0},t.initHuffmanTree=function(){for(var t=0;t<144;)yo[t]=Po.bitReverse(48+t<<8),bo[t++]=8;for(;t<256;)yo[t]=Po.bitReverse(256+t<<7),bo[t++]=9;for(;t<280;)yo[t]=Po.bitReverse(-256+t<<9),bo[t++]=7;for(;t<286;)yo[t]=Po.bitReverse(-88+t<<8),bo[t++]=8;for(t=0;t<30;t++)vo[t]=Po.bitReverse(t<<11),wo[t]=5},t.prototype.close=function(){do{this.pendingBufferFlush(!0),this.compressData(!0)||(this.pendingBufferFlush(!0),this.pendingBufferAlignToByte(),this.noWrap||(this.pendingBufferWriteShortBytes(this.checkSum>>16),this.pendingBufferWriteShortBytes(65535&this.checkSum)),this.pendingBufferFlush(!0))}while(this.inputEnd!==this.inputOffset||0!==this.pendingBufLength)},t.prototype.destroy=function(){this.stream=[],this.stream=void 0,this.pendingBuffer=void 0,this.treeLiteral=void 0,this.treeDistances=void 0,this.treeCodeLengths=void 0,this.arrLiterals=void 0,this.arrDistances=void 0,this.hashHead=void 0,this.hashPrevious=void 0,this.dataWindow=void 0,this.inputBuffer=void 0,this.pendingBufLength=void 0,this.pendingBufCache=void 0,this.pendingBufBitsInCache=void 0,this.bufferPosition=void 0,this.extraBits=void 0,this.currentHash=void 0,this.matchStart=void 0,this.matchLength=void 0,this.matchPrevAvail=void 0,this.blockStart=void 0,this.stringStart=void 0,this.lookAhead=void 0,this.totalBytesIn=void 0,this.inputOffset=void 0,this.inputEnd=void 0,this.windowSize=void 0,this.windowMask=void 0,this.hashSize=void 0,this.hashMask=void 0,this.hashShift=void 0,this.maxDist=void 0,this.checkSum=void 0,this.noWrap=void 0},t.isHuffmanTreeInitiated=!1,t}(),Po=function(){function t(t,e,i,r){this.writer=t,this.codeMinCount=i,this.maxLength=r,this.codeFrequency=new Uint16Array(e),this.lengthCount=new Int32Array(r)}return Object.defineProperty(t.prototype,"treeLength",{get:function(){return this.codeCount},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"codeLengths",{get:function(){return this.codeLength},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"codeFrequencies",{get:function(){return this.codeFrequency},enumerable:!0,configurable:!0}),t.prototype.setStaticCodes=function(t,e){var i=new Int16Array(t.length);i.set(t,0),this.codes=i;var r=new Uint8Array(e.length);r.set(e,0),this.codeLength=r},t.prototype.reset=function(){for(var t=0;t<this.codeFrequency.length;t++)this.codeFrequency[t]=0;this.codes=void 0,this.codeLength=void 0},t.prototype.writeCodeToStream=function(t){this.writer.pendingBufferWriteBits(65535&this.codes[t],this.codeLength[t])},t.prototype.buildCodes=function(){var e=new Int32Array(this.maxLength);this.codes=new Int16Array(this.codeCount);for(var i=0,r=0;r<this.maxLength;r++)e[r]=i,i+=this.lengthCount[r]<<15-r;for(var n=0;n<this.codeCount;n++){var o=this.codeLength[n];o>0&&(this.codes[n]=t.bitReverse(e[o-1]),e[o-1]+=1<<16-o)}},t.bitReverse=function(e){return t.reverseBits[15&e]<<12|t.reverseBits[e>>4&15]<<8|t.reverseBits[e>>8&15]<<4|t.reverseBits[e>>12]},t.prototype.getEncodedLength=function(){for(var t=0,e=0;e<this.codeFrequency.length;e++)t+=this.codeFrequency[e]*this.codeLength[e];return t},t.prototype.calculateBLFreq=function(t){for(var e,i,r,n=-1,o=0;o<this.codeCount;){r=1;var s=this.codeLength[o];for(0===s?(e=138,i=3):(e=6,i=3,n!==s&&(t.codeFrequency[s]++,r=0)),n=s,o++;o<this.codeCount&&n===this.codeLength[o]&&(o++,!(++r>=e)););r<i?t.codeFrequency[n]+=r:0!==n?t.codeFrequency[16]++:r<=10?t.codeFrequency[17]++:t.codeFrequency[18]++}},t.prototype.writeTree=function(t){for(var e,i,r,n=-1,o=0;o<this.codeCount;){r=1;var s=this.codeLength[o];for(0===s?(e=138,i=3):(e=6,i=3,n!==s&&(t.writeCodeToStream(s),r=0)),n=s,o++;o<this.codeCount&&n===this.codeLength[o]&&(o++,!(++r>=e)););if(r<i)for(;r-- >0;)t.writeCodeToStream(n);else 0!==n?(t.writeCodeToStream(16),this.writer.pendingBufferWriteBits(r-3,2)):r<=10?(t.writeCodeToStream(17),this.writer.pendingBufferWriteBits(r-3,3)):(t.writeCodeToStream(18),this.writer.pendingBufferWriteBits(r-11,7))}},t.prototype.buildTree=function(){for(var t=this.codeFrequency.length,e=new Int32Array(t),i=0,r=0,n=0;n<t;n++){var o=this.codeFrequency[n];if(0!==o){for(var s=i++,a=0;s>0&&this.codeFrequency[e[a=Math.floor((s-1)/2)]]>o;)e[s]=e[a],s=a;e[s]=n,r=n}}for(;i<2;)e[i++]=r<2?++r:0;this.codeCount=Math.max(r+1,this.codeMinCount);for(var l=i,h=new Int32Array(4*i-2),u=new Int32Array(2*i-1),c=0;c<i;c++){var p=e[c],d=2*c;h[d]=p,h[d+1]=-1,u[c]=this.codeFrequency[p]<<8,e[c]=c}this.constructHuffmanTree(e,i,u,l,h),this.buildLength(h)},t.prototype.constructHuffmanTree=function(t,e,i,r,n){do{for(var o=t[0],s=t[--e],a=i[s],l=0,h=1;h<e;)h+1<e&&i[t[h]]>i[t[h+1]]&&h++,t[l]=t[h],h=2*(l=h)+1;for(;(h=l)>0&&i[t[l=Math.floor((h-1)/2)]]>a;)t[h]=t[l];t[h]=s;var u=t[0];n[2*(s=r++)]=o,n[2*s+1]=u;var c=Math.min(255&i[o],255&i[u]);for(i[s]=a=i[o]+i[u]-c+1,l=0,h=1;h<e;)h+1<e&&i[t[h]]>i[t[h+1]]&&h++,t[l]=t[h],h=2*(l=h)+1;for(;(h=l)>0&&i[t[l=Math.floor((h-1)/2)]]>a;)t[h]=t[l];t[h]=s}while(e>1)},t.prototype.buildLength=function(t){this.codeLength=new Uint8Array(this.codeFrequency.length);for(var e=Math.floor(t.length/2),i=Math.floor((e+1)/2),r=0,n=0;n<this.maxLength;n++)this.lengthCount[n]=0;if(0!==(r=this.calculateOptimalCodeLength(t,r,e))){var o=this.maxLength-1;do{for(;0===this.lengthCount[--o];);do{this.lengthCount[o]--,this.lengthCount[++o]++,r-=1<<this.maxLength-1-o}while(r>0&&o<this.maxLength-1)}while(r>0);this.recreateTree(t,r,i)}},t.prototype.recreateTree=function(t,e,i){this.lengthCount[this.maxLength-1]+=e,this.lengthCount[this.maxLength-2]-=e;for(var r=2*i,n=this.maxLength;0!==n;n--)for(var o=this.lengthCount[n-1];o>0;){var s=2*t[r++];-1===t[s+1]&&(this.codeLength[t[s]]=n,o--)}},t.prototype.calculateOptimalCodeLength=function(t,e,i){var r=new Int32Array(i);r[i-1]=0;for(var n=i-1;n>=0;n--){var o=2*n+1;if(-1!==t[o]){(s=r[n]+1)>this.maxLength&&(s=this.maxLength,e++),r[t[o-1]]=r[t[o]]=s}else{var s=r[n];this.lengthCount[s-1]++,this.codeLength[t[o-1]]=r[n]}}return e},t.reverseBits=[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15],t.huffCodeLengthOrders=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],t}(),Co=function(){function t(){}return t.checksumUpdate=function(e,i,r,n){var o=new Uint32Array(1);o[0]=e;for(var s=o[0],a=o[0]=65535&s,l=o[0]=s>>t.checkSumBitOffset;n>0;){var h=Math.min(n,t.checksumIterationCount);for(n-=h;--h>=0;)l+=a+=o[0]=255&i[r++];a%=t.checksumBase,l%=t.checksumBase}return s=l<<t.checkSumBitOffset|a},t.checkSumBitOffset=16,t.checksumBase=65521,t.checksumIterationCount=3800,t}(),xo=[],Oo=(function(){function t(){0===xo.length&&t.initCrc32Table(),this.files=[],this.level="Normal",uo.isMicrosoftBrowser=!!navigator.msSaveBlob}Object.defineProperty(t.prototype,"compressionLevel",{get:function(){return this.level},set:function(t){this.level=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return void 0===this.files?0:this.files.length},enumerable:!0,configurable:!0}),t.prototype.addItem=function(t){if(null===t||void 0===t)throw new Error("ArgumentException: item cannot be null or undefined");for(var e=0;e<this.files.length;e++){var i=this.files[e];if(i instanceof Oo&&i.name===t.name)throw new Error("item with same name already exist")}this.files.push(t)},t.prototype.addDirectory=function(t){if(null===t||void 0===t)throw new Error("ArgumentException: string cannot be null or undefined");if(0===t.length)throw new Error("ArgumentException: string cannot be empty");if("/"!==t.slice(-1)&&(t+="/"),-1!==this.files.indexOf(t))throw new Error("item with same name already exist");this.files.push(t)},t.prototype.getItem=function(t){if(t>=0&&t<this.files.length)return this.files[t]},t.prototype.contains=function(t){return-1!==this.files.indexOf(t)},t.prototype.save=function(t){if(null===t||void 0===t||0===t.length)throw new Error("ArgumentException: fileName cannot be null or undefined");if(0===this.files.length)throw new Error("InvalidOperation");var e=this;return new Promise(function(i,r){e.saveInternal(t,!1).then(function(){i(e)})})},t.prototype.saveAsBlob=function(){var t=this;return new Promise(function(e,i){t.saveInternal("",!0).then(function(t){e(t)})})},t.prototype.saveInternal=function(t,e){var i=this,r=this;return new Promise(function(n,o){for(var s=[],a=0,l=0;l<r.files.length;l++){i.getCompressedData(i.files[l]).then(function(i){if(a=r.constructZippedObject(s,i,a,i.isDirectory),s.length===r.files.length){var o=r.writeZippedContent(t,s,a,e);n(o)}})}})},t.prototype.destroy=function(){if(void 0!==this.files&&this.files.length>0){for(var t=0;t<this.files.length;t++){var e=this.files[t];e instanceof Oo&&e.destroy(),e=void 0}this.files=[]}this.files=void 0,this.level=void 0},t.prototype.getCompressedData=function(t){var e=this;return new Promise(function(i,r){if(t instanceof Oo){var n=new FileReader;n.onload=function(){var r=new Uint8Array(n.result),o={fileName:t.name,crc32Value:0,compressedData:[],compressedSize:void 0,uncompressedDataSize:r.length,compressionType:void 0,isDirectory:!1};if("Normal"===e.level){e.compressData(r,o,xo);for(var s=0,a=0;a<o.compressedData.length;a++)s+=o.compressedData[a].length;o.compressedSize=s,o.compressionType="\b\0"}else o.compressedSize=r.length,o.crc32Value=e.calculateCrc32Value(0,r,xo),o.compressionType="\0\0",o.compressedData.push(r);i(o)},n.readAsArrayBuffer(t.data)}else{i({fileName:t,crc32Value:0,compressedData:"",compressedSize:0,uncompressedDataSize:0,compressionType:"\0\0",isDirectory:!0})}})},t.prototype.compressData=function(t,e,i){var r=new So(!0),n=0,o=0;do{if(n>=t.length){r.close();break}o=Math.min(t.length,n+16384);var s=t.subarray(n,o);e.crc32Value=this.calculateCrc32Value(e.crc32Value,s,i),r.write(s,0,o-n),n=o}while(n<=t.length);e.compressedData=r.compressedData,r.destroy()},t.prototype.constructZippedObject=function(t,e,i,r){var n=0,o=new Date;r&&(n|=16),n|=0;var s=this.writeHeader(e,o),a="PK"+s+e.fileName,l=this.writeCentralDirectory(e,s,i,n);return t.push({localHeader:a,centralDir:l,compressedData:e}),i+a.length+e.compressedSize},t.prototype.writeHeader=function(t,e){var i="";return i+="\n\0\0\0",i+=t.compressionType,i+=this.getBytes(this.getModifiedTime(e),2),i+=this.getBytes(this.getModifiedDate(e),2),i+=this.getBytes(t.crc32Value,4),i+=this.getBytes(t.compressedSize,4),i+=this.getBytes(t.uncompressedDataSize,4),i+=this.getBytes(t.fileName.length,2),i+=this.getBytes(0,2)},t.prototype.writeZippedContent=function(t,e,i,r){for(var n=0,o=[],s=0;s<e.length;s++){var a=e[s];for(n+=a.centralDir.length,o.push(this.getArrayBuffer(a.localHeader));a.compressedData.compressedData.length;)o.push(a.compressedData.compressedData.shift().buffer)}for(s=0;s<e.length;s++)o.push(this.getArrayBuffer(e[s].centralDir));o.push(this.getArrayBuffer(this.writeFooter(e,n,i)));var l=new Blob(o,{type:"application/zip"});return r||uo.save(t,l),l},t.prototype.writeCentralDirectory=function(t,e,i,r){return"PK"+this.getBytes(20,2)+e+this.getBytes(0,2)+"\0\0\0\0"+this.getBytes(r,4)+this.getBytes(i,4)+t.fileName},t.prototype.writeFooter=function(t,e,i){return"PK\0\0\0\0"+this.getBytes(t.length,2)+this.getBytes(t.length,2)+this.getBytes(e,4)+this.getBytes(i,4)+this.getBytes(0,2)},t.prototype.getArrayBuffer=function(t){for(var e=new Uint8Array(t.length),i=0;i<t.length;++i)e[i]=255&t.charCodeAt(i);return e.buffer},t.prototype.getBytes=function(t,e){for(var i="",r=0;r<e;r++)i+=String.fromCharCode(255&t),t>>>=8;return i},t.prototype.getModifiedTime=function(t){var e=t.getHours();return e<<=6,e|=t.getMinutes(),e<<=5,e|=t.getSeconds()/2},t.prototype.getModifiedDate=function(t){var e=t.getFullYear()-1980;return e<<=4,e|=t.getMonth()+1,e<<=5,e|=t.getDate()},t.prototype.calculateCrc32Value=function(t,e,i){t^=-1;for(var r=0;r<e.length;r++)t=t>>>8^i[255&(t^e[r])];return-1^t},t.initCrc32Table=function(){for(var t,e=0;e<256;e++){t=e;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;xo[e]=t}}}(),function(){function t(t,e){if(null===t||void 0===t)throw new Error("ArgumentException: data cannot be null or undefined");if(null===e||void 0===e)throw new Error("ArgumentException: string cannot be null or undefined");if(0===e.length)throw new Error("string cannot be empty");this.data=t,this.name=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this.fileName},set:function(t){this.fileName=t},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this.fileName=void 0,this.data=void 0},t}()),Bo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Lo=function(t){function e(e,i){var r=t.call(this,e)||this;return r.dicPrefix="stream",r.dicSuffix="endstream",r.clonedObject2=null,r.bCompress=!0,r.isImageStream=!1,r.isFontStream=!1,void 0!==e||void 0!==i?(r.dataStream2=[],r.dataStream2=i,r.bCompress2=!1):(r.dataStream2=[],r.bCompress2=!0),r}return Bo(e,t),Object.defineProperty(e.prototype,"internalStream",{get:function(){return this.dataStream2},set:function(t){this.dataStream2=[],this.dataStream2=t,this.modify()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isImage",{get:function(){return this.isImageStream},set:function(t){this.isImageStream=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isFont",{get:function(){return this.isFontStream},set:function(t){this.isFontStream=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"compress",{get:function(){return this.bCompress},set:function(t){this.bCompress=t,this.modify()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.dataStream2},set:function(t){this.dataStream2=[],this.dataStream2=t,this.modify()},enumerable:!0,configurable:!0}),e.prototype.clearStream=function(){this.internalStream=[],this.items.containsKey(this.dictionaryProperties.filter)&&this.remove(this.dictionaryProperties.filter),this.bCompress=!0,this.modify()},e.prototype.write=function(t){if(null==t)throw new Error("ArgumentNullException:text");if(t.length<=0)throw new Error("ArgumentException: Can not write an empty string, text");this.dataStream2.push(t),this.modify()},e.prototype.writeBytes=function(t){if(null===t)throw new Error("ArgumentNullException:data");if(t.length<=0)throw new Error("ArgumentException: Can not write an empty bytes, data");for(var e="",i=0;i<t.length;i++)e+=String.fromCharCode(t[i]);this.dataStream2.push(e),this.modify()},e.prototype.onCmapBeginSave=function(){this.cmapBeginSave.sender.cmapBeginSave()},e.prototype.onFontProgramBeginSave=function(){this.fontProgramBeginSave.sender.fontProgramBeginSave()},e.prototype.compressContent=function(t,e){if(this.bCompress){for(var i=[],r=0;r<t.length;r++)i.push(t.charCodeAt(r));var n=new Uint8Array(i),o=new So;o.write(n,0,n.length),o.close(),t=o.getCompressedString,this.addFilter(this.dictionaryProperties.flatedecode)}return t},e.prototype.addFilter=function(t){var e=this.items.getValue(this.dictionaryProperties.filter);if(e instanceof jo){e=e.object}var i=e,r=e;null!=r&&((i=new ho).insert(0,r),this.items.setValue(this.dictionaryProperties.filter,i)),r=new Qn(t),null==i?this.items.setValue(this.dictionaryProperties.filter,r):i.insert(0,r)},e.prototype.save=function(e){void 0!==this.cmapBeginSave&&this.onCmapBeginSave(),void 0!==this.fontProgramBeginSave&&this.onFontProgramBeginSave();for(var i="",r=0;r<this.data.length;r++)i+=this.data[r];i.length>1&&!this.isImage&&!this.isFont&&(i="q\r\n"+i+"Q\r\n");var n=(i=this.compressContent(i,e)).length;this.items.setValue(this.dictionaryProperties.length,new lo(n)),t.prototype.save.call(this,e,!1),e.write(this.dicPrefix),e.write(Zn.newLine),i.length>0&&e.write(i),e.write(Zn.newLine),e.write(this.dicSuffix),e.write(Zn.newLine)},e.bytesToString=function(t){for(var e="",i=0;i<t.length;i++)e+=String.fromCharCode(t[i]);return e},e}(eo),To=function(){return function(t){this.sender=t}}(),Mo=function(){return function(t){this.sender=t}}();!function(t){!function(t){t[t.None=0]="None",t[t.Ascii=1]="Ascii",t[t.Unicode=2]="Unicode"}(t.ForceEncoding||(t.ForceEncoding={}));var e;!function(t){t[t.StringValue=0]="StringValue",t[t.ByteBuffer=1]="ByteBuffer"}(e||(e={}))}(Yn||(Yn={}));var Do,ko=function(){function t(t){if(this.bHex=!1,this.position1=-1,this.clonedObject1=null,this.bDecrypted=!1,this.isParentDecrypted=!1,this.isPacked=!1,this.isFormField=!1,this.isColorSpace=!1,this.isHexString=!0,void 0===t)this.bHex=!1;else if(!(t.length>0&&"0xfeff"===t[0])){this.stringValue=t,this.data=[];for(var e=0;e<t.length;++e)this.data.push(t.charCodeAt(e))}}return Object.defineProperty(t.prototype,"hex",{get:function(){return this.bHex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.stringValue},set:function(t){this.stringValue=t,this.data=null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this.status1},set:function(t){this.status1=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving1},set:function(t){this.isSaving1=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index1},set:function(t){this.index1=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return this.clonedObject1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position1},set:function(t){this.position1=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"CrossTable",{get:function(){return this.crossTable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"converted",{get:function(){return this.bConverted},set:function(t){this.bConverted=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"encode",{get:function(){return this.bForceEncoding},set:function(t){this.bForceEncoding=t},enumerable:!0,configurable:!0}),t.bytesToHex=function(t){if(null==t)return"";return""},t.prototype.save=function(e){if(null===e)throw new Error("ArgumentNullException : writer");void 0!==this.encode&&this.encode===Yn.ForceEncoding.Ascii?e.write(this.pdfEncode()):e.write(t.stringMark[0]+this.value+t.stringMark[1])},t.prototype.pdfEncode=function(){var e="";if(void 0!==this.encode&&this.encode===Yn.ForceEncoding.Ascii){for(var i=this.escapeSymbols(this.value),r=0;r<i.length;r++)e+=String.fromCharCode(i[r]);e=t.stringMark[0]+e+t.stringMark[1]}else e=this.value;return e},t.prototype.escapeSymbols=function(t){for(var e=[],i=0;i<t.length;i++){var r=t.charCodeAt(i);switch(r){case 40:case 41:e.push(92),e.push(r);break;case 13:e.push(92),e.push(114);break;case 92:e.push(92),e.push(r);break;default:e.push(r)}}return e},t.prototype.clone=function(e){if(null!==this.clonedObject1&&this.clonedObject1.CrossTable===e)return this.clonedObject1;this.clonedObject1=null;var i=new t(this.stringValue);return i.bHex=this.bHex,i.crossTable=e,i.isColorSpace=this.isColorSpace,this.clonedObject1=i,i},t.toUnicodeArray=function(t,e){if(null==t)throw new Error("Argument Null Exception : value");for(var i=[],r=0;r<t.length;r++){var n=t.charCodeAt(r);i.push(n/256>>>0),i.push(255&n)}return i},t.byteToString=function(t){if(null==t)throw new Error("Argument Null Exception : stream");for(var e="",i=0;i<t.length;++i)e+=String.fromCharCode(t[i]);return e},t.stringMark="()",t.hexStringMark="<>",t.hexFormatPattern="{0:X2}",t}(),Eo=function(){function t(t,e){this.index3=-1,this.position3=-1,this.objNumber=0,this.genNumber=0,"number"==typeof t&&"number"==typeof e?(this.objNumber=t,this.genNumber=e):(this.objNumber=Number(t),this.genNumber=Number(e))}return Object.defineProperty(t.prototype,"status",{get:function(){return this.status3},set:function(t){this.status3=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving3},set:function(t){this.isSaving3=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index3},set:function(t){this.index3=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position3},set:function(t){this.position3=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return null},enumerable:!0,configurable:!0}),t.prototype.save=function(t){t.write(this.toString())},t.prototype.toString=function(){return this.objNumber.toString()+" "+this.genNumber.toString()+" R"},t.prototype.clone=function(t){return null},t}(),jo=function(){function t(t,e){this.index4=-1,this.position4=-1,this.objectIndex=-1,this.dictionaryProperties=new to,this.initialize(t)}return Object.defineProperty(t.prototype,"status",{get:function(){return this.status4},set:function(t){this.status4=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving4},set:function(t){this.isSaving4=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index4},set:function(t){this.index4=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position4},set:function(t){this.position4=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"object",{get:function(){return this.primitiveObject},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"reference",{get:function(){return this.pdfReference},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.objectIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.primitiveObject},enumerable:!0,configurable:!0}),t.prototype.initialize=function(t){if(t instanceof ho||t instanceof eo||t instanceof Qn||t instanceof lo||t instanceof Lo||t instanceof Eo||t instanceof ko)this.primitiveObject=t;else{var e=t;this.initialize(e.element)}},t.prototype.save=function(t){t.position;var e=t.document.crossTable;this.object.isSaving=!0;e.getReference(this.object).save(t)},t.prototype.clone=function(t){return null},t}(),Io=function(){function t(){this.action=null,this.dictionaryProperties=new to,this.initialize()}return Object.defineProperty(t.prototype,"next",{get:function(){return this.action},set:function(t){this.action=t,this.dictionary.items.setValue(this.dictionaryProperties.next,new jo(this.action))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dictionary",{get:function(){return void 0===this.pdfDictionary&&(this.pdfDictionary=new eo),this.pdfDictionary},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){this.dictionary.items.setValue(this.dictionaryProperties.type,new Qn(this.dictionaryProperties.action))},Object.defineProperty(t.prototype,"element",{get:function(){return this.dictionary},enumerable:!0,configurable:!0}),t}(),Ro=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ao=function(t){function e(e){var i=t.call(this)||this;return i.uniformResourceIdentifier="",i}return Ro(e,t),Object.defineProperty(e.prototype,"uri",{get:function(){return this.uniformResourceIdentifier},set:function(t){this.uniformResourceIdentifier=t,this.dictionary.items.setValue(this.dictionaryProperties.uri,new ko(this.uniformResourceIdentifier))},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.dictionary.items.setValue(this.dictionaryProperties.s,new Qn(this.dictionaryProperties.uri))},e}(Io);!function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right"}(Do||(Do={}));var No;!function(t){t[t.Top=0]="Top",t[t.Middle=1]="Middle",t[t.Bottom=2]="Bottom"}(No||(No={}));var Fo;!function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right",t[t.Justify=3]="Justify"}(Fo||(Fo={}));var Vo;!function(t){t[t.Fill=0]="Fill",t[t.Stroke=1]="Stroke",t[t.FillStroke=2]="FillStroke",t[t.None=3]="None",t[t.ClipFlag=4]="ClipFlag",t[t.ClipFill=4]="ClipFill",t[t.ClipStroke=5]="ClipStroke",t[t.ClipFillStroke=6]="ClipFillStroke",t[t.Clip=7]="Clip"}(Vo||(Vo={}));var zo;!function(t){t[t.Miter=0]="Miter",t[t.Round=1]="Round",t[t.Bevel=2]="Bevel"}(zo||(zo={}));var Go;!function(t){t[t.Flat=0]="Flat",t[t.Round=1]="Round",t[t.Square=2]="Square"}(Go||(Go={}));var _o;!function(t){t[t.Solid=0]="Solid",t[t.Dash=1]="Dash",t[t.Dot=2]="Dot",t[t.DashDot=3]="DashDot",t[t.DashDotDot=4]="DashDotDot",t[t.Custom=5]="Custom"}(_o||(_o={}));var Ho;!function(t){t[t.Winding=0]="Winding",t[t.Alternate=1]="Alternate"}(Ho||(Ho={}));var Wo;!function(t){t[t.Rgb=0]="Rgb",t[t.Cmyk=1]="Cmyk",t[t.GrayScale=2]="GrayScale",t[t.Indexed=3]="Indexed"}(Wo||(Wo={}));var Uo;!function(t){t[t.Normal=0]="Normal",t[t.Multiply=1]="Multiply",t[t.Screen=2]="Screen",t[t.Overlay=3]="Overlay",t[t.Darken=4]="Darken",t[t.Lighten=5]="Lighten",t[t.ColorDodge=6]="ColorDodge",t[t.ColorBurn=7]="ColorBurn",t[t.HardLight=8]="HardLight",t[t.SoftLight=9]="SoftLight",t[t.Difference=10]="Difference",t[t.Exclusion=11]="Exclusion",t[t.Hue=12]="Hue",t[t.Saturation=13]="Saturation",t[t.Color=14]="Color",t[t.Luminosity=15]="Luminosity"}(Uo||(Uo={}));var qo;!function(t){t[t.Centimeter=0]="Centimeter",t[t.Pica=1]="Pica",t[t.Pixel=2]="Pixel",t[t.Point=3]="Point",t[t.Inch=4]="Inch",t[t.Document=5]="Document",t[t.Millimeter=6]="Millimeter"}(qo||(qo={}));var Ko;!function(t){t[t.Fit=0]="Fit",t[t.Center=1]="Center",t[t.Stretch=2]="Stretch",t[t.Tile=3]="Tile"}(Ko||(Ko={}));var Yo;!function(t){t[t.None=0]="None",t[t.LeftToRight=1]="LeftToRight",t[t.RightToLeft=2]="RightToLeft"}(Yo||(Yo={}));var $o,Jo=function(){function t(e,i,r,n){void 0===e?void 0!==i&&void 0!==r&&void 0!==n?this.assignRGB(i,r,n):this.filled=!1:e instanceof t?(this.redColor=e.r,this.greenColor=e.g,this.blueColor=e.b,this.grayColor=e.gray,this.alpha=e.alpha,this.filled=0!==this.alpha):"number"==typeof e&&void 0===i&&void 0===r&&void 0===n?(e<0&&(e=0),e>1&&(e=1),this.redColor=e*t.maxColourChannelValue,this.greenColor=e*t.maxColourChannelValue,this.blueColor=e*t.maxColourChannelValue,this.cyanColor=e,this.magentaColor=e,this.yellowColor=e,this.blackColor=e,this.grayColor=e,this.alpha=t.maxColourChannelValue,this.filled=!0):void 0===n?this.assignRGB(e,i,r):this.assignRGB(i,r,n,e)}return t.prototype.assignRGB=function(e,i,r,n){void 0===e||void 0===i||void 0===r?this.filled=!1:(this.cyanColor=0,this.magentaColor=0,this.yellowColor=0,this.blackColor=0,this.grayColor=0,this.redColor=e,this.greenColor=i,this.blueColor=r,this.alpha=void 0===n?t.maxColourChannelValue:n,this.filled=!0,this.assignCMYK(e,i,r))},t.prototype.assignCMYK=function(e,i,r){var n=e/t.maxColourChannelValue,o=i/t.maxColourChannelValue,s=r/t.maxColourChannelValue,a=lo.min(1-n,1-o,1-s),l=1===a?0:(1-n-a)/(1-a),h=1===a?0:(1-o-a)/(1-a),u=1===a?0:(1-s-a)/(1-a);this.blackColor=a,this.cyanColor=l,this.magentaColor=h,this.yellowColor=u},Object.defineProperty(t.prototype,"r",{get:function(){return this.redColor},set:function(t){this.redColor=t,this.assignCMYK(this.redColor,this.greenColor,this.blueColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"red",{get:function(){return this.r/t.maxColourChannelValue},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){return this.blueColor},set:function(t){this.blueColor=t,this.assignCMYK(this.redColor,this.greenColor,this.blueColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"blue",{get:function(){return this.b/t.maxColourChannelValue},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"c",{get:function(){return this.cyanColor},set:function(t){this.cyanColor=t<0?0:t>1?1:t,this.assignRGB(this.cyanColor,this.magentaColor,this.yellowColor,this.blackColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"k",{get:function(){return this.blackColor},set:function(t){this.blackColor=t<0?0:t>1?1:t,this.assignRGB(this.cyanColor,this.magentaColor,this.yellowColor,this.blackColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"m",{get:function(){return this.magentaColor},set:function(t){this.magentaColor=t<0?0:t>1?1:t,this.assignRGB(this.cyanColor,this.magentaColor,this.yellowColor,this.blackColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.yellowColor},set:function(t){this.yellowColor=t<0?0:t>1?1:t,this.assignRGB(this.cyanColor,this.magentaColor,this.yellowColor,this.blackColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"g",{get:function(){return this.greenColor},set:function(t){this.greenColor=t,this.assignCMYK(this.redColor,this.greenColor,this.blueColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"green",{get:function(){return this.g/t.maxColourChannelValue},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gray",{get:function(){return(this.redColor+this.greenColor+this.blueColor)/(3*t.maxColourChannelValue)},set:function(e){this.grayColor=e<0?0:e>1?1:e,this.r=this.grayColor*t.maxColourChannelValue,this.g=this.grayColor*t.maxColourChannelValue,this.b=this.grayColor*t.maxColourChannelValue,this.assignCMYK(this.redColor,this.greenColor,this.blueColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return!this.filled},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"a",{get:function(){return this.alpha},set:function(t){this.alpha=t<0?0:t,this.filled=!0},enumerable:!0,configurable:!0}),t.prototype.toString=function(t,e){if(this.isEmpty)return"";var i="";switch(t){case Wo.Rgb:i=this.rgbToString(e);break;case Wo.GrayScale:i=this.grayScaleToString(e);break;case Wo.Cmyk:i=this.cmykToString(e)}return i},t.prototype.grayScaleToString=function(e){var i=this.gray,r="",n=null;return null==(n=e?t.grayStringsSroke.containsKey(i)?t.grayStringsSroke.getValue(i):null:t.grayStringsFill.containsKey(i)?t.grayStringsFill.getValue(i):null)?e&&(r=i.toString()+" G",t.grayStringsSroke.setValue(i,r)):r=n.toString(),r+Zn.newLine},t.prototype.rgbToString=function(e){var i=this.r,r=this.g,n=this.b,o=(i<<16)+(r<<8)+n;e&&(o+=1<<24);var s="",a=null;if(t.rgbStrings.containsKey(o)&&(a=t.rgbStrings.getValue(o)),null==a){var l=i/t.maxColourChannelValue,h=r/t.maxColourChannelValue,u=n/t.maxColourChannelValue;s=e?l.toString()+" "+h.toString()+" "+u.toString()+" RG":l.toString()+" "+h.toString()+" "+u.toString()+" rg",t.rgbStrings.setValue(o,s)}else s=a.toString();return s+Zn.newLine},t.prototype.cmykToString=function(t){var e=this.c,i=this.m,r=this.y,n=this.b;return e.toString()+" "+i.toString()+" "+r.toString()+" "+n.toString()+" K"+Zn.newLine},t.prototype.toArray=function(t){var e=new ho;switch(t){case Wo.Rgb:e.add(new lo(this.red)),e.add(new lo(this.green)),e.add(new lo(this.blue))}return e},t.rgbStrings=new Xn,t.grayStringsSroke=new Xn,t.grayStringsFill=new Xn,t.maxColourChannelValue=255,t}(),Xo=function(){return function(t,e){void 0===t?(this.x=0,this.y=0):(this.x=null!==t?t:0,this.y=null!==e?e:0)}}(),Qo=function(){return function(t,e){void 0===e?(this.height=0,this.width=0):(this.height=null!==e?e:0,this.width=null!==t?t:0)}}(),Zo=function(){return function(t,e,i,r){if(typeof t==typeof t&&void 0===t)this.x=0,this.y=0,this.height=0,this.width=0;else if(t instanceof Xo&&e instanceof Qo&&void 0===i){var n=t;this.x=n.x,this.y=n.y;var o=e;this.height=o.height,this.width=o.width}else{var s=t,a=e,l=i,h=r;this.x=s,this.y=a,this.height=h,this.width=l}}}(),ts=function(){function t(t,e,i,r){this.left=t,this.top=e,this.right=i,this.bottom=r}return Object.defineProperty(t.prototype,"width",{get:function(){return this.right-this.left},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.bottom-this.top},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topLeft",{get:function(){return new Xo(this.left,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return new Qo(this.width,this.height)},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.topLeft+"x"+this.size},t}(),es=function(){function t(){}return t.prototype.clone=function(){return this},t}(),is=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rs=function(t){function e(e){var i=t.call(this)||this;return i.pdfColor=e,i}return is(e,t),Object.defineProperty(e.prototype,"color",{get:function(){return this.pdfColor},set:function(t){this.pdfColor=t},enumerable:!0,configurable:!0}),e.prototype.monitorChanges=function(t,e,i,r,n){if(null==e)throw new Error("ArgumentNullException:streamWriter");var o=!1;return o=!0,e.setColorAndSpace(this.pdfColor,n,!1),o},e.prototype.resetChanges=function(t){t.setColorAndSpace(new Jo(0,0,0),Wo.Rgb,!1)},e}(es);!function(t){t[t.Regular=0]="Regular",t[t.Bold=1]="Bold",t[t.Italic=2]="Italic",t[t.Underline=4]="Underline",t[t.Strikeout=8]="Strikeout"}($o||($o={}));var ns;!function(t){t[t.Helvetica=0]="Helvetica",t[t.Courier=1]="Courier",t[t.TimesRoman=2]="TimesRoman",t[t.Symbol=3]="Symbol",t[t.ZapfDingbats=4]="ZapfDingbats"}(ns||(ns={}));var os;!function(t){t[t.Standard=0]="Standard",t[t.TrueType=1]="TrueType",t[t.TrueTypeEmbedded=2]="TrueTypeEmbedded"}(os||(os={}));var ss;!function(t){t[t.None=0]="None",t[t.Word=1]="Word",t[t.WordOnly=2]="WordOnly",t[t.Character=3]="Character"}(ss||(ss={}));var as;!function(t){t[t.None=0]="None",t[t.SuperScript=1]="SuperScript",t[t.SubScript=2]="SubScript"}(as||(as={}));var ls;!function(t){t[t.Unknown=0]="Unknown",t[t.StandardEncoding=1]="StandardEncoding",t[t.MacRomanEncoding=2]="MacRomanEncoding",t[t.MacExpertEncoding=3]="MacExpertEncoding",t[t.WinAnsiEncoding=4]="WinAnsiEncoding",t[t.PdfDocEncoding=5]="PdfDocEncoding",t[t.IdentityH=6]="IdentityH"}(ls||(ls={}));var hs;!function(t){t[t.Apple=0]="Apple",t[t.Microsoft=4]="Microsoft",t[t.Trimmed=6]="Trimmed"}(hs||(hs={}));var us;!function(t){t[t.Unknown=0]="Unknown",t[t.Symbol=1]="Symbol",t[t.Unicode=2]="Unicode",t[t.Macintosh=3]="Macintosh"}(us||(us={}));var cs;!function(t){t[t.AppleUnicode=0]="AppleUnicode",t[t.Macintosh=1]="Macintosh",t[t.Iso=2]="Iso",t[t.Microsoft=3]="Microsoft"}(cs||(cs={}));var ps;!function(t){t[t.Undefined=0]="Undefined",t[t.Unicode=1]="Unicode"}(ps||(ps={}));var ds;!function(t){t[t.Roman=0]="Roman",t[t.Japanese=1]="Japanese",t[t.Chinese=2]="Chinese"}(ds||(ds={}));var fs;!function(t){t[t.FixedPitch=1]="FixedPitch",t[t.Serif=2]="Serif",t[t.Symbolic=4]="Symbolic",t[t.Script=8]="Script",t[t.Nonsymbolic=32]="Nonsymbolic",t[t.Italic=64]="Italic",t[t.ForceBold=262144]="ForceBold"}(fs||(fs={}));var gs;!function(t){t[t.Arg1And2AreWords=1]="Arg1And2AreWords",t[t.ArgsAreXyValues=2]="ArgsAreXyValues",t[t.RoundXyToGrid=4]="RoundXyToGrid",t[t.WeHaveScale=8]="WeHaveScale",t[t.Reserved=16]="Reserved",t[t.MoreComponents=32]="MoreComponents",t[t.WeHaveAnXyScale=64]="WeHaveAnXyScale",t[t.WeHaveTwoByTwo=128]="WeHaveTwoByTwo",t[t.WeHaveInstructions=256]="WeHaveInstructions",t[t.UseMyMetrics=512]="UseMyMetrics"}(gs||(gs={}));var ms,ys=function(){function t(t,e){this.scalingFactor=100,this.wordWrapType=ss.Word,this.internalLineLimit=!0,this.wordWrapType=ss.Word,void 0!==t&&"string"!=typeof t&&(this.textAlignment=t),void 0!==e&&(this.verticalAlignment=e)}return Object.defineProperty(t.prototype,"alignment",{get:function(){return this.textAlignment},set:function(t){this.textAlignment=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textDirection",{get:function(){return this.direction},set:function(t){this.direction=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineAlignment",{get:function(){return void 0===this.verticalAlignment||null==this.verticalAlignment?No.Top:this.verticalAlignment},set:function(t){this.verticalAlignment=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rightToLeft",{get:function(){return void 0!==this.isRightToLeft&&null!=this.isRightToLeft&&this.isRightToLeft},set:function(t){this.isRightToLeft=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"characterSpacing",{get:function(){return void 0===this.internalCharacterSpacing||null==this.internalCharacterSpacing?0:this.internalCharacterSpacing},set:function(t){this.internalCharacterSpacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wordSpacing",{get:function(){return void 0===this.internalWordSpacing||null==this.internalWordSpacing?0:this.internalWordSpacing},set:function(t){this.internalWordSpacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineSpacing",{get:function(){return void 0===this.leading||null==this.leading?0:this.leading},set:function(t){this.leading=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clipPath",{get:function(){return void 0!==this.clip&&null!=this.clip&&this.clip},set:function(t){this.clip=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subSuperScript",{get:function(){return void 0===this.pdfSubSuperScript||null==this.pdfSubSuperScript?as.None:this.pdfSubSuperScript},set:function(t){this.pdfSubSuperScript=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paragraphIndent",{get:function(){return void 0===this.internalParagraphIndent||null==this.internalParagraphIndent?0:this.internalParagraphIndent},set:function(t){this.internalParagraphIndent=t,this.firstLineIndent=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineLimit",{get:function(){return this.internalLineLimit},set:function(t){this.internalLineLimit=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"measureTrailingSpaces",{get:function(){return void 0!==this.trailingSpaces&&null!=this.trailingSpaces&&this.trailingSpaces},set:function(t){this.trailingSpaces=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"noClip",{get:function(){return void 0!==this.isNoClip&&null!=this.isNoClip&&this.isNoClip},set:function(t){this.isNoClip=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wordWrap",{get:function(){return this.wordWrapType},set:function(t){this.wordWrapType=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"horizontalScalingFactor",{get:function(){return this.scalingFactor},set:function(t){if(t<=0)throw new Error("ArgumentOutOfRangeException:The scaling factor cant be less of equal to zero, ScalingFactor");this.scalingFactor=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstLineIndent",{get:function(){return void 0===this.initialLineIndent||null==this.initialLineIndent?0:this.initialLineIndent},set:function(t){this.initialLineIndent=t},enumerable:!0,configurable:!0}),t.prototype.clone=function(){return this},t}(),bs=function(){function t(t){if(this.currentPosition=0,null==t)throw new Error("ArgumentNullException:text");this.text=t}return Object.defineProperty(t.prototype,"length",{get:function(){return this.text.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this.currentPosition===this.text.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.currentPosition},set:function(t){this.currentPosition=t},enumerable:!0,configurable:!0}),t.getCharsCount=function(t,e){if("string"==typeof e){if(null==t)throw new Error("ArgumentNullException:wholeText");for(var i=0,r=0;-1!==(r=t.indexOf(e,r));)i++,r++;return i}if(null==t)throw new Error("ArgumentNullException:text");if(null==e)throw new Error("ArgumentNullException:symbols");for(var n=0,o=0,s=t.length;o<s;o++){var a=t[o];this.contains(e,a)&&n++}return n},t.prototype.readLine=function(){for(var t=this.currentPosition;t<this.length;){var e=this.text[t];switch(e){case"\r":case"\n":var i=this.text.substr(this.currentPosition,t-this.currentPosition);return this.currentPosition=t+1,"\r"===e&&this.currentPosition<this.length&&"\n"===this.text[this.currentPosition]&&this.currentPosition++,i}t++}if(t>this.currentPosition){var r=this.text.substr(this.currentPosition,t-this.currentPosition);return this.currentPosition=t,r}return null},t.prototype.peekLine=function(){var t=this.currentPosition,e=this.readLine();return this.currentPosition=t,e},t.prototype.readWord=function(){for(var t=this.currentPosition;t<this.length;){var e=this.text[t];switch(e){case"\r":case"\n":var i=this.text.substr(this.currentPosition,t-this.currentPosition);return this.currentPosition=t+1,"\r"===e&&this.currentPosition<this.length&&"\n"===this.text[this.currentPosition]&&this.currentPosition++,i;case" ":case"\t":t===this.currentPosition&&t++;var r=this.text.substr(this.currentPosition,t-this.currentPosition);return this.currentPosition=t,r}t++}if(t>this.currentPosition){var n=this.text.substr(this.currentPosition,t-this.currentPosition);return this.currentPosition=t,n}return null},t.prototype.peekWord=function(){var t=this.currentPosition,e=this.readWord();return this.currentPosition=t,e},t.prototype.read=function(t){if(void 0===t){var e="0";return this.end||(e=this.text[this.currentPosition],this.currentPosition++),e}for(var i=0,r="";!this.end&&i<t;){r+=e=this.read(),i++}return r},t.prototype.peek=function(){var t="0";return this.end||(t=this.text[this.currentPosition]),t},t.prototype.close=function(){this.text=null},t.prototype.readToEnd=function(){var t;return t=0===this.currentPosition?this.text:this.text.substr(this.currentPosition,this.length-this.currentPosition),this.currentPosition=this.length,t},t.contains=function(t,e){for(var i=!1,r=0;r<t.length;r++)if(t[r]===e){i=!0;break}return i},t.whiteSpace=" ",t.tab="\t",t.spaces=[t.whiteSpace,t.tab],t.whiteSpacePattern="^[ \t]+$",t}(),vs=function(){function t(){this.isOverloadWithPosition=!1}return t.prototype.layout=function(t,e,i,r,n,o,s){if(r instanceof Zo){this.initialize(t,e,i,r,n),this.isOverloadWithPosition=o,this.clientSize=s;var a=this.doLayout();return this.clear(),a}this.initialize(t,e,i,r),this.isOverloadWithPosition=n,this.clientSize=o;a=this.doLayout();return this.clear(),a},t.prototype.initialize=function(t,e,i,r,n){if("number"==typeof n){if(null==t)throw new Error("ArgumentNullException:text");if(null==e)throw new Error("ArgumentNullException:font");this.text=t,this.font=e,this.format=i,this.size=new Qo(r.width,r.height),this.rectangle=r,this.pageHeight=n,this.reader=new bs(t)}else this.initialize(t,e,i,new Zo(new Xo(0,0),r),0)},t.prototype.clear=function(){this.font=null,this.format=null,this.reader.close(),this.reader=null,this.text=null},t.prototype.doLayout=function(){for(var t=new ws,e=new ws,i=[],r=this.reader.peekLine(),n=this.getLineIndent(!0);null!=r;){if(null!==(e=this.layoutLine(r,n))||void 0!==e){var o=0,s=this.copyToResult(t,e,i,o),a=s.success;if(o=s.numInserted,!a){this.reader.read(o);break}}this.reader.readLine(),r=this.reader.peekLine(),n=this.getLineIndent(!1)}return this.finalizeResult(t,i),t},t.prototype.getLineIndent=function(t){var e=0;return null!=this.format&&(e=t?this.format.firstLineIndent:this.format.paragraphIndent,e=this.size.width>0?Math.min(this.size.width,e):e),e},t.prototype.getLineHeight=function(){var t=this.font.height;return null!=this.format&&0!==this.format.lineSpacing&&(t=this.format.lineSpacing+this.font.height),t},t.prototype.getLineWidth=function(t){return this.font.getLineWidth(t,this.format)},t.prototype.layoutLine=function(t,e){var i=new ws;i.layoutLineHeight=this.getLineHeight();var r=[],n=this.size.width,o=this.getLineWidth(t)+e,s=ms.FirstParagraphLine,a=!0;if(n<=0||Math.round(o)<=Math.round(n))this.addToLineResult(i,r,t,o,ms.NewLineBreak|s);else{var l="",h="";o=e;var u=e,c=new bs(t),p=c.peekWord();for(p.length!==c.length&&" "===p&&(h+=p,l+=p,c.position+=1,p=c.peekWord());null!=p;){h+=p;var d=this.getLineWidth(h.toString())+u;if(" "===h.toString()&&(h="",d=0),d>n){if(this.getWrapType()===ss.None)break;if(h.length===p.length){if(this.getWrapType()===ss.WordOnly){i.textRemainder=t.substring(c.position);break}if(1===h.length){l+=p;break}a=!1,h="",p=c.peek().toString();continue}if(this.getLineWidth(p.toString())>n?this.format.wordWrap=ss.Character:void 0!==this.format&&null!==this.format&&(this.format.wordWrap=ss.Word),this.getWrapType()===ss.Character&&a)a=!1,h="",h+=l.toString(),p=c.peek().toString();else{" "!==(f=l.toString())&&this.addToLineResult(i,r,f,o,ms.LayoutBreak|s),this.isOverloadWithPosition&&(n=this.clientSize.width),h="",l="",o=0,u=0,d=0,s=ms.None,p=a?p:c.peekWord(),a=!0}}else l+=p,o=d,a?(c.readWord(),p=c.peekWord()):(c.read(),p=c.peek().toString())}if(l.length>0){var f=l.toString();this.addToLineResult(i,r,f,o,ms.NewLineBreak|ms.LastParagraphLine)}c.close()}i.layoutLines=[];for(var g=0;g<r.length;g++)i.layoutLines.push(r[g]);return r=[],i},t.prototype.addToLineResult=function(t,e,i,r,n){var o=new Ss;o.text=i,o.width=r,o.lineType=n,e.push(o);var s=t.actualSize;s.height+=this.getLineHeight(),s.width=Math.max(s.width,r),t.size=s},t.prototype.copyToResult=function(t,e,i,r){var n=!0,o=null!=this.format&&!this.format.lineLimit,s=t.actualSize.height,a=this.size.height;if(this.pageHeight>0&&a+this.rectangle.y>this.pageHeight&&(a=this.rectangle.y-this.pageHeight,a=Math.max(a,-a)),r=0,null!=e.lines)for(var l=0,h=e.lines.length;l<h;l++){var u=s+e.lineHeight;if(!(u<=a||a<=0||o)){n=!1;break}var c=e.lines[l];r+=c.text.length,c=this.trimLine(c,0===i.length),i.push(c);var p=t.actualSize;p.width=Math.max(p.width,c.width),t.size=p,s=u}if(s!=t.size.height){var d=t.actualSize;d.height=s,t.size=d}return{success:n,numInserted:r}},t.prototype.finalizeResult=function(t,e){t.layoutLines=[];for(var i=0;i<e.length;i++)t.layoutLines.push(e[i]);t.layoutLineHeight=this.getLineHeight(),this.reader.end||(t.textRemainder=this.reader.readToEnd()),e=[]},t.prototype.trimLine=function(t,e){var i=t.text,r=t.width;t.lineType,ms.FirstParagraphLine,null==this.format||this.format.rightToLeft;return(i=i.trim()).length!==t.text.length&&(r=this.getLineWidth(i),(t.lineType&ms.FirstParagraphLine)>0&&(r+=this.getLineIndent(e))),t.text=i,t.width=r,t},t.prototype.getWrapType=function(){return null!=this.format?this.format.wordWrap:ss.Word},t}(),ws=function(){function t(){}return Object.defineProperty(t.prototype,"remainder",{get:function(){return this.textRemainder},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actualSize",{get:function(){return void 0===this.size&&(this.size=new Qo(0,0)),this.size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lines",{get:function(){return this.layoutLines},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineHeight",{get:function(){return this.layoutLineHeight},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){return null==this.layoutLines||0===this.layoutLines.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineCount",{get:function(){return this.empty?0:this.layoutLines.length},enumerable:!0,configurable:!0}),t}(),Ss=function(){function t(){}return Object.defineProperty(t.prototype,"lineType",{get:function(){return this.type},set:function(t){this.type=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return this.content},set:function(t){this.content=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.lineWidth},set:function(t){this.lineWidth=t},enumerable:!0,configurable:!0}),t}();!function(t){t[t.None=0]="None",t[t.NewLineBreak=1]="NewLineBreak",t[t.LayoutBreak=2]="LayoutBreak",t[t.FirstParagraphLine=4]="FirstParagraphLine",t[t.LastParagraphLine=8]="LastParagraphLine"}(ms||(ms={}));var Ps,Cs=function(){function t(t,e){this.fontStyle=$o.Regular,"number"==typeof t&&void 0===e?this.fontSize=t:(this.fontSize=t,this.setStyle(e))}return Object.defineProperty(t.prototype,"name",{get:function(){return this.metrics.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.fontSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.metrics.getHeight(null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.fontStyle},set:function(t){this.fontStyle=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bold",{get:function(){return(this.style&$o.Bold)>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"italic",{get:function(){return(this.style&$o.Italic)>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"strikeout",{get:function(){return(this.style&$o.Strikeout)>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"underline",{get:function(){return(this.style&$o.Underline)>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"metrics",{get:function(){return this.fontMetrics},set:function(t){this.fontMetrics=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.pdfFontInternals},enumerable:!0,configurable:!0}),t.prototype.measureString=function(t,e,i,r,n){if("string"==typeof t&&void 0===e)return this.measureString(t,null);if("string"==typeof t&&(e instanceof ys||null==e)&&void 0===i&&void 0===r){var o=e;return this.measureString(t,o,0,0)}if("string"==typeof t&&(e instanceof ys||null==e)&&"number"==typeof i&&"number"==typeof r){o=e;return this.measureString(t,0,o,i,r)}if("string"==typeof t&&"number"==typeof e&&(i instanceof ys||null==i)&&"number"==typeof r&&"number"==typeof n){var s=new Qo(e,0),a=i;return this.measureString(t,s,a,r,n)}if(null==t)throw Error('ArgumentNullException("text")');o=e,a=i;var l=(new vs).layout(t,this,a,o,!1,new Qo(0,0));return r=t.length,n=l.empty?0:l.lines.length,l.actualSize},t.prototype.equalsTo=function(t){return this.equalsToFont(t)},t.prototype.getInternals=function(){return this.pdfFontInternals},t.prototype.setInternals=function(t){if(null==t)throw new Error("ArgumentNullException:internals");this.pdfFontInternals=t},t.prototype.setStyle=function(t){this.fontStyle=t},t.prototype.applyFormatSettings=function(t,e,i){var r=i;if(null!=e&&i>0&&(0!==e.characterSpacing&&(r+=(t.length-1)*e.characterSpacing),0!==e.wordSpacing)){var n=bs.spaces;r+=bs.getCharsCount(t,n)*e.wordSpacing}return r},t.charSizeMultiplier=.001,t.syncObject=new Object,t}(),xs=function(){function t(t){this.streamWriter=t}return Object.defineProperty(t.prototype,"document",{get:function(){return this.pdfDocument},set:function(t){this.pdfDocument=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.streamWriter.buffer.size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.streamWriter.buffer.size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stream",{get:function(){return this.streamWriter},enumerable:!0,configurable:!0}),t.prototype.write=function(t){var e=t;this.streamWriter.write(e)},t}();!function(t){t[t.None=0]="None",t[t.Registered=1]="Registered"}(Ps||(Ps={}));var Os,Bs=function(){function t(){this.objectCollections=[],this.mainObjectCollection=new Xn,this.primitiveObjectCollection=new Xn}return Object.defineProperty(t.prototype,"count",{get:function(){return this.objectCollections.length},enumerable:!0,configurable:!0}),t.prototype.items=function(t){return this.objectCollections[t]},Object.defineProperty(t.prototype,"outIsNew",{get:function(){return this.isNew},enumerable:!0,configurable:!0}),t.prototype.add=function(t){var e=new Ls(t);this.objectCollections.push(e),this.primitiveObjectCollection.containsKey(t)||this.primitiveObjectCollection.setValue(t,this.objectCollections.length-1),t.position=this.index=this.objectCollections.length-1,t.status=Ps.Registered},t.prototype.lookFor=function(t){var e=-1;if(-1!==t.position)return t.position;if(this.primitiveObjectCollection.containsKey(t)&&this.count===this.primitiveObjectCollection.size())e=this.primitiveObjectCollection.getValue(t);else for(var i=this.count-1;i>=0;i--){if(this.objectCollections[i].object===t){e=i;break}}return e},t.prototype.getReference=function(t,e){this.index=this.lookFor(t);this.isNew=!1;return{reference:this.objectCollections[this.index].reference,wasNew:e}},t.prototype.trySetReference=function(t,e,i){this.index=this.lookFor(t);return this.objectCollections[this.index].setReference(e),!0},t.prototype.destroy=function(){for(var t=0,e=this.objectCollections;t<e.length;t++){var i=e[t];void 0!==i&&(i.pdfObject.position=-1,i.pdfObject.isSaving=void 0,i.pdfObject.objectCollectionIndex=void 0,i.pdfObject.position=void 0)}this.objectCollections=[],this.mainObjectCollection=new Xn,this.primitiveObjectCollection=new Xn},t}(),Ls=function(){function t(t,e){this.pdfObject=t,this.pdfReference=e}return Object.defineProperty(t.prototype,"object",{get:function(){return this.pdfObject},set:function(t){this.pdfObject=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"reference",{get:function(){return this.pdfReference},enumerable:!0,configurable:!0}),t.prototype.setReference=function(t){this.pdfReference=t},t}(),Ts=function(){function t(t){this.isStreamCopied=!1,t instanceof bl&&(this.document=t)}return Object.defineProperty(t.prototype,"pdfObjects",{get:function(){return this.objects},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"crossTable",{get:function(){return this.pdfCrossTable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentSavingObj",{get:function(){return this.currentSavingObject},set:function(t){this.currentSavingObject=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"catalog",{get:function(){return this.pdfCatalog},set:function(t){this.pdfCatalog=t},enumerable:!0,configurable:!0}),t.prototype.setMainObjectCollection=function(t){this.objects=t},t.prototype.setCrossTable=function(t){this.pdfCrossTable=t},t.prototype.setCatalog=function(t){this.pdfCatalog=t},t.prototype.save=function(t){var e=this,i=new go(!0),r=new mo(i);if(void 0===t){var n=new go(!0),o=new mo(n);return new Promise(function(t,i){var r={};r.blobData=new Blob([e.document.docSave(o,!0)],{type:"application/pdf"}),t(r)})}this.document.docSave(r,t,!0)},t.prototype.clone=function(){return this.document},t}();!function(t){t[t.Free=0]="Free",t[t.Normal=1]="Normal",t[t.Packed=2]="Packed"}(Os||(Os={}));var Ms,Ds=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ks=function(t){function e(){var e=t.call(this)||this;return e.sections=null,e.tempDictionaryProperties=new to,e.items.setValue((new to).type,new Qn("Catalog")),e}return Ds(e,t),Object.defineProperty(e.prototype,"pages",{get:function(){return this.sections},set:function(t){t.element;this.sections=t,this.items.setValue(this.tempDictionaryProperties.pages,new jo(t))},enumerable:!0,configurable:!0}),e}(eo),Es=function(){function t(){this.objects=new Xn,this.maxGenNumIndex=0,this.objectCount=0,this.dictionaryProperties=new to}return Object.defineProperty(t.prototype,"isMerging",{get:function(){return this.merging},set:function(t){this.merging=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"trailer",{get:function(){return null==this.internalTrailer&&(this.internalTrailer=new Lo),this.internalTrailer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"document",{get:function(){return this.pdfDocument},set:function(t){this.pdfDocument=t,this.items=this.pdfDocument.pdfObjects},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pdfObjects",{get:function(){return this.items},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollection",{get:function(){return this.pdfDocument.pdfObjects},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.objectCount},set:function(t){this.objectCount=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextObjNumber",{get:function(){return this.count=this.count+1,this.count},enumerable:!0,configurable:!0}),t.prototype.save=function(t,e){this.saveHead(t),this.mappedReferences=null,this.objects.clear(),this.markTrailerReferences(),this.saveObjects(t);var i=this.count,r=t.position;this.registerObject(0,new Eo(0,-1),!0);t.write(Zn.xref),t.write(Zn.newLine),this.saveSections(t),this.saveTrailer(t,this.count,0),this.saveTheEndess(t,r),this.count=i;for(var n=0;n<this.objectCollection.count;++n){this.objectCollection.items(n).object.isSaving=!1}if(void 0===e)return t.stream.buffer;t.stream.save(e)},t.prototype.saveTheEndess=function(t,e){t.write(Zn.newLine+Zn.startxref+Zn.newLine),t.write(e.toString()+Zn.newLine),t.write(Zn.eof+Zn.newLine)},t.prototype.saveTrailer=function(t,e,i){t.write(Zn.trailer+Zn.newLine);var r=this.trailer;r.items.setValue(this.dictionaryProperties.size,new lo(this.objectCount+1)),(r=new eo(r)).setEncrypt(!1),r.save(t)},t.prototype.saveSections=function(t){var e=0,i=0;do{i=this.prepareSubsection(e),this.saveSubsection(t,e,i),e+=i}while(0!==i)},t.prototype.saveSubsection=function(t,e,i){if(!(i<=0||e>=this.count)){t.write(e+" "+(i+1)+Zn.newLine);for(var r=e;r<=e+i;++r){var n=this.objects.getValue(r),o="";o=n.type===Os.Free?this.getItem(n.offset,65535,!0):this.getItem(n.offset,n.generation,!1),t.write(o)}}},t.prototype.getItem=function(t,e,i){var r="",n=10-t.toString().length;e<=0&&(e=0);for(var o=5-e.toString().length<=0?0:5-e.toString().length,s=0;s<n;s++)r+="0";r=r+t.toString()+" ";for(s=0;s<o;s++)r+="0";return r=r+e.toString()+" ",r=r+(i?Zn.f:Zn.n)+Zn.newLine},t.prototype.prepareSubsection=function(t){for(var e,i=0,r=this.count,n=0;n<this.document.pdfObjects.count;n++)this.document.pdfObjects.items(n).reference.toString().split(" ");if(t>=r)return i;for(e=t;e<r;++e)break;for(t=e;e<r;++e)++i;return i},t.prototype.markTrailerReferences=function(){this.trailer.items.keys(),this.trailer.items.values()},t.prototype.saveHead=function(t){var e=this.generateFileVersion(t.document);t.write("%PDF-"+e),t.write(Zn.newLine)},t.prototype.generateFileVersion=function(t){return"1."+4..toString()},t.prototype.getReference=function(t,e){if(void 0===e){return this.getReference(t,!1)}return this.getSubReference(t,e)},t.prototype.getSubReference=function(t,e){var i,r=!1,n=null;if(this.items.count>0&&t.objectCollectionIndex>0&&this.items.count>t.objectCollectionIndex-1){var o=this.document.pdfObjects.getReference(t,i);n=o.reference,i=o.wasNew}if(i=null==n&&t.status!==Ps.Registered,null==n){var s=this.nextObjNumber;n=new Eo(s,0);if(i){this.document.pdfObjects.add(t),this.document.pdfObjects.trySetReference(t,n,void 0);var a=this.document.pdfObjects.count-1,l=this.document.pdfObjects.objectCollections[a].reference.objNumber,h=this.document.pdfObjects.objectCollections[this.document.pdfObjects.count-1];this.document.pdfObjects.mainObjectCollection.setValue(l,h),t.position=-1}else this.document.pdfObjects.trySetReference(t,n,void 0);t.objectCollectionIndex=n.objNumber,t.status=Ps.None,r=!0}return r||this.bForceNew,n},t.prototype.saveObjects=function(t){for(var e=this.objectCollection,i=0;i<e.count;++i){var r=e.items(i).object;r.isSaving=!0,this.saveIndirectObject(r,t)}},t.prototype.saveIndirectObject=function(t,e){var i=this.getReference(t);t instanceof ks&&this.trailer.items.setValue(this.dictionaryProperties.root,i),this.pdfDocument.currentSavingObj=i;t.getArchive(),this.registerObject(e.position,i),this.doSaveObject(t,i,e)},t.prototype.doSaveObject=function(t,e,i){i.length;i.write(e.objNumber.toString()),i.write(Zn.whiteSpace),i.write(e.genNumber.toString()),i.write(Zn.whiteSpace),i.write(Zn.obj),i.write(Zn.newLine),t.save(i);i.stream;i.write(Zn.endObj),i.write(Zn.newLine)},t.prototype.registerObject=function(t,e,i){"boolean"==typeof i?(this.objects.setValue(e.objNumber,new js(t,e,i)),this.maxGenNumIndex=Math.max(this.maxGenNumIndex,e.genNumber)):void 0===i&&(this.objects.setValue(e.objNumber,new js(t,e)),this.maxGenNumIndex=Math.max(this.maxGenNumIndex,e.genNumber))},t.dereference=function(t){return null!=t&&(t=t.object),t},t}(),js=function(){function t(t,e,i){var r=t;this.offsetNumber=r;var n=e;this.generation=n.genNumber,this.object=n.objNumber,this.type=void 0===i?Os.Normal:Os.Free}return Object.defineProperty(t.prototype,"objectNumber",{get:function(){return this.object},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"offset",{get:function(){return this.offsetNumber},enumerable:!0,configurable:!0}),t}(),Is=function(){function t(){}return t.letter=new Qo(612,792),t.note=new Qo(540,720),t.legal=new Qo(612,1008),t.a0=new Qo(2380,3368),t.a1=new Qo(1684,2380),t.a2=new Qo(1190,1684),t.a3=new Qo(842,1190),t.a4=new Qo(595,842),t.a5=new Qo(421,595),t.a6=new Qo(297,421),t.a7=new Qo(210,297),t.a8=new Qo(148,210),t.a9=new Qo(105,148),t.a10=new Qo(74,105),t.b0=new Qo(2836,4008),t.b1=new Qo(2004,2836),t.b2=new Qo(1418,2004),t.b3=new Qo(1002,1418),t.b4=new Qo(709,1002),t.b5=new Qo(501,709),t.archE=new Qo(2592,3456),t.archD=new Qo(1728,2592),t.archC=new Qo(1296,1728),t.archB=new Qo(864,1296),t.archA=new Qo(648,864),t.flsa=new Qo(612,936),t.halfLetter=new Qo(396,612),t.letter11x17=new Qo(792,1224),t.ledger=new Qo(1224,792),t}();!function(t){t[t.Portrait=0]="Portrait",t[t.Landscape=1]="Landscape"}(Ms||(Ms={}));var Rs;!function(t){t[t.RotateAngle0=0]="RotateAngle0",t[t.RotateAngle90=1]="RotateAngle90",t[t.RotateAngle180=2]="RotateAngle180",t[t.RotateAngle270=3]="RotateAngle270"}(Rs||(Rs={}));var As;!function(t){t[t.None=0]="None",t[t.Numeric=1]="Numeric",t[t.LowerLatin=2]="LowerLatin",t[t.LowerRoman=3]="LowerRoman",t[t.UpperLatin=4]="UpperLatin",t[t.UpperRoman=5]="UpperRoman"}(As||(As={}));var Ns;!function(t){t[t.None=0]="None",t[t.Bottom=1]="Bottom",t[t.Top=2]="Top",t[t.Left=3]="Left",t[t.Right=4]="Right",t[t.Fill=5]="Fill"}(Ns||(Ns={}));var Fs;!function(t){t[t.None=0]="None",t[t.TopLeft=1]="TopLeft",t[t.TopCenter=2]="TopCenter",t[t.TopRight=3]="TopRight",t[t.MiddleLeft=4]="MiddleLeft",t[t.MiddleCenter=5]="MiddleCenter",t[t.MiddleRight=6]="MiddleRight",t[t.BottomLeft=7]="BottomLeft",t[t.BottomCenter=8]="BottomCenter",t[t.BottomRight=9]="BottomRight"}(Fs||(Fs={}));var Vs;!function(t){t[t.None=0]="None",t[t.Top=1]="Top",t[t.Bottom=2]="Bottom",t[t.Left=3]="Left",t[t.Right=4]="Right"}(Vs||(Vs={}));var zs,Gs=function(){function t(){this.pdfMargin=40,this.setMargins(this.pdfMargin)}return Object.defineProperty(t.prototype,"left",{get:function(){return this.leftMargin},set:function(t){this.leftMargin=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.topMargin},set:function(t){this.topMargin=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.rightMargin},set:function(t){this.rightMargin=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.bottomMargin},set:function(t){this.bottomMargin=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"all",{set:function(t){this.setMargins(t)},enumerable:!0,configurable:!0}),t.prototype.setMargins=function(t,e,i,r){void 0===e?this.leftMargin=this.topMargin=this.rightMargin=this.bottomMargin=t:void 0===i?(this.leftMargin=this.rightMargin=t,this.bottomMargin=this.topMargin=e):(this.leftMargin=t,this.topMargin=e,this.rightMargin=i,this.bottomMargin=r)},t.prototype.clone=function(){return this},t}(),_s=function(){function t(t){this.pageMargins=new Gs,this.pageSize=Is.a4,this.rotateAngle=Rs.RotateAngle0,this.pageOrientation=Ms.Portrait,this.pageOrigin=new Xo(0,0),this.isRotation=!1,"number"==typeof t&&this.pageMargins.setMargins(t)}return Object.defineProperty(t.prototype,"size",{get:function(){return this.pageSize},set:function(t){this.setSize(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orientation",{get:function(){return this.pageOrientation},set:function(t){this.pageOrientation!==t&&(this.pageOrientation=t,this.updateSize(t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"margins",{get:function(){return this.pageMargins},set:function(t){this.pageMargins=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.pageSize.width},set:function(t){this.pageSize.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.pageSize.height},set:function(t){this.pageSize.height=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"origin",{get:function(){return this.pageOrigin},set:function(t){this.pageOrigin=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rotate",{get:function(){return this.rotateAngle},set:function(t){this.rotateAngle=t,this.isRotation=!0},enumerable:!0,configurable:!0}),t.prototype.updateSize=function(t){var e=Math.min(this.pageSize.width,this.pageSize.height),i=Math.max(this.pageSize.width,this.pageSize.height);switch(t){case Ms.Portrait:this.pageSize=new Qo(e,i);break;case Ms.Landscape:this.pageSize=new Qo(i,e)}},t.prototype.clone=function(){return this.pageMargins=this.pageMargins.clone(),this},t.prototype.getActualSize=function(){var t=this.width-(this.margins.left+this.margins.right),e=this.height-(this.margins.top+this.margins.bottom);return new Qo(t,e)},t.prototype.setSize=function(t){var e=Math.min(t.width,t.height),i=Math.max(t.width,t.height);this.orientation===Ms.Portrait?this.pageSize=new Qo(e,i):this.pageSize=new Qo(i,e)},t}(),Hs=function(){function t(t){if(null==t)throw new Error("ArgumentNullException:stream");this.stream=t}return t.prototype.clear=function(){this.stream.clearStream()},t.prototype.setGraphicsState=function(t){t instanceof Qn?(this.stream.write(t.toString()),this.stream.write(Zn.whiteSpace),this.writeOperator(Zn.setGraphicsState)):(this.stream.write(Zn.slash),this.stream.write(t),this.stream.write(Zn.whiteSpace),this.writeOperator(Zn.setGraphicsState))},t.prototype.executeObject=function(t){this.stream.write(t.toString()),this.stream.write(Zn.whiteSpace),this.writeOperator(Zn.paintXObject),this.stream.write(Zn.newLine)},t.prototype.closePath=function(){this.writeOperator(Zn.closePath)},t.prototype.clipPath=function(t){this.stream.write(Zn.clipPath),t&&this.stream.write(Zn.evenOdd),this.stream.write(Zn.whiteSpace),this.stream.write(Zn.endPath),this.stream.write(Zn.newLine)},t.prototype.closeFillStrokePath=function(t){this.stream.write(Zn.closeFillStrokePath),t?(this.stream.write(Zn.evenOdd),this.stream.write(Zn.newLine)):this.stream.write(Zn.newLine)},t.prototype.fillStrokePath=function(t){this.stream.write(Zn.fillStroke),t?(this.stream.write(Zn.evenOdd),this.stream.write(Zn.newLine)):this.stream.write(Zn.newLine)},t.prototype.fillPath=function(t){this.stream.write(Zn.fill),t?(this.stream.write(Zn.evenOdd),this.stream.write(Zn.newLine)):this.stream.write(Zn.newLine)},t.prototype.endPath=function(){this.writeOperator(Zn.n)},t.prototype.closeFillPath=function(t){this.writeOperator(Zn.closePath),this.stream.write(Zn.fill),t?(this.stream.write(Zn.evenOdd),this.stream.write(Zn.newLine)):this.stream.write(Zn.newLine)},t.prototype.closeStrokePath=function(){this.writeOperator(Zn.closeStrokePath)},t.prototype.setTextScaling=function(t){this.stream.write(lo.floatToString(t)),this.stream.write(Zn.whiteSpace),this.writeOperator(Zn.setTextScaling)},t.prototype.strokePath=function(){this.writeOperator(Zn.stroke)},t.prototype.restoreGraphicsState=function(){this.writeOperator(Zn.restoreState)},t.prototype.saveGraphicsState=function(){this.writeOperator(Zn.saveState)},t.prototype.startNextLine=function(t,e){void 0===t?this.writeOperator(Zn.goToNextLine):t instanceof Xo?(this.writePoint(t),this.writeOperator(Zn.setCoords)):(this.writePoint(t,e),this.writeOperator(Zn.setCoords))},t.prototype.showText=function(t){this.checkTextParam(t),this.writeText(t),this.writeOperator(Zn.setText)},t.prototype.setLeading=function(t){this.stream.write(lo.floatToString(t)),this.stream.write(Zn.whiteSpace),this.writeOperator(Zn.setTextLeading)},t.prototype.beginPath=function(t,e){this.writePoint(t,e),this.writeOperator(Zn.beginPath)},t.prototype.beginText=function(){this.writeOperator(Zn.beginText)},t.prototype.endText=function(){this.writeOperator(Zn.endText)},t.prototype.appendRectangle=function(t,e,i,r){t instanceof Zo?this.appendRectangle(t.x,t.y,t.width,t.height):(this.writePoint(t,e),this.writePoint(i,r),this.writeOperator(Zn.appendRectangle))},t.prototype.appendLineSegment=function(t,e){t instanceof Xo?this.appendLineSegment(t.x,t.y):(this.writePoint(t,e),this.writeOperator(Zn.appendLineSegment))},t.prototype.setTextRenderingMode=function(t){this.stream.write(t.toString()),this.stream.write(Zn.whiteSpace),this.writeOperator(Zn.setRenderingMode)},t.prototype.setCharacterSpacing=function(t){this.stream.write(lo.floatToString(t)),this.stream.write(Zn.whiteSpace),this.stream.write(Zn.setCharacterSpace),this.stream.write(Zn.newLine)},t.prototype.setWordSpacing=function(t){this.stream.write(lo.floatToString(t)),this.stream.write(Zn.whiteSpace),this.writeOperator(Zn.setWordSpace)},t.prototype.showNextLineText=function(t,e){t instanceof ko?(this.checkTextParam(t),this.writeText(t),this.writeOperator(Zn.setTextOnNewLine)):(this.checkTextParam(t),this.writeText(t,e),this.writeOperator(Zn.setTextOnNewLine))},t.prototype.setColorSpace=function(t,e){if(t instanceof Qn&&"boolean"==typeof e){var i=t,r=(n=e)?Zn.selectcolorspaceforstroking:Zn.selectcolorspacefornonstroking;this.stream.write(i.toString()),this.stream.write(Zn.whiteSpace),this.stream.write(r),this.stream.write(Zn.newLine)}else{i=t;var n=e;this.setColorSpace(new Qn(i),n)}},t.prototype.modifyCtm=function(t){if(null==t)throw new Error("ArgumentNullException:matrix");this.stream.write(t.toString()),this.stream.write(Zn.whiteSpace),this.writeOperator(Zn.modifyCtm)},t.prototype.setFont=function(t,e,i){if("string"==typeof e)this.setFont(t,new Qn(e),i);else{if(null==t)throw new Error("ArgumentNullException:font");this.stream.write(e.toString()),this.stream.write(Zn.whiteSpace),this.stream.write(lo.floatToString(i)),this.stream.write(Zn.whiteSpace),this.writeOperator(Zn.setFont)}},t.prototype.writeOperator=function(t){this.stream.write(t),this.stream.write(Zn.newLine)},t.prototype.checkTextParam=function(t){if(null==t)throw new Error("ArgumentNullException:text");if("string"==typeof t&&""===t)throw new Error("ArgumentException:The text can not be an empty string, text")},t.prototype.writeText=function(t,e){if(t instanceof ko&&void 0===e)this.stream.write(t.pdfEncode());else{var i=void 0,r=void 0;e?(i=ko.hexStringMark[0],r=ko.hexStringMark[1]):(i=ko.stringMark[0],r=ko.stringMark[1]),this.stream.write(i),this.stream.write(t),this.stream.write(r)}},t.prototype.writePoint=function(t,e){if(t instanceof Xo&&void 0===e)this.writePoint(t.x,t.y);else{var i=t;this.stream.write(lo.floatToString(i)),this.stream.write(Zn.whiteSpace),e=this.updateY(e),this.stream.write(lo.floatToString(e)),this.stream.write(Zn.whiteSpace)}},t.prototype.updateY=function(t){return-t},t.prototype.write=function(t){var e="";e+=t,e+=Zn.newLine,this.writeOperator(e)},t.prototype.writeComment=function(t){if(!(null!=t&&t.length>0))throw new Error("Invalid comment");var e="";e+=Zn.comment,e+=Zn.whiteSpace,e+=t,this.writeOperator(e)},t.prototype.setColorAndSpace=function(t,e,i){t.isEmpty||(this.stream.write(t.toString(e,i)),this.stream.write(Zn.newLine))},t.prototype.setLineDashPattern=function(t,e){this.setLineDashPatternHelper(t,e)},t.prototype.setLineDashPatternHelper=function(t,e){var i="[";if(t.length>1)for(var r=0;r<t.length;r++)r===t.length-1?i+=t[r].toString():i+=t[r].toString()+" ";i+="] ",i+=e.toString(),i+=" "+Zn.setDashPattern,this.stream.write(i),this.stream.write(Zn.newLine)},t.prototype.setMiterLimit=function(t){this.stream.write(lo.floatToString(t)),this.stream.write(Zn.whiteSpace),this.writeOperator(Zn.setMiterLimit)},t.prototype.setLineWidth=function(t){this.stream.write(lo.floatToString(t)),this.stream.write(Zn.whiteSpace),this.writeOperator(Zn.setLineWidth)},t.prototype.setLineCap=function(t){this.stream.write(t.toString()),this.stream.write(Zn.whiteSpace),this.writeOperator(Zn.setLineCapStyle)},t.prototype.setLineJoin=function(t){this.stream.write(t.toString()),this.stream.write(Zn.whiteSpace),this.writeOperator(Zn.setLineJoinStyle)},Object.defineProperty(t.prototype,"position",{get:function(){return this.stream.position},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){var t=0;if(0!==this.stream.data.length&&-1!==this.stream.data.length)for(var e=0;e<this.stream.data.length;e++)t+=this.stream.data[e].length;return t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"document",{get:function(){return null},enumerable:!0,configurable:!0}),t.prototype.appendBezierSegment=function(t,e,i,r,n,o){t instanceof Xo&&e instanceof Xo&&i instanceof Xo?(this.writePoint(t.x,t.y),this.writePoint(e.x,e.y),this.writePoint(i.x,i.y)):(this.writePoint(t,e),this.writePoint(i,r),this.writePoint(n,o)),this.writeOperator(Zn.appendbeziercurve)},t.prototype.setColourWithPattern=function(t,e,i){if(null!=t){var r=t.length,n=0;for(n=0;n<r;++n)this.stream.write(t[n].toString()),this.stream.write(Zn.whiteSpace)}null!=e&&(this.stream.write(e.toString()),this.stream.write(Zn.whiteSpace)),i?this.writeOperator(Zn.setColorAndPatternStroking):this.writeOperator(Zn.setColorAndPattern)},t}(),Ws=function(){function t(t,e){this.pdfColor=new Jo(0,0,0),this.dashOffsetValue=0,this.penDashPattern=[0],this.pdfDashStyle=_o.Solid,this.pdfLineCap=0,this.pdfLineJoin=0,this.penWidth=1,this.internalMiterLimit=0,this.colorSpace=Wo.Rgb,t instanceof es?this.setBrush(t):t instanceof Jo&&(this.color=t),"number"==typeof e&&(this.width=e)}return Object.defineProperty(t.prototype,"color",{get:function(){return this.pdfColor},set:function(t){this.pdfColor=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dashOffset",{get:function(){return void 0===this.dashOffsetValue||null==this.dashOffsetValue?0:this.dashOffsetValue},set:function(t){this.dashOffsetValue=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dashPattern",{get:function(){return this.penDashPattern},set:function(t){this.penDashPattern=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dashStyle",{get:function(){return this.pdfDashStyle},set:function(t){if(this.pdfDashStyle!==t)switch(this.pdfDashStyle=t,this.pdfDashStyle){case _o.Custom:break;case _o.Dash:this.penDashPattern=[3,1];break;case _o.Dot:this.penDashPattern=[1,1];break;case _o.DashDot:this.penDashPattern=[3,1,1,1];break;case _o.DashDotDot:this.penDashPattern=[3,1,1,1,1,1];break;case _o.Solid:break;default:this.pdfDashStyle=_o.Solid,this.penDashPattern=[0]}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineCap",{get:function(){return this.pdfLineCap},set:function(t){this.pdfLineCap=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineJoin",{get:function(){return this.pdfLineJoin},set:function(t){this.pdfLineJoin=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"miterLimit",{get:function(){return this.internalMiterLimit},set:function(t){this.internalMiterLimit=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.penWidth},set:function(t){this.penWidth=t},enumerable:!0,configurable:!0}),t.prototype.clone=function(){return this},t.prototype.setBrush=function(t){var e=t;null!=e&&e instanceof rs&&(this.color=e.color,this.pdfBrush=e),this.color=e.color,this.pdfBrush=e},t.prototype.monitorChanges=function(t,e,i,r,n,o){r=!0,this.dashControl(t,r,e),e.setLineWidth(this.width),e.setLineJoin(this.lineJoin),e.setLineCap(this.lineCap);var s=this.miterLimit;s>0&&e.setMiterLimit(s);this.pdfBrush;return e.setColorAndSpace(this.color,n,!0),!0},t.prototype.dashControl=function(t,e,i){e=!0;var r=this.width,n=this.getPattern();return i.setLineDashPattern(n,this.dashOffset*r),e},t.prototype.getPattern=function(){for(var t=this.dashPattern,e=0;e<t.length;++e)t[e]*=this.width;return t},t}(),Us=function(){function t(t){this.radDegFactor=180/Math.PI,this.transformationMatrix=new qs(1,0,0,void 0===t?1:-1,0,0)}return Object.defineProperty(t.prototype,"matrix",{get:function(){return this.transformationMatrix},set:function(t){this.transformationMatrix=t},enumerable:!0,configurable:!0}),t.prototype.translate=function(t,e){this.transformationMatrix.translate(t,e)},t.prototype.scale=function(t,e){this.transformationMatrix.elements[0]=t,this.transformationMatrix.elements[3]=e},t.prototype.rotate=function(t){t=t*Math.PI/180,this.transformationMatrix.elements[0]=Math.cos(t),this.transformationMatrix.elements[1]=Math.sin(t),this.transformationMatrix.elements[2]=-Math.sin(t),this.transformationMatrix.elements[3]=Math.cos(t)},t.prototype.toString=function(){for(var t="",e=0,i=this.transformationMatrix.elements.length;e<i;e++){this.matrix.elements[e];t+=lo.floatToString(this.transformationMatrix.elements[e]),t+=" "}return t},t.prototype.multiply=function(t){this.transformationMatrix.multiply(t.matrix)},t.degreesToRadians=function(t){return this.degRadFactor*t},t.prototype.radiansToDegrees=function(t){return this.radDegFactor*t},t.prototype.clone=function(){return this},t.degRadFactor=Math.PI/180,t}(),qs=function(){function t(t,e,i,r,n,o){void 0===t?this.metrixElements=[]:"number"==typeof t?(this.metrixElements=[],this.metrixElements.push(t),this.metrixElements.push(e),this.metrixElements.push(i),this.metrixElements.push(r),this.metrixElements.push(n),this.metrixElements.push(o)):this.metrixElements=t}return Object.defineProperty(t.prototype,"elements",{get:function(){return this.metrixElements},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"offsetX",{get:function(){return this.metrixElements[4]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"offsetY",{get:function(){return this.metrixElements[5]},enumerable:!0,configurable:!0}),t.prototype.translate=function(t,e){this.metrixElements[4]=t,this.metrixElements[5]=e},t.prototype.transform=function(t){var e=t.x,i=t.y,r=e*this.elements[0]+i*this.elements[2]+this.offsetX,n=e*this.elements[1]+i*this.elements[3]+this.offsetY;return new Xo(r,n)},t.prototype.multiply=function(t){var e=[];e.push(this.elements[0]*t.elements[0]+this.elements[1]*t.elements[2]),e[1]=this.elements[0]*t.elements[1]+this.elements[1]*t.elements[3],e[2]=this.elements[2]*t.elements[0]+this.elements[3]*t.elements[2],e[3]=this.elements[2]*t.elements[1]+this.elements[3]*t.elements[3],e[4]=this.offsetX*t.elements[0]+this.offsetY*t.elements[2]+t.offsetX,e[5]=this.offsetX*t.elements[1]+this.offsetY*t.elements[3]+t.offsetY;for(var i=0;i<e.length;i++)this.elements[i]=e[i]},t.prototype.dispose=function(){this.metrixElements=null},t.prototype.clone=function(){return new t(this.metrixElements)},t}(),Ks=function(){return function(){this.pdf="PDF",this.text="Text",this.imageB="ImageB",this.imageC="ImageC",this.imageI="ImageI"}}(),Ys=function(){function t(){this.mKeys=[],this.mValues=[]}return t.prototype.size=function(){return this.mKeys.length},t.prototype.add=function(t,e){if(void 0===t||null===t||void 0===e||null===e)throw new ReferenceError("Provided key or value is not valid.");if(this.mKeys.indexOf(t)<0)return this.mKeys.push(t),this.mValues.push(e),1;throw new RangeError("An item with the same key has already been added.")},t.prototype.keys=function(){return this.mKeys},t.prototype.values=function(){return this.mValues},t.prototype.getValue=function(t){if(void 0===t||null===t)throw new ReferenceError("Provided key is not valid.");var e=this.mKeys.indexOf(t);if(e<0)throw new RangeError("No item with the specified key has been added.");return this.mValues[e]},t.prototype.setValue=function(t,e){if(void 0===t||null===t)throw new ReferenceError("Provided key is not valid.");var i=this.mKeys.indexOf(t);i<0?(this.mKeys.push(t),this.mValues.push(e)):this.mValues[i]=e},t.prototype.remove=function(t){if(void 0===t||null===t)throw new ReferenceError("Provided key is not valid.");var e=this.mKeys.indexOf(t);if(e<0)throw new RangeError("No item with the specified key has been added.");return this.mKeys.splice(e,1),this.mValues.splice(e,1),!0},t.prototype.containsKey=function(t){if(void 0===t||null===t)throw new ReferenceError("Provided key is not valid.");return!(this.mKeys.indexOf(t)<0)},t.prototype.clear=function(){this.mKeys=[],this.mValues=[]},t}(),$s=function(){function t(t,e,i){this.dictionary=new eo,this.dictionaryProperties=new to,this.dictionary.items.setValue(this.dictionaryProperties.CA,new lo(t)),this.dictionary.items.setValue(this.dictionaryProperties.ca,new lo(e)),this.dictionary.items.setValue(this.dictionaryProperties.BM,new Qn(i.toString()))}return Object.defineProperty(t.prototype,"element",{get:function(){return this.dictionary},enumerable:!0,configurable:!0}),t}(),Js=function(){function t(){this.automaticFieldsInformation=[]}return Object.defineProperty(t.prototype,"automaticFields",{get:function(){return this.automaticFieldsInformation},enumerable:!0,configurable:!0}),t.prototype.add=function(t){return this.automaticFields.push(t)},t}(),Xs=function(){function t(){}return t.prototype.drawHelper=function(t,e,i){var r=0!==e||0!==i,n=null;r&&(n=t.save(),t.translateTransform(e,i)),this.drawInternal(t),r&&t.restore(n)},t}(),Qs=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Zs=function(t){function e(){var e=t.call(this)||this;return e.internalBounds=new Zo(0,0,0,0),e.internalTemplateSize=new Qo(0,0),e}return Qs(e,t),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.internalBounds},set:function(t){this.internalBounds=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return new Qo(this.bounds.width,this.bounds.height)},set:function(t){this.bounds.width=t.width,this.bounds.height=t.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"location",{get:function(){return new Xo(this.bounds.x,this.bounds.y)},set:function(t){this.bounds.x=t.x,this.bounds.y=t.y},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"font",{get:function(){return this.internalFont},set:function(t){this.internalFont=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"brush",{get:function(){return this.internalBrush},set:function(t){this.internalBrush=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pen",{get:function(){return this.internalPen},set:function(t){this.internalPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stringFormat",{get:function(){return this.internalStringFormat},set:function(t){this.internalStringFormat=t},enumerable:!0,configurable:!0}),e.prototype.performDrawHelper=function(t,e,i,r){if(0===this.bounds.height||0===this.bounds.width){var n=this.getValue(t);this.internalTemplateSize=this.getFont().measureString(n,this.size,this.stringFormat)}},e.prototype.draw=function(t,e,i){if(void 0===e){var r=new Xo(0,0);this.draw(t,r)}else if(e instanceof Xo)this.draw(t,e.x,e.y);else{this.drawHelper(t,e,i);var n=new ta(this,new Xo(e,i));t.automaticFields.add(n)}},e.prototype.getSize=function(){return 0===this.bounds.height||0===this.bounds.width?this.internalTemplateSize:this.size},e.prototype.drawInternal=function(t){},e.prototype.getBrush=function(){return void 0===this.internalBrush||null==this.internalBrush?new rs(new Jo(0,0,0)):this.internalBrush},e.prototype.getFont=function(){return void 0===this.internalFont||null==this.internalFont?bl.defaultFont:this.internalFont},e.prototype.getPageFromGraphics=function(t){if(void 0!==t.page&&null!==t.page){return t.page}return t.currentPage},e}(Xs),ta=function(){function t(e,i,r,n){this.pageNumberFieldLocation=new Xo,this.pageNumberField=null,this.scaleX=1,this.scaleY=1,void 0===i&&e instanceof t?(this.pageNumberField=e.field,this.pageNumberFieldLocation=e.location,this.scaleX=e.scalingX,this.scaleY=e.scalingY):void 0===r&&i instanceof Xo&&e instanceof Zs?(this.pageNumberField=e,this.pageNumberFieldLocation=i):(this.pageNumberField=e,this.pageNumberFieldLocation=i,this.scaleX=r,this.scaleY=n)}return Object.defineProperty(t.prototype,"location",{get:function(){return this.pageNumberFieldLocation},set:function(t){this.pageNumberFieldLocation=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"field",{get:function(){return this.pageNumberField},set:function(t){this.pageNumberField=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scalingX",{get:function(){return this.scaleX},set:function(t){this.scaleX=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scalingY",{get:function(){return this.scaleY},set:function(t){this.scaleY=t},enumerable:!0,configurable:!0}),t}(),ea=function(){function t(t){this.mPosition=0,this.buffer=new Uint8Array(t),this.dataView=new DataView(this.buffer.buffer)}return Object.defineProperty(t.prototype,"position",{get:function(){return this.mPosition},set:function(t){this.mPosition=t},enumerable:!0,configurable:!0}),t.prototype.read=function(t,e,i){for(var r=e;r<i;r++){var n=this.position;t.buffer[r]=this.readByte(n),this.position++}},t.prototype.getBuffer=function(t){return this.buffer[t]},t.prototype.writeFromBase64String=function(t){var e=this.encodedString(t);this.buffer=e},t.prototype.encodedString=function(t){var e,i,r,n,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,l=0,h=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;t.charAt(t.length-1)===s.charAt(64)&&h--;for(var u=new Uint8Array(0|h);a<t.length;)e=s.indexOf(t.charAt(a++))<<2|(n=s.indexOf(t.charAt(a++)))>>4,i=(15&n)<<4|(o=s.indexOf(t.charAt(a++)))>>2,r=(3&o)<<6|s.indexOf(t.charAt(a++)),u[l++]=e,u[l++]=i,u[l++]=r;return u},t.prototype.readByte=function(t){return this.buffer[t]},Object.defineProperty(t.prototype,"internalBuffer",{get:function(){return this.buffer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.buffer.byteLength},enumerable:!0,configurable:!0}),t.prototype.readNextTwoBytes=function(t){var e=t.readByte(this.position);return this.position++,e<<=8,e|=t.readByte(this.position),this.position++,e},t}(),ia=function(){function t(t){this.currentPosition=-1,this.value=t}return Object.defineProperty(t.prototype,"status",{get:function(){return this.objectStatus},set:function(t){this.objectStatus=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.saving},set:function(t){this.saving=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index},set:function(t){this.index=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.currentPosition},set:function(t){this.currentPosition=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return null},enumerable:!0,configurable:!0}),t.prototype.save=function(t){t.write(this.boolToStr(this.value))},t.prototype.clone=function(e){return new t(this.value)},t.prototype.boolToStr=function(t){return t?"true":"false"},t}();!function(t){t[t.Unknown=0]="Unknown",t[t.Bmp=1]="Bmp",t[t.Emf=2]="Emf",t[t.Gif=3]="Gif",t[t.Jpeg=4]="Jpeg",t[t.Png=5]="Png",t[t.Wmf=6]="Wmf",t[t.Icon=7]="Icon"}(zs||(zs={}));var ra,na=function(){function t(t){this.sof1Marker=193,this.sof2Marker=194,this.sof3Marker=195,this.sof5Marker=197,this.sof6Marker=198,this.sof7Marker=199,this.sof9Marker=201,this.sof10Marker=202,this.sof11Marker=203,this.sof13Marker=205,this.sof14Marker=206,this.sof15Marker=207,this.mFormat=zs.Unknown,this.mbitsPerComponent=8,this.dictionaryProperties=new to,this.mStream=t,this.initialize()}return Object.defineProperty(t.prototype,"height",{get:function(){return this.mHeight},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.mWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bitsPerComponent",{get:function(){return this.mbitsPerComponent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.mImageData.count},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageData",{get:function(){return this.mImageData},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageDataAsNumberArray",{get:function(){return this.mImageData.internalBuffer.buffer},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){this.mFormat===zs.Unknown&&this.checkIfJpeg()&&(this.mFormat=zs.Jpeg,this.parseJpegImage()),this.reset(),this.mImageData=new ea(this.mStream.count),this.mStream.read(this.mImageData,0,this.mImageData.count)},t.prototype.reset=function(){this.mStream.position=0},t.prototype.parseJpegImage=function(){this.reset();var t=new ea(this.mStream.count);this.mStream.read(t,0,t.count);for(var e=4,i=!1,r=256*t.getBuffer(e)+t.getBuffer(e+1);e<t.count;){if(!((e+=r)<t.count)){i=!0;break}if(192===t.getBuffer(e+1))return this.mHeight=256*t.getBuffer(e+5)+t.getBuffer(e+6),void(this.mWidth=256*t.getBuffer(e+7)+t.getBuffer(e+8));e+=2,r=256*t.getBuffer(e)+t.getBuffer(e+1)}i&&(this.mStream.position=0,this.skip(this.mStream,2),this.readExceededJPGImage(this.mStream))},Object.defineProperty(t.prototype,"format",{get:function(){return this.mFormat},enumerable:!0,configurable:!0}),t.prototype.checkIfJpeg=function(){this.reset();for(var e=0;e<t.mJpegHeader.length;e++){if(t.mJpegHeader[e]!==this.mStream.readByte(e))return!1;this.mStream.position++}return!0},t.prototype.getImageDictionary=function(){if(this.mFormat===zs.Jpeg){this.imageData.internalBuffer.length;this.imageStream=new Lo,this.imageStream.isImage=!0;for(var t="",e="",i=0;i<this.imageDataAsNumberArray.byteLength;i++)t+=String.fromCharCode(null,this.mStream.readByte(i));for(i=0;i<t.length;i++)i%2!=0&&(e+=t[i]);return this.imageStream.data=[e],this.imageStream.compress=!1,this.imageStream.items.setValue(this.dictionaryProperties.type,new Qn(this.dictionaryProperties.xObject)),this.imageStream.items.setValue(this.dictionaryProperties.subtype,new Qn(this.dictionaryProperties.image)),this.imageStream.items.setValue(this.dictionaryProperties.width,new lo(this.width)),this.imageStream.items.setValue(this.dictionaryProperties.height,new lo(this.height)),this.imageStream.items.setValue(this.dictionaryProperties.bitsPerComponent,new lo(this.bitsPerComponent)),this.imageStream.items.setValue(this.dictionaryProperties.filter,new Qn(this.dictionaryProperties.dctdecode)),this.imageStream.items.setValue(this.dictionaryProperties.colorSpace,new Qn(this.getColorSpace())),this.imageStream.items.setValue(this.dictionaryProperties.decodeParms,this.getDecodeParams()),this.imageStream}return this.imageStream},t.prototype.getColorSpace=function(){return this.dictionaryProperties.deviceRgb},t.prototype.getDecodeParams=function(){var t=new eo;return t.items.setValue(this.dictionaryProperties.columns,new lo(this.width)),t.items.setValue(this.dictionaryProperties.blackIs1,new ia(!0)),t.items.setValue(this.dictionaryProperties.k,new lo(-1)),t.items.setValue(this.dictionaryProperties.predictor,new lo(15)),t.items.setValue(this.dictionaryProperties.bitsPerComponent,new lo(this.bitsPerComponent)),t},t.prototype.readExceededJPGImage=function(t){this.mStream=t;for(var e=!0;e;){switch(this.getMarker(t)){case this.sof1Marker:case this.sof2Marker:case this.sof3Marker:case this.sof5Marker:case this.sof6Marker:case this.sof7Marker:case this.sof9Marker:case this.sof10Marker:case this.sof11Marker:case this.sof13Marker:case this.sof14Marker:case this.sof15Marker:t.position+=3,this.mHeight=this.mStream.readNextTwoBytes(t),this.mWidth=this.mStream.readNextTwoBytes(t),e=!1;break;default:this.skipStream(t)}}},t.prototype.skip=function(t,e){this.mStream=t;var i=new ea(e);this.mStream.read(i,0,i.count)},t.prototype.getMarker=function(t){var e=32;for(e=t.readByte(this.mStream.position),t.position++;255!==e;)e=t.readByte(this.mStream.position),t.position++;do{e=t.readByte(this.mStream.position),t.position++}while(255===e);return e},t.prototype.skipStream=function(t){var e=this.mStream.readNextTwoBytes(t)-2;e>0&&(t.position+=e)},t.mPngHeader=[137,80,78,71,13,10,26,10],t.mJpegHeader=[255,216],t.GIF_HEADER="G,I,F,8",t.BMP_HEADER="B,M",t}(),oa=function(){function t(t){this.updateProportionsHelper(t)}return t.prototype.convertUnits=function(t,e,i){return this.convertFromPixels(this.convertToPixels(t,e),i)},t.prototype.convertToPixels=function(t,e){var i=e;return t*this.proportions[i]},t.prototype.convertFromPixels=function(t,e){var i=e;return t/this.proportions[i]},t.prototype.updateProportionsHelper=function(t){this.proportions=[t/2.54,t/6,1,t/72,t,t/300,t/25.4]},t.horizontalResolution=96,t.verticalResolution=96,t}(),sa=function(){function t(){}return Object.defineProperty(t.prototype,"width",{get:function(){return this.imageWidth},set:function(t){this.imageWidth=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.imageHeight},set:function(t){this.imageHeight=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{set:function(t){this.width=t.width,this.height=t.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"physicalDimension",{get:function(){return this.imagePhysicalDimension=this.getPointSize(this.width,this.height,this.horizontalResolution,this.verticalResolution),new Qo(this.width,this.height)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.imageStream},enumerable:!0,configurable:!0}),t.prototype.getPointSize=function(t,e,i,r){if(void 0===i){var n=oa.horizontalResolution,o=oa.verticalResolution;return this.getPointSize(t,e,n,o)}var s=new oa(i),a=new oa(r),l=s.convertUnits(t,qo.Pixel,qo.Point),h=a.convertUnits(e,qo.Pixel,qo.Point);return new Qo(l,h)},t}(),aa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),la=function(t){function e(e){var i=t.call(this)||this;return i.imageStatus=!0,i.dictionaryProperties=new to,i.loadImage(e),i}return aa(e,t),e.prototype.loadImage=function(t){this.initializeAsync(t)},e.prototype.initializeAsync=function(t){var e=new ea(t.length);e.writeFromBase64String(t),this.decoder=new na(e),this.height=this.decoder.height,this.width=this.decoder.width,this.bitsPerComponent=this.decoder.bitsPerComponent},e.prototype.save=function(){this.imageStatus=!0,this.imageStream=this.decoder.getImageDictionary()},e}(sa),ha=function(){function t(){}return Object.defineProperty(t.prototype,"empty",{get:function(){return this.offset===this.length&&this.length===this.checksum&&0===this.checksum},enumerable:!0,configurable:!0}),t}(),ua=function(){return function(){}}(),ca=function(){return function(){}}(),pa=function(){return function(){}}(),da=function(){function t(){}return Object.defineProperty(t.prototype,"isItalic",{get:function(){return 0!=(2&this.macStyle)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isBold",{get:function(){return 0!=(1&this.macStyle)},enumerable:!0,configurable:!0}),t}(),fa=function(){return function(){}}(),ga=function(){return function(){}}(),ma=function(){return function(){}}(),ya=function(){return function(){}}(),ba=function(){return function(){}}(),va=function(){return function(){}}(),wa=function(){function t(){}return Object.defineProperty(t.prototype,"empty",{get:function(){return this.index===this.width&&this.width===this.charCode&&0===this.charCode},enumerable:!0,configurable:!0}),t.prototype.compareTo=function(t){var e=t;return this.index-e.index},t}(),Sa=function(){return function(){}}(),Pa=function(){return function(){}}(),Ca=function(){return function(){}}(),xa=function(){return function(){}}(),Oa=function(){return function(){}}(),Ba=function(){function t(t){this.int32Size=4,this.int16Size=2,this.int64Size=8,this.bufferLength=t,this.buffer=[]}return Object.defineProperty(t.prototype,"data",{get:function(){if(this.buffer.length<this.bufferLength)for(var t=this.bufferLength-this.buffer.length,e=0;e<t;e++)this.buffer.push(0);return this.buffer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return void 0!==this.internalPosition&&null!==this.internalPosition||(this.internalPosition=0),this.internalPosition},enumerable:!0,configurable:!0}),t.prototype.writeShort=function(t){var e=[(65280&t)>>8,255&t];this.flush(e)},t.prototype.writeInt=function(t){var e=[(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t];this.flush(e)},t.prototype.writeUInt=function(t){var e=[(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t];this.flush(e)},t.prototype.writeString=function(t){if(null==t)throw new Error("Argument Null Exception : value");for(var e=[],i=0;i<t.length;i++)e.push(t.charCodeAt(i));this.flush(e)},t.prototype.writeBytes=function(t){this.flush(t)},t.prototype.flush=function(t){if(null===t)throw new Error("Argument Null Exception : buff");for(var e=this.position,i=0;i<t.length;i++)this.buffer[e]=t[i],e++;this.internalPosition+=t.length},t}(),La=function(){function t(t){this.int32Size=4,this.isTtcFont=!1,this.isMacTtf=!1,this.metricsName="",this.isMacTTF=!1,this.missedGlyphs=0,this.tableNames=["cvt ","fpgm","glyf","head","hhea","hmtx","loca","maxp","prep"],this.entrySelectors=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4],this.fontData=t,this.initialize()}return Object.defineProperty(t.prototype,"macintosh",{get:function(){return null!==this.macintoshDictionary&&void 0!==this.macintoshDictionary||(this.macintoshDictionary=new Xn),this.macintoshDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"microsoft",{get:function(){return null!==this.microsoftDictionary&&void 0!==this.microsoftDictionary||(this.microsoftDictionary=new Xn),this.microsoftDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"macintoshGlyphs",{get:function(){return null!==this.internalMacintoshGlyphs&&void 0!==this.internalMacintoshGlyphs||(this.internalMacintoshGlyphs=new Xn),this.internalMacintoshGlyphs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"microsoftGlyphs",{get:function(){return null!==this.internalMicrosoftGlyphs&&void 0!==this.internalMicrosoftGlyphs||(this.internalMicrosoftGlyphs=new Xn),this.internalMicrosoftGlyphs},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){void 0===this.metrics&&(this.metrics=new da),this.readFontDictionary();var t=this.readNameTable(),e=this.readHeadTable();this.initializeFontName(t),this.metrics.macStyle=e.macStyle},t.prototype.readFontDictionary=function(){this.offset=0;this.checkPreambula();var t=this.readInt16(this.offset);this.readInt16(this.offset),this.readInt16(this.offset),this.readInt16(this.offset);void 0===this.tableDirectory&&(this.tableDirectory=new Xn);for(var e=0;e<t;++e){var i=new ha,r=this.readString(this.int32Size);i.checksum=this.readInt32(this.offset),i.offset=this.readInt32(this.offset),i.length=this.readInt32(this.offset),this.tableDirectory.setValue(r,i)}this.lowestPosition=this.offset,this.isTtcFont||this.fixOffsets()},t.prototype.fixOffsets=function(){for(var t=Number.MAX_VALUE,e=this.tableDirectory.keys(),i=0;i<e.length;i++){var r=(s=this.tableDirectory.getValue(e[i])).offset;if(t>r&&(t=r)<=this.lowestPosition)break}var n=t-this.lowestPosition;if(0!==n){var o=new Xn;for(i=0;i<e.length;i++){var s;(s=this.tableDirectory.getValue(e[i])).offset-=n,o.setValue(e[i],s)}this.tableDirectory=o}},t.prototype.checkPreambula=function(){var t=this.readInt32(this.offset);if(this.isMacTtf=1953658213===t,65536!==t&&1953658213!==t&&1330926671!==t){this.isTtcFont=!0,this.offset=0;if("ttcf"!==this.readString(4))throw new Error("Can not read TTF font data");this.offset+=4;if(this.readInt32(this.offset)<0)throw new Error("Can not read TTF font data");this.offset=this.readInt32(this.offset),t=this.readInt32(this.offset)}return t},t.prototype.readNameTable=function(){var t=this.getTable("name");this.offset=t.offset;var e=new ua;e.formatSelector=this.readUInt16(this.offset),e.recordsCount=this.readUInt16(this.offset),e.offset=this.readUInt16(this.offset),e.nameRecords=[];for(var i=this.offset,r=0;r<e.recordsCount;r++){this.offset=i;var n=new ca;n.platformID=this.readUInt16(this.offset),n.encodingID=this.readUInt16(this.offset),n.languageID=this.readUInt16(this.offset),n.nameID=this.readUInt16(this.offset),n.length=this.readUInt16(this.offset),n.offset=this.readUInt16(this.offset),this.offset=t.offset+e.offset+n.offset;var o=0===n.platformID||3===n.platformID;n.name=this.readString(n.length,o),e.nameRecords[r]=n,i+=12}return e},t.prototype.readHeadTable=function(){var t=this.getTable("head");this.offset=t.offset;var e=new pa;return e.version=this.readFixed(this.offset),e.fontRevision=this.readFixed(this.offset),e.checkSumAdjustment=this.readUInt32(this.offset),e.magicNumber=this.readUInt32(this.offset),e.flags=this.readUInt16(this.offset),e.unitsPerEm=this.readUInt16(this.offset),e.created=this.readInt64(this.offset),e.modified=this.readInt64(this.offset),e.xMin=this.readInt16(this.offset),e.yMin=this.readInt16(this.offset),e.xMax=this.readInt16(this.offset),e.yMax=this.readInt16(this.offset),e.macStyle=this.readUInt16(this.offset),e.lowestReadableSize=this.readUInt16(this.offset),e.fontDirectionHint=this.readInt16(this.offset),e.indexToLocalFormat=this.readInt16(this.offset),e.glyphDataFormat=this.readInt16(this.offset),e},t.prototype.readHorizontalHeaderTable=function(){var t=this.getTable("hhea");this.offset=t.offset;var e=new fa;return e.version=this.readFixed(this.offset),e.ascender=this.readInt16(this.offset),e.descender=this.readInt16(this.offset),e.lineGap=this.readInt16(this.offset),e.advanceWidthMax=this.readUInt16(this.offset),e.minLeftSideBearing=this.readInt16(this.offset),e.minRightSideBearing=this.readInt16(this.offset),e.xMaxExtent=this.readInt16(this.offset),e.caretSlopeRise=this.readInt16(this.offset),e.caretSlopeRun=this.readInt16(this.offset),this.offset+=10,e.metricDataFormat=this.readInt16(this.offset),e.numberOfHMetrics=this.readUInt16(this.offset),e},t.prototype.readOS2Table=function(){var t=this.getTable("OS/2");this.offset=t.offset;var e=new ga;return e.version=this.readUInt16(this.offset),e.xAvgCharWidth=this.readInt16(this.offset),e.usWeightClass=this.readUInt16(this.offset),e.usWidthClass=this.readUInt16(this.offset),e.fsType=this.readInt16(this.offset),e.ySubscriptXSize=this.readInt16(this.offset),e.ySubscriptYSize=this.readInt16(this.offset),e.ySubscriptXOffset=this.readInt16(this.offset),e.ySubscriptYOffset=this.readInt16(this.offset),e.ySuperscriptXSize=this.readInt16(this.offset),e.ySuperscriptYSize=this.readInt16(this.offset),e.ySuperscriptXOffset=this.readInt16(this.offset),e.ySuperscriptYOffset=this.readInt16(this.offset),e.yStrikeoutSize=this.readInt16(this.offset),e.yStrikeoutPosition=this.readInt16(this.offset),e.sFamilyClass=this.readInt16(this.offset),e.panose=this.readBytes(10),e.ulUnicodeRange1=this.readUInt32(this.offset),e.ulUnicodeRange2=this.readUInt32(this.offset),e.ulUnicodeRange3=this.readUInt32(this.offset),e.ulUnicodeRange4=this.readUInt32(this.offset),e.vendorIdentifier=this.readBytes(4),e.fsSelection=this.readUInt16(this.offset),e.usFirstCharIndex=this.readUInt16(this.offset),e.usLastCharIndex=this.readUInt16(this.offset),e.sTypoAscender=this.readInt16(this.offset),e.sTypoDescender=this.readInt16(this.offset),e.sTypoLineGap=this.readInt16(this.offset),e.usWinAscent=this.readUInt16(this.offset),e.usWinDescent=this.readUInt16(this.offset),e.ulCodePageRange1=this.readUInt32(this.offset),e.ulCodePageRange2=this.readUInt32(this.offset),e.version>1?(e.sxHeight=this.readInt16(this.offset),e.sCapHeight=this.readInt16(this.offset),e.usDefaultChar=this.readUInt16(this.offset),e.usBreakChar=this.readUInt16(this.offset),e.usMaxContext=this.readUInt16(this.offset)):(e.sxHeight=0,e.sCapHeight=0,e.usDefaultChar=0,e.usBreakChar=0,e.usMaxContext=0),e},t.prototype.readPostTable=function(){var t=this.getTable("post");this.offset=t.offset;var e=new ma;return e.formatType=this.readFixed(this.offset),e.italicAngle=this.readFixed(this.offset),e.underlinePosition=this.readInt16(this.offset),e.underlineThickness=this.readInt16(this.offset),e.isFixedPitch=this.readUInt32(this.offset),e.minType42=this.readUInt32(this.offset),e.maxType42=this.readUInt32(this.offset),e.minType1=this.readUInt32(this.offset),e.maxType1=this.readUInt32(this.offset),e},t.prototype.readWidthTable=function(t,e){var i=this.getTable("hmtx");this.offset=i.offset;for(var r=[],n=0;n<t;n++){var o=new ya;o.advanceWidth=this.readUInt16(this.offset),o.lsb=this.readInt16(this.offset);var s=1e3*o.advanceWidth/e;r.push(Math.floor(s))}return r},t.prototype.readCmapTable=function(){var t=this.getTable("cmap");this.offset=t.offset;var e=new va;e.version=this.readUInt16(this.offset),e.tablesCount=this.readUInt16(this.offset);for(var i=this.offset,r=[],n=0;n<e.tablesCount;n++){this.offset=i;var o=new ba;o.platformID=this.readUInt16(this.offset),o.encodingID=this.readUInt16(this.offset),o.offset=this.readUInt32(this.offset),i=this.offset,this.readCmapSubTable(o),r[n]=o}return r},t.prototype.readCmapSubTable=function(t){var e=this.getTable("cmap");this.offset=e.offset+t.offset;var i=this.readUInt16(this.offset),r=this.getCmapEncoding(t.platformID,t.encodingID);r===us.Macintosh?cs.Macintosh:cs.Microsoft;if(r!==us.Unknown)switch(i){case hs.Apple:this.readAppleCmapTable(t,r);break;case hs.Microsoft:this.readMicrosoftCmapTable(t,r);break;case hs.Trimmed:this.readTrimmedCmapTable(t,r)}},t.prototype.readAppleCmapTable=function(t,e){var i=this.getTable("cmap");this.offset=i.offset+t.offset;var r=new Pa;r.format=this.readUInt16(this.offset),r.length=this.readUInt16(this.offset),r.version=this.readUInt16(this.offset),null!==this.maxMacIndex&&void 0!==this.maxMacIndex||(this.maxMacIndex=0);for(var n=0;n<256;++n){var o=new wa;o.index=this.readByte(this.offset),o.width=this.getWidth(o.index),o.charCode=n,this.macintosh.setValue(n,o),this.addGlyph(o,e),this.maxMacIndex=Math.max(n,this.maxMacIndex)}},t.prototype.readMicrosoftCmapTable=function(t,e){var i=this.getTable("cmap");this.offset=i.offset+t.offset;var r=e===us.Unicode?this.microsoft:this.macintosh,n=new Ca;n.format=this.readUInt16(this.offset),n.length=this.readUInt16(this.offset),n.version=this.readUInt16(this.offset),n.segCountX2=this.readUInt16(this.offset),n.searchRange=this.readUInt16(this.offset),n.entrySelector=this.readUInt16(this.offset),n.rangeShift=this.readUInt16(this.offset);var o=n.segCountX2/2;n.endCount=this.readUshortArray(o),n.reservedPad=this.readUInt16(this.offset),n.startCount=this.readUshortArray(o),n.idDelta=this.readUshortArray(o),n.idRangeOffset=this.readUshortArray(o);var s=n.length/2-8-4*o;n.glyphID=this.readUshortArray(s);for(var a=0,l=0,h=0;h<o;h++)for(var u=n.startCount[h];u<=n.endCount[h]&&65535!==u;u++){if(0===n.idRangeOffset[h])a=u+n.idDelta[h]&65535;else{if((l=h+n.idRangeOffset[h]/2-o+u-n.startCount[h])>=n.glyphID.length)continue;a=n.glyphID[l]+n.idDelta[h]&65535}var c=new wa;c.index=a,c.width=this.getWidth(c.index);var p=e===us.Symbol&&61440==(65280&u)?255&u:u;c.charCode=p,r.setValue(p,c),this.addGlyph(c,e)}},t.prototype.readTrimmedCmapTable=function(t,e){var i=this.getTable("cmap");this.offset=i.offset+t.offset;var r=new xa;r.format=this.readUInt16(this.offset),r.length=this.readUInt16(this.offset),r.version=this.readUInt16(this.offset),r.firstCode=this.readUInt16(this.offset),r.entryCount=this.readUInt16(this.offset);for(var n=0;n<r.entryCount;++n){var o=new wa;o.index=this.readUInt16(this.offset),o.width=this.getWidth(o.index),o.charCode=n+r.firstCode,this.macintosh.setValue(n,o),this.addGlyph(o,e),this.maxMacIndex=Math.max(n,this.maxMacIndex)}},t.prototype.initializeFontName=function(t){for(var e=0;e<t.recordsCount;e++){var i=t.nameRecords[e];if(1===i.nameID?this.metrics.fontFamily=i.name:6===i.nameID&&(this.metrics.postScriptName=i.name),null!==this.metrics.fontFamily&&void 0!==this.metrics.fontFamily&&null!==this.metrics.postScriptName&&void 0!==this.metrics.postScriptName)break}},t.prototype.getTable=function(t){var e,i=new ha;return this.tableDirectory.containsKey(t)&&(e=this.tableDirectory.getValue(t)),null!==e&&void 0!==e&&(i=e),i},t.prototype.getWidth=function(t){return t=t<this.width.length?t:this.width.length-1,this.width[t]},t.prototype.getCmapEncoding=function(t,e){var i=us.Unknown;return t==cs.Microsoft&&e==ps.Undefined?i=us.Symbol:t==cs.Microsoft&&e==ps.Unicode?i=us.Unicode:t==cs.Macintosh&&e==ds.Roman&&(i=us.Macintosh),i},t.prototype.addGlyph=function(t,e){var i=null;switch(e){case us.Unicode:i=this.microsoftGlyphs;break;case us.Macintosh:case us.Symbol:i=this.macintoshGlyphs}i.setValue(t.index,t)},t.prototype.initializeMetrics=function(t,e,i,r,n,o){this.initializeFontName(t);for(var s=!1,a=0;a<o.length;a++){var l=o[a];if(this.getCmapEncoding(l.platformID,l.encodingID)===us.Symbol){s=!0;break}}this.metrics.isSymbol=s,this.metrics.macStyle=e.macStyle,this.metrics.isFixedPitch=0!==n.isFixedPitch,this.metrics.italicAngle=n.italicAngle;var h=1e3/e.unitsPerEm;this.metrics.winAscent=r.sTypoAscender*h,this.metrics.macAscent=i.ascender*h,this.metrics.capHeight=0!==r.sCapHeight?r.sCapHeight:.7*e.unitsPerEm*h,this.metrics.winDescent=r.sTypoDescender*h,this.metrics.macDescent=i.descender*h,this.metrics.leading=(r.sTypoAscender-r.sTypoDescender+r.sTypoLineGap)*h,this.metrics.lineGap=Math.ceil(i.lineGap*h);var u=e.xMin*h,c=Math.ceil(this.metrics.macAscent+this.metrics.lineGap),p=e.xMax*h,d=this.metrics.macDescent;this.metrics.fontBox=new ts(u,c,p,d),this.metrics.stemV=80,this.metrics.widthTable=this.updateWidth(),this.metrics.contains=this.tableDirectory.containsKey("CFF"),this.metrics.subScriptSizeFactor=e.unitsPerEm/r.ySubscriptYSize,this.metrics.superscriptSizeFactor=e.unitsPerEm/r.ySuperscriptYSize},t.prototype.updateWidth=function(){var t=[];if(this.metrics.isSymbol)for(var e=0;e<256;e++){var i=this.getGlyph(String.fromCharCode(e));t[e]=i.empty?0:i.width}else{var r=[],n=String.fromCharCode(32);for(e=0;e<256;e++){r[0]=e;var o=this.getString(r,0,r.length),s=o.length>0?o[0]:"?";(i=this.getGlyph(s)).empty?(i=this.getGlyph(n),t[e]=i.empty?0:i.width):t[e]=i.width}}return t},t.prototype.getDefaultGlyph=function(){return this.getGlyph(bs.whiteSpace)},t.prototype.getString=function(t,e,i){for(var r="",n=0;n<i;n++)r+=String.fromCharCode(t[n+e]);return r},t.prototype.readLocaTable=function(t){var e=this.getTable("loca");this.offset=e.offset;var i=new Sa,r=null;if(t){var n=e.length/2;r=[];for(var o=0;o<n;o++)r[o]=2*this.readUInt16(this.offset)}else{n=e.length/4;r=[];for(o=0;o<n;o++)r[o]=this.readUInt32(this.offset)}return i.offsets=r,i},t.prototype.updateGlyphChars=function(t,e){t.containsKey(0)||t.setValue(0,0);for(var i=new Xn,r=t.keys(),n=0;n<r.length;n++)i.setValue(r[n],t.getValue(r[n]));for(n=0;n<r.length;n++){var o=r[n];this.processCompositeGlyph(t,o,e)}},t.prototype.processCompositeGlyph=function(t,e,i){if(e<i.offsets.length-1){var r=i.offsets[e];if(r!==i.offsets[e+1]){var n=this.getTable("glyf");this.offset=n.offset+r;var o=new Oa;if(o.numberOfContours=this.readInt16(this.offset),o.xMin=this.readInt16(this.offset),o.yMin=this.readInt16(this.offset),o.xMax=this.readInt16(this.offset),o.yMax=this.readInt16(this.offset),o.numberOfContours<0)for(var s=0;;){var a=this.readUInt16(this.offset),l=this.readUInt16(this.offset);if(t.containsKey(l)||t.setValue(l,0),0==(a&gs.MoreComponents))break;s=0!=(a&gs.Arg1And2AreWords)?4:2,0!=(a&gs.WeHaveScale)?s+=2:0!=(a&gs.WeHaveAnXyScale)?s+=4:0!=(a&gs.WeHaveTwoByTwo)&&(s+=8),this.offset+=s}}}},t.prototype.generateGlyphTable=function(t,e,i,r){i=[];var n=t.keys();n.sort(function(t,e){return t-e});for(var o=0,s=0;s<n.length;s++){var a=n[s];e.offsets.length>0&&(o+=e.offsets[a+1]-e.offsets[a])}var l=this.align(o);r=[];for(s=0;s<l;s++)r.push(0);var h=0,u=0,c=this.getTable("glyf");for(s=0;s<e.offsets.length;s++)if(i.push(h),u<n.length&&n[u]===s){++u,i[s]=h;var p=e.offsets[s],d=e.offsets[s+1]-p;if(d>0){this.offset=c.offset+p;r=this.read(r,h,d).buffer,h+=d}}return{glyphTableSize:o,newLocaTable:i,newGlyphTable:r}},t.prototype.updateLocaTable=function(t,e,i){if(null===t)throw new Error("Argument Null Exception : newLocaTable");for(var r=e?2*t.length:4*t.length,n=this.align(r),o=new Ba(n),s=0;s<t.length;s++){var a=t[s];e?(a/=2,o.writeShort(a)):o.writeInt(a)}return{newLocaUpdated:o.data,newLocaSize:r}},t.prototype.align=function(t){return t+3&-4},t.prototype.getFontProgram=function(t,e,i,r){if(null===t)throw new Error("Argument Null Exception : newLocaTableOut");if(null===e)throw new Error("Argument Null Exception : newGlyphTable");this.tableNames;var n=this.getFontProgramLength(t,e,0),o=n.fontProgramLength,s=n.numTables,a=new Ba(o);a.writeInt(65536),a.writeShort(s);var l=this.entrySelectors[s];return a.writeShort(16*(1<<(31&l))),a.writeShort(l),a.writeShort(16*(s-(1<<(31&l)))),this.writeCheckSums(a,s,t,e,i,r),this.writeGlyphs(a,t,e),a.data},t.prototype.getFontProgramLength=function(t,e,i){if(null===t)throw new Error("Argument Null Exception : newLocaTableOut");if(null===e)throw new Error("Argument Null Exception : newGlyphTable");i=2;for(var r=this.tableNames,n=0,o=0;o<r.length;o++){var s=r[o];if("glyf"!==s&&"loca"!==s){var a=this.getTable(s);a.empty||(++i,n+=this.align(a.length))}}n+=t.length,n+=e.length;return n+=16*i+12,{fontProgramLength:n,numTables:i}},t.prototype.writeCheckSums=function(t,e,i,r,n,o){if(null===t)throw new Error("Argument Null Exception : writer");if(null===i)throw new Error("Argument Null Exception : newLocaTableOut");if(null===r)throw new Error("Argument Null Exception : newGlyphTable");for(var s=this.tableNames,a=16*e+12,l=0,h=0;h<s.length;h++){var u=s[h],c=this.getTable(u);if(!c.empty){if(t.writeString(u),"glyf"===u){var p=this.calculateCheckSum(r);t.writeInt(p),l=n}else if("loca"===u){p=this.calculateCheckSum(i);t.writeInt(p),l=o}else t.writeInt(c.checksum),l=c.length;t.writeUInt(a),t.writeUInt(l),a+=this.align(l)}}},t.prototype.calculateCheckSum=function(t){if(null===t)throw new Error("Argument Null Exception : bytes");for(var e=0,i=0,r=0,n=0,o=0,s=0;s<(t.length+1)/4;s++)o+=255&t[e++],n+=255&t[e++],r+=255&t[e++],i+=255&t[e++];var a=i;return a+=r<<8,a+=n<<16,a+=o<<24},t.prototype.writeGlyphs=function(t,e,i){if(null===t)throw new Error("Argument Null Exception : writer");if(null===e)throw new Error("Argument Null Exception : newLocaTableOut");if(null===i)throw new Error("Argument Null Exception : newGlyphTable");for(var r=this.tableNames,n=0;n<r.length;n++){var o=r[n],s=this.getTable(o);if(!s.empty)if("glyf"===o)t.writeBytes(i);else if("loca"===o)t.writeBytes(e);else{for(var a=this.align(s.length),l=[],h=0;h<a;h++)l.push(0);this.offset=s.offset;var u=this.read(l,0,s.length);t.writeBytes(u.buffer)}}},t.prototype.setOffset=function(t){this.offset=t},t.prototype.createInternals=function(){this.metrics=new da;var t=this.readNameTable(),e=this.readHeadTable();this.bIsLocaShort=0===e.indexToLocalFormat;var i=this.readHorizontalHeaderTable(),r=this.readOS2Table(),n=this.readPostTable();this.width=this.readWidthTable(i.numberOfHMetrics,e.unitsPerEm);var o=this.readCmapTable();this.initializeMetrics(t,e,i,r,n,o)},t.prototype.getGlyph=function(t){if("number"==typeof t){var e=null;this.metrics.isSymbol||null==this.microsoftGlyphs?this.metrics.isSymbol&&null!=this.macintoshGlyphs&&this.macintoshGlyphs.containsKey(t)&&(e=this.macintoshGlyphs.getValue(t)):this.microsoftGlyphs.containsKey(t)&&(e=this.microsoftGlyphs.getValue(t));return null!=e?e:this.getDefaultGlyph()}var i=null,r=t.charCodeAt(0);this.metrics.isSymbol||null===this.microsoft?(this.metrics.isSymbol&&null!==this.macintosh||this.isMacTTF)&&(0!==this.maxMacIndex?r%=this.maxMacIndex+1:r=61440==(65280&r)?255&r:r,this.macintosh.containsKey(r)&&(i=this.macintosh.getValue(r),this.isFontPresent=!0)):this.microsoft.containsKey(r)?(i=this.microsoft.getValue(r),r!==bs.whiteSpace.charCodeAt(0)&&(this.isFontPresent=!0)):r!==bs.whiteSpace.charCodeAt(0)&&(this.isFontPresent=!1),t===bs.whiteSpace&&null===i&&(i=new wa);return null!==i?i:this.getDefaultGlyph()},t.prototype.getGlyphChars=function(t){if(null===t||void 0===t)throw new Error("Argument Null Exception : chars");for(var e=new Xn,i=t.keys(),r=0;r<i.length;r++){var n=i[r],o=this.getGlyph(n);o.empty||e.setValue(o.index,n.charCodeAt(0))}return e},t.prototype.getAllGlyphs=function(){for(var t=[],e=new wa,i=0,r=0;r<this.width.length;r++){var n=this.width[r];e.index=i,e.width=n,t.push(e),i++}return t},t.prototype.readFontProgram=function(t){var e=this.getGlyphChars(t),i=this.readLocaTable(this.bIsLocaShort);e.size()<t.size()&&(this.missedGlyphs=t.size()-e.size()),this.updateGlyphChars(e,i);var r=this.generateGlyphTable(e,i,null,null),n=r.glyphTableSize,o=r.newLocaTable,s=r.newGlyphTable,a=this.updateLocaTable(o,this.bIsLocaShort,null),l=a.newLocaSize,h=a.newLocaUpdated;return this.getFontProgram(h,s,n,l)},t.prototype.convertString=function(t){if(null===t)throw new Error("Argument Null Exception : text");for(var e="",i=0;i<t.length;i++){var r=t[i],n=this.getGlyph(r);n.empty||(e+=String.fromCharCode(n.index))}return e},t.prototype.getCharWidth=function(t){var e=this.getGlyph(t);return(e=e.empty?this.getDefaultGlyph():e).empty?0:e.width},t.prototype.readString=function(t,e){if(void 0===e)return this.readString(t,!1);var i="";if(e)for(var r=0;r<t;r++)r%2!=0&&(i+=String.fromCharCode(this.fontData[this.offset])),this.offset+=1;else for(r=0;r<t;r++)i+=String.fromCharCode(this.fontData[this.offset]),this.offset+=1;return i},t.prototype.readFixed=function(t){return this.readInt16(t)+this.readInt16(t+2)/16384},t.prototype.readInt32=function(t){var e=this.fontData[t+3],i=this.fontData[t+2],r=this.fontData[t+1],n=this.fontData[t];return this.offset+=4,e+(i<<8)+(r<<16)+(n<<24)},t.prototype.readUInt32=function(t){var e=this.fontData[t+3],i=this.fontData[t+2],r=this.fontData[t+1],n=this.fontData[t];return this.offset+=4,e|i<<8|r<<16|n<<24},t.prototype.readInt16=function(t){var e=(this.fontData[t]<<8)+this.fontData[t+1];return e=32768&e?e-65536:e,this.offset+=2,e},t.prototype.readInt64=function(t){var e=this.readInt32(t+4),i=4294967296*this.readInt32(t)+e;return e<0&&(i+=4294967296),i},t.prototype.readUInt16=function(t){var e=this.fontData[t]<<8|this.fontData[t+1];return this.offset+=2,e},t.prototype.readUshortArray=function(t){for(var e=[],i=0;i<t;i++)e[i]=this.readUInt16(this.offset);return e},t.prototype.readBytes=function(t){for(var e=[],i=0;i<t;i++)e.push(this.fontData[this.offset]),this.offset+=1;return e},t.prototype.readByte=function(t){var e=this.fontData[t];return this.offset+=1,e},t.prototype.read=function(t,e,i){if(null===t)throw new Error("Argument Null Exception : buffer");var r=0,n=0;do{for(var o=0;o<i-r&&this.offset+o<this.fontData.length;o++)t[e+o]=this.fontData[this.offset+o];n=i-r,this.offset+=n,r+=n}while(r<i);return{buffer:t,written:r}},t}(),Ta=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ma=function(){function t(){this.lineGap=0}return t.prototype.getAscent=function(t){return this.ascent*Cs.charSizeMultiplier*this.getSize(t)},t.prototype.getDescent=function(t){return this.descent*Cs.charSizeMultiplier*this.getSize(t)},t.prototype.getLineGap=function(t){return this.lineGap*Cs.charSizeMultiplier*this.getSize(t)},t.prototype.getHeight=function(t){for(var e=["cambria","candara","constantia","corbel","cariadings"],i=[],r=0;r<e.length;r++){var n=e[r];i.push(n)}return this.getDescent(t)<0?this.getAscent(t)-this.getDescent(t)+this.getLineGap(t):this.getAscent(t)+this.getDescent(t)+this.getLineGap(t)},t.prototype.getSize=function(t){var e=this.size;if(null!=t)switch(t.subSuperScript){case as.SubScript:e/=this.subScriptSizeFactor;break;case as.SuperScript:e/=this.superscriptSizeFactor}return e},t.prototype.clone=function(){return this.widthTable=Da.clone(),this},Object.defineProperty(t.prototype,"widthTable",{get:function(){return this.internalWidthTable},set:function(t){this.internalWidthTable=t},enumerable:!0,configurable:!0}),t}(),Da=function(){function t(){}return t.clone=function(){return null},t}(),ka=function(t){function e(e){var i=t.call(this)||this;if(null==e)throw new Error("ArgumentNullException:widths");return i.widths=e,i}return Ta(e,t),e.prototype.items=function(t){if(t<0||t>=this.widths.length)throw new Error("ArgumentOutOfRangeException:index, The character is not supported by the font.");return this.widths[t]},Object.defineProperty(e.prototype,"length",{get:function(){return this.widths.length},enumerable:!0,configurable:!0}),e.prototype.clone=function(){return this.widths=this.widths,this},e.prototype.toArray=function(){return new ho(this.widths)},e}(Da),Ea=function(){function t(t,e){if(this.nameString="ABCDEFGHIJKLMNOPQRSTUVWXYZ",this.dictionaryProperties=new to,this.isCompress=!1,this.isEmbedFont=!1,this.cmapPrefix="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap"+Zn.newLine+"/CIDSystemInfo << /Registry (Adobe)/Ordering (UCS)/Supplement 0>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange"+Zn.newLine,this.cmapEndCodespaceRange="endcodespacerange"+Zn.newLine,this.cmapBeginRange="beginbfrange"+Zn.newLine,this.cmapEndRange="endbfrange"+Zn.newLine,this.cmapSuffix="endbfrange\nendcmap\nCMapName currentdict /CMap defineresource pop\nend end"+Zn.newLine,null===t||void 0===t)throw new Error("ArgumentNullException:base64String");this.fontSize=e,this.fontString=t,this.Initialize()}return t.prototype.getCharWidth=function(t){return this.ttfReader.getCharWidth(t)},t.prototype.getLineWidth=function(t){for(var e=0,i=0,r=t.length;i<r;i++){var n=t[i];e+=this.getCharWidth(n)}return e},t.prototype.Initialize=function(){var t=new ea(this.fontString.length);t.writeFromBase64String(this.fontString),this.fontData=t.internalBuffer,this.ttfReader=new La(this.fontData),this.ttfMetrics=this.ttfReader.metrics},t.prototype.createInternals=function(){this.fontDictionary=new eo,this.fontProgram=new Lo,this.cmap=new Lo,this.descendantFont=new eo,this.metrics=new Ma,this.ttfReader.createInternals(),this.ttfMetrics=this.ttfReader.metrics,this.initializeMetrics(),this.subsetName=this.getFontName(),this.createDescendantFont(),this.createCmap(),this.createFontDictionary(),this.createFontProgram()},t.prototype.getInternals=function(){return this.fontDictionary},t.prototype.initializeMetrics=function(){var t=this.ttfReader.metrics;this.metrics.ascent=t.macAscent,this.metrics.descent=t.macDescent,this.metrics.height=t.macAscent-t.macDescent+t.lineGap,this.metrics.name=t.fontFamily,this.metrics.postScriptName=t.postScriptName,this.metrics.size=this.fontSize,this.metrics.widthTable=new ka(t.widthTable),this.metrics.lineGap=t.lineGap,this.metrics.subScriptSizeFactor=t.subScriptSizeFactor,this.metrics.superscriptSizeFactor=t.superscriptSizeFactor,this.metrics.isBold=t.isBold},t.prototype.getFontName=function(){for(var t,e="",i=0;i<6;i++){var r=Math.floor(26*Math.random())+0;e+=this.nameString[r]}return e+="+",e+=this.ttfReader.metrics.postScriptName,t=e.toString(),t=this.formatName(t)},t.prototype.formatName=function(t){var e=t.replace("(","#28");return e=e.replace(")","#29"),e=e.replace("[","#5B"),e=e.replace("]","#5D"),e=e.replace("<","#3C"),e=e.replace(">","#3E"),e=e.replace("{","#7B"),e=e.replace("}","#7D"),e=e.replace("/","#2F"),(e=e.replace("%","#25")).replace(" ","#20")},t.prototype.createDescendantFont=function(){this.descendantFont.isFont=!0,this.descendantFont.descendantFontBeginSave=new ro(this),this.descendantFont.items.setValue(this.dictionaryProperties.type,new Qn(this.dictionaryProperties.font)),this.descendantFont.items.setValue(this.dictionaryProperties.subtype,new Qn(this.dictionaryProperties.cIDFontType2)),this.descendantFont.items.setValue(this.dictionaryProperties.baseFont,new Qn(this.subsetName)),this.descendantFont.items.setValue(this.dictionaryProperties.cIDToGIDMap,new Qn(this.dictionaryProperties.identity)),this.descendantFont.items.setValue(this.dictionaryProperties.dw,new lo(1e3)),this.fontDescriptor=this.createFontDescriptor(),this.descendantFont.items.setValue(this.dictionaryProperties.fontDescriptor,new jo(this.fontDescriptor));var t=this.createSystemInfo();this.descendantFont.items.setValue(this.dictionaryProperties.cIDSystemInfo,t)},t.prototype.createFontDescriptor=function(){var t=new eo,e=this.ttfReader.metrics;return t.isFont=!0,t.items.setValue(this.dictionaryProperties.type,new Qn(this.dictionaryProperties.fontDescriptor)),t.items.setValue(this.dictionaryProperties.fontName,new Qn(this.subsetName)),t.items.setValue(this.dictionaryProperties.flags,new lo(this.getDescriptorFlags())),t.items.setValue(this.dictionaryProperties.fontBBox,ho.fromRectangle(this.getBoundBox())),t.items.setValue(this.dictionaryProperties.missingWidth,new lo(e.widthTable[32])),t.items.setValue(this.dictionaryProperties.stemV,new lo(e.stemV)),t.items.setValue(this.dictionaryProperties.italicAngle,new lo(e.italicAngle)),t.items.setValue(this.dictionaryProperties.capHeight,new lo(e.capHeight)),t.items.setValue(this.dictionaryProperties.ascent,new lo(e.winAscent)),t.items.setValue(this.dictionaryProperties.descent,new lo(e.winDescent)),t.items.setValue(this.dictionaryProperties.leading,new lo(e.leading)),t.items.setValue(this.dictionaryProperties.avgWidth,new lo(e.widthTable[32])),t.items.setValue(this.dictionaryProperties.fontFile2,new jo(this.fontProgram)),t.items.setValue(this.dictionaryProperties.maxWidth,new lo(e.widthTable[32])),t.items.setValue(this.dictionaryProperties.xHeight,new lo(0)),t.items.setValue(this.dictionaryProperties.stemH,new lo(0)),t},t.prototype.createCmap=function(){this.cmap.cmapBeginSave=new To(this)},t.prototype.createFontDictionary=function(){this.fontDictionary.isFont=!0,this.fontDictionary.fontDictionaryBeginSave=new no(this),this.fontDictionary.items.setValue(this.dictionaryProperties.type,new Qn(this.dictionaryProperties.font)),this.fontDictionary.items.setValue(this.dictionaryProperties.baseFont,new Qn(this.subsetName)),this.fontDictionary.items.setValue(this.dictionaryProperties.subtype,new Qn(this.dictionaryProperties.type0)),this.fontDictionary.items.setValue(this.dictionaryProperties.encoding,new Qn(this.dictionaryProperties.identityH));var t=new ho,e=new jo(this.descendantFont);t.isFont=!0,t.add(e),this.fontDictionary.items.setValue(this.dictionaryProperties.descendantFonts,t)},t.prototype.createFontProgram=function(){this.fontProgram.fontProgramBeginSave=new Mo(this)},t.prototype.createSystemInfo=function(){var t=new eo;return t.items.setValue(this.dictionaryProperties.registry,new ko("Adobe")),t.items.setValue(this.dictionaryProperties.ordering,new ko(this.dictionaryProperties.identity)),t.items.setValue(this.dictionaryProperties.supplement,new lo(0)),t},t.prototype.descendantFontBeginSave=function(){if(null!==this.usedChars&&void 0!==this.usedChars&&this.usedChars.size()>0){var t=this.getDescendantWidth();null!==t&&this.descendantFont.items.setValue(this.dictionaryProperties.w,t)}},t.prototype.cmapBeginSave=function(){this.generateCmap()},t.prototype.fontDictionaryBeginSave=function(){null!==this.usedChars&&void 0!==this.usedChars&&this.usedChars.size()>0&&!this.fontDictionary.containsKey(this.dictionaryProperties.toUnicode)&&this.fontDictionary.items.setValue(this.dictionaryProperties.toUnicode,new jo(this.cmap))},t.prototype.fontProgramBeginSave=function(){this.isCompress=!0,this.generateFontProgram()},t.prototype.getDescendantWidth=function(){var t=new ho;if(null!==this.usedChars&&void 0!==this.usedChars&&this.usedChars.size()>0){for(var e=[],i=this.usedChars.keys(),r=0;r<i.length;r++){var n=i[r];(h=this.ttfReader.getGlyph(n)).empty||e.push(h)}e.sort(function(t,e){return t.index-e.index});var o=0,s=0,a=!1,l=new ho;for(r=0;r<e.length;r++){var h=e[r];a||(a=!0,o=h.index,s=h.index-1),(s+1!==h.index||r+1===e.length)&&e.length>1&&(t.add(new lo(o)),0!==r&&t.add(l),o=h.index,l=new ho),l.add(new lo(h.width)),r+1===e.length&&(t.add(new lo(o)),t.add(l)),s=h.index}}return t},t.prototype.generateCmap=function(){if(null!==this.usedChars&&void 0!==this.usedChars&&this.usedChars.size()>0){var t=this.ttfReader.getGlyphChars(this.usedChars);if(t.size()>0){var e=t.keys().sort(),i=e[0],r=e[e.length-1],n=this.toHexString(i,!1)+this.toHexString(r,!1)+Zn.newLine,o="";o+=this.cmapPrefix,o+=n,o+=this.cmapEndCodespaceRange;for(var s=0,a=0;a<e.length;a++){0===s&&(0!==a&&(o+=this.cmapEndRange),o+=s=Math.min(100,e.length-a),o+=Zn.whiteSpace,o+=this.cmapBeginRange),s-=1;var l=e[a];o+=this.toHexString(l,!0)+this.toHexString(l,!0)+this.toHexString(t.getValue(l),!0)+"\n"}o+=this.cmapSuffix,this.cmap.clearStream(),this.cmap.isFont=!0,this.cmap.write(o)}}},t.prototype.generateFontProgram=function(){var t=null;this.usedChars=null===this.usedChars||void 0===this.usedChars?new Xn:this.usedChars,this.ttfReader.setOffset(0),t=this.ttfReader.readFontProgram(this.usedChars),this.fontProgram.clearStream(),this.fontProgram.isFont=!0,this.fontProgram.writeBytes(t)},t.prototype.getDescriptorFlags=function(){var t=0,e=this.ttfReader.metrics;return e.isFixedPitch&&(t|=fs.FixedPitch),e.isSymbol?t|=fs.Symbolic:t|=fs.Nonsymbolic,e.isItalic&&(t|=fs.Italic),e.isBold&&(t|=fs.ForceBold),t},t.prototype.getBoundBox=function(){var t=this.ttfReader.metrics.fontBox,e=Math.abs(t.right-t.left),i=Math.abs(t.top-t.bottom);return new Zo(t.left,t.bottom,e,i)},t.prototype.toHexString=function(t,e){var i=t.toString(16);return e&&(i=i.toUpperCase()),"<0000".substring(0,5-i.length)+i+">"},t.prototype.setSymbols=function(t){if(null===t)throw new Error("Argument Null Exception : text");null!==this.usedChars&&void 0!==this.usedChars||(this.usedChars=new Xn);for(var e=0;e<t.length;e++){var i=t[e];this.usedChars.setValue(i,String.fromCharCode(0))}!1===this.isEmbedFont&&this.getDescendantWidth()},t}(),ja=function(){function t(){this.arabicCharTable=[["ء","ﺀ"],["آ","ﺁ","ﺂ"],["أ","ﺃ","ﺄ"],["ؤ","ﺅ","ﺆ"],["إ","ﺇ","ﺈ"],["ئ","ﺉ","ﺊ","ﺋ","ﺌ"],["ا","ﺍ","ﺎ"],["ب","ﺏ","ﺐ","ﺑ","ﺒ"],["ة","ﺓ","ﺔ"],["ت","ﺕ","ﺖ","ﺗ","ﺘ"],["ث","ﺙ","ﺚ","ﺛ","ﺜ"],["ج","ﺝ","ﺞ","ﺟ","ﺠ"],["ح","ﺡ","ﺢ","ﺣ","ﺤ"],["خ","ﺥ","ﺦ","ﺧ","ﺨ"],["د","ﺩ","ﺪ"],["ذ","ﺫ","ﺬ"],["ر","ﺭ","ﺮ"],["ز","ﺯ","ﺰ"],["س","ﺱ","ﺲ","ﺳ","ﺴ"],["ش","ﺵ","ﺶ","ﺷ","ﺸ"],["ص","ﺹ","ﺺ","ﺻ","ﺼ"],["ض","ﺽ","ﺾ","ﺿ","ﻀ"],["ط","ﻁ","ﻂ","ﻃ","ﻄ"],["ظ","ﻅ","ﻆ","ﻇ","ﻈ"],["ع","ﻉ","ﻊ","ﻋ","ﻌ"],["غ","ﻍ","ﻎ","ﻏ","ﻐ"],["ـ","ـ","ـ","ـ","ـ"],["ف","ﻑ","ﻒ","ﻓ","ﻔ"],["ق","ﻕ","ﻖ","ﻗ","ﻘ"],["ك","ﻙ","ﻚ","ﻛ","ﻜ"],["ل","ﻝ","ﻞ","ﻟ","ﻠ"],["م","ﻡ","ﻢ","ﻣ","ﻤ"],["ن","ﻥ","ﻦ","ﻧ","ﻨ"],["ه","ﻩ","ﻪ","ﻫ","ﻬ"],["و","ﻭ","ﻮ"],["ى","ﻯ","ﻰ","ﯨ","ﯩ"],["ي","ﻱ","ﻲ","ﻳ","ﻴ"],["ٱ","ﭐ","ﭑ"],["ٹ","ﭦ","ﭧ","ﭨ","ﭩ"],["ٺ","ﭞ","ﭟ","ﭠ","ﭡ"],["ٻ","ﭒ","ﭓ","ﭔ","ﭕ"],["پ","ﭖ","ﭗ","ﭘ","ﭙ"],["ٿ","ﭢ","ﭣ","ﭤ","ﭥ"],["ڀ","ﭚ","ﭛ","ﭜ","ﭝ"],["ڃ","ﭶ","ﭷ","ﭸ","ﭹ"],["ڄ","ﭲ","ﭳ","ﭴ","ﭵ"],["چ","ﭺ","ﭻ","ﭼ","ﭽ"],["ڇ","ﭾ","ﭿ","ﮀ","ﮁ"],["ڈ","ﮈ","ﮉ"],["ڌ","ﮄ","ﮅ"],["ڍ","ﮂ","ﮃ"],["ڎ","ﮆ","ﮇ"],["ڑ","ﮌ","ﮍ"],["ژ","ﮊ","ﮋ"],["ڤ","ﭪ","ﭫ","ﭬ","ﭭ"],["ڦ","ﭮ","ﭯ","ﭰ","ﭱ"],["ک","ﮎ","ﮏ","ﮐ","ﮑ"],["ڭ","ﯓ","ﯔ","ﯕ","ﯖ"],["گ","ﮒ","ﮓ","ﮔ","ﮕ"],["ڱ","ﮚ","ﮛ","ﮜ","ﮝ"],["ڳ","ﮖ","ﮗ","ﮘ","ﮙ"],["ں","ﮞ","ﮟ"],["ڻ","ﮠ","ﮡ","ﮢ","ﮣ"],["ھ","ﮪ","ﮫ","ﮬ","ﮭ"],["ۀ","ﮤ","ﮥ"],["ہ","ﮦ","ﮧ","ﮨ","ﮩ"],["ۅ","ﯠ","ﯡ"],["ۆ","ﯙ","ﯚ"],["ۇ","ﯗ","ﯘ"],["ۈ","ﯛ","ﯜ"],["ۉ","ﯢ","ﯣ"],["ۋ","ﯞ","ﯟ"],["ی","ﯼ","ﯽ","ﯾ","ﯿ"],["ې","ﯤ","ﯥ","ﯦ","ﯧ"],["ے","ﮮ","ﮯ"],["ۓ","ﮰ","ﮱ"]],this.alef="ا",this.alefHamza="أ",this.alefHamzaBelow="إ",this.alefMadda="آ",this.lam="ل",this.hamza="ء",this.zeroWidthJoiner="",this.hamzaAbove="ٔ",this.hamzaBelow="ٕ",this.wawHamza="ؤ",this.yehHamza="ئ",this.waw="و",this.alefMaksura="ى",this.yeh="ي",this.farsiYeh="ی",this.shadda="ّ",this.madda="ٓ",this.lwa="ﻻ",this.lwawh="ﻷ",this.lwawhb="ﻹ",this.lwawm="ﻵ",this.bwhb="ۓ",this.fathatan="ً",this.superScriptalef="ٰ",this.vowel=1,this.arabicMapTable=new Xn;for(var t=0;t<this.arabicCharTable.length;t++)this.arabicMapTable.setValue(this.arabicCharTable[t][0],this.arabicCharTable[t])}return t.prototype.getCharacterShape=function(t,e){if(t>=this.hamza&&t<=this.bwhb){if(this.arabicMapTable.getValue(t))return this.arabicMapTable.getValue(t)[e+1]}else if(t>=this.lwawm&&t<=this.lwa)return t;return t},t.prototype.shape=function(t,e){for(var i="",r="",n=0;n<t.length;n++){var o=t[n];if(o>=""&&o<="ۿ")r+=o;else{if(r.length>0){i+=this.doShape(r.toString(),0),r=""}i+=o}}if(r.length>0){i+=this.doShape(r.toString(),0)}return i.toString()},t.prototype.doShape=function(t,e){for(var i="",r=0,n=0,o="",s=new Ia,a=new Ia;n<t.length;)if(o=t[n++],0===this.ligature(o,a)){var l=this.getShapeCount(o);r=1===l?0:2,s.Shapes>2&&(r+=1),r%=a.Shapes,a.Value=this.getCharacterShape(a.Value,r),i=this.append(i,s,e),s=a,(a=new Ia).Value=o,a.Shapes=l,a.Ligature++}return r=s.Shapes>2?1:0,r%=a.Shapes,a.Value=this.getCharacterShape(a.Value,r),i=this.append(i,s,e),(i=this.append(i,a,e)).toString()},t.prototype.append=function(t,e,i){return""!==e.Value&&(t+=e.Value,e.Ligature-=1,""!==e.Type&&(0==(i&this.vowel)?(t+=e.Type,e.Ligature-=1):e.Ligature-=1),""!==e.vowel&&(0==(i&this.vowel)?(t+=e.vowel,e.Ligature-=1):e.Ligature-=1)),t},t.prototype.ligature=function(t,e){if(""!==e.Value){var i=0;if(t>=this.fathatan&&t<=this.hamzaBelow||t===this.superScriptalef){if(i=1,""!==e.vowel&&t!==this.shadda&&(i=2),t===this.shadda){if(null!=e.Type)return 0;e.Type=this.shadda}else t===this.hamzaBelow?e.Value===this.alef?(e.Value=this.alefHamzaBelow,i=2):t===this.lwa?(e.Value=this.lwawhb,i=2):e.Type=this.hamzaBelow:t===this.hamzaAbove?e.Value===this.alef?(e.Value=this.alefHamza,i=2):e.Value===this.lwa?(e.Value=this.lwawh,i=2):e.Value===this.waw?(e.Value=this.wawHamza,i=2):e.Value===this.yeh||e.Value===this.alefMaksura||e.Value===this.farsiYeh?(e.Value=this.yehHamza,i=2):e.Type=this.hamzaAbove:t===this.madda?e.Value===this.alef&&(e.Value=this.alefMadda,i=2):e.vowel=t;return 1===i&&e.Ligature++,i}return""!==e.vowel?0:(e.Value===this.lam&&(t===this.alef?(e.Value=this.lwa,e.Shapes=2,i=3):t===this.alefHamza?(e.Value=this.lwawh,e.Shapes=2,i=3):t===this.alefHamzaBelow?(e.Value=this.lwawhb,e.Shapes=2,i=3):t===this.alefMadda&&(e.Value=this.lwawm,e.Shapes=2,i=3)),i)}return 0},t.prototype.getShapeCount=function(t){if(t>=this.hamza&&t<=this.bwhb&&!(t>=this.fathatan&&t<=this.hamzaBelow||t===this.superScriptalef)){if(this.arabicMapTable.getValue(t))return this.arabicMapTable.getValue(t).length-1}else if(t===this.zeroWidthJoiner)return 4;return 1},t}(),Ia=function(){function t(){this.shapeValue="",this.shapeType="",this.shapeVowel="",this.shapeLigature=0,this.shapeShapes=1}return Object.defineProperty(t.prototype,"Value",{get:function(){return this.shapeValue},set:function(t){this.shapeValue=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Type",{get:function(){return this.shapeType},set:function(t){this.shapeType=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vowel",{get:function(){return this.shapeVowel},set:function(t){this.shapeVowel=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Ligature",{get:function(){return this.shapeLigature},set:function(t){this.shapeLigature=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Shapes",{get:function(){return this.shapeShapes},set:function(t){this.shapeShapes=t},enumerable:!0,configurable:!0}),t}(),Ra=function(){function t(){this.indexes=[],this.indexLevels=[],this.mirroringShapeCharacters=new Xn,this.update()}return t.prototype.doMirrorShaping=function(t){for(var e=[],i=0;i<t.length;i++)1==(1&this.indexLevels[i])&&this.mirroringShapeCharacters.containsKey(t[i].charCodeAt(0))?e[i]=String.fromCharCode(this.mirroringShapeCharacters.getValue(t[i].charCodeAt(0))):e[i]=t[i].toString();for(var r="",n=0;n<e.length;n++)r+=e[n];return r},t.prototype.getLogicalToVisualString=function(t,e){var i=new Aa;this.indexLevels=i.getVisualOrder(t,e),this.setDefaultIndexLevel(),this.doOrder(0,this.indexLevels.length-1);for(var r=this.doMirrorShaping(t),n="",o=0;o<this.indexes.length;o++){n+=r[this.indexes[o]]}return n.toString()},t.prototype.setDefaultIndexLevel=function(){for(var t=0;t<this.indexLevels.length;t++)this.indexes[t]=t},t.prototype.doOrder=function(t,e){for(var i=this.indexLevels[t],r=i,n=i,o=i,s=t+1;s<=e;++s){var a=this.indexLevels[s];a>i?i=a:a<r&&(r=a),n&=a,o|=a}if(0!=(1&o))if(1!=(1&n))for(r|=1;i>=r;){for(var l=t;;){for(;l<=e&&!(this.indexLevels[l]>=i);)l+=1;if(l>e)break;for(var h=l+1;h<=e&&!(this.indexLevels[h]<i);)h+=1;this.reArrange(l,h),l=h+1}i-=1}else this.reArrange(t,e+1)},t.prototype.reArrange=function(t,e){var i=(t+e)/2;for(--e;t<i;++t,--e){var r=this.indexes[t];this.indexes[t]=this.indexes[e],this.indexes[e]=r}},t.prototype.update=function(){this.mirroringShapeCharacters.setValue(40,41),this.mirroringShapeCharacters.setValue(41,40),this.mirroringShapeCharacters.setValue(60,62),this.mirroringShapeCharacters.setValue(62,60),this.mirroringShapeCharacters.setValue(91,93),this.mirroringShapeCharacters.setValue(93,91),this.mirroringShapeCharacters.setValue(123,125),this.mirroringShapeCharacters.setValue(125,123),this.mirroringShapeCharacters.setValue(171,187),this.mirroringShapeCharacters.setValue(187,171),this.mirroringShapeCharacters.setValue(8249,8250),this.mirroringShapeCharacters.setValue(8250,8249),this.mirroringShapeCharacters.setValue(8261,8262),this.mirroringShapeCharacters.setValue(8262,8261),this.mirroringShapeCharacters.setValue(8317,8318),this.mirroringShapeCharacters.setValue(8318,8317),this.mirroringShapeCharacters.setValue(8333,8334),this.mirroringShapeCharacters.setValue(8334,8333),this.mirroringShapeCharacters.setValue(8712,8715),this.mirroringShapeCharacters.setValue(8713,8716),this.mirroringShapeCharacters.setValue(8714,8717),this.mirroringShapeCharacters.setValue(8715,8712),this.mirroringShapeCharacters.setValue(8716,8713),this.mirroringShapeCharacters.setValue(8717,8714),this.mirroringShapeCharacters.setValue(8725,10741),this.mirroringShapeCharacters.setValue(8764,8765),this.mirroringShapeCharacters.setValue(8765,8764),this.mirroringShapeCharacters.setValue(8771,8909),this.mirroringShapeCharacters.setValue(8786,8787),this.mirroringShapeCharacters.setValue(8787,8786),this.mirroringShapeCharacters.setValue(8788,8789),this.mirroringShapeCharacters.setValue(8789,8788),this.mirroringShapeCharacters.setValue(8804,8805),this.mirroringShapeCharacters.setValue(8805,8804),this.mirroringShapeCharacters.setValue(8806,8807),this.mirroringShapeCharacters.setValue(8807,8806),this.mirroringShapeCharacters.setValue(8808,8809),this.mirroringShapeCharacters.setValue(8809,8808),this.mirroringShapeCharacters.setValue(8810,8811),this.mirroringShapeCharacters.setValue(8811,8810),this.mirroringShapeCharacters.setValue(8814,8815),this.mirroringShapeCharacters.setValue(8815,8814),this.mirroringShapeCharacters.setValue(8816,8817),this.mirroringShapeCharacters.setValue(8817,8816),this.mirroringShapeCharacters.setValue(8818,8819),this.mirroringShapeCharacters.setValue(8819,8818),this.mirroringShapeCharacters.setValue(8820,8821),this.mirroringShapeCharacters.setValue(8821,8820),this.mirroringShapeCharacters.setValue(8822,8823),this.mirroringShapeCharacters.setValue(8823,8822),this.mirroringShapeCharacters.setValue(8824,8825),this.mirroringShapeCharacters.setValue(8825,8824),this.mirroringShapeCharacters.setValue(8826,8827),this.mirroringShapeCharacters.setValue(8827,8826),this.mirroringShapeCharacters.setValue(8828,8829),this.mirroringShapeCharacters.setValue(8829,8828),this.mirroringShapeCharacters.setValue(8830,8831),this.mirroringShapeCharacters.setValue(8831,8830),this.mirroringShapeCharacters.setValue(8832,8833),this.mirroringShapeCharacters.setValue(8833,8832),this.mirroringShapeCharacters.setValue(8834,8835),this.mirroringShapeCharacters.setValue(8835,8834),this.mirroringShapeCharacters.setValue(8836,8837),this.mirroringShapeCharacters.setValue(8837,8836),this.mirroringShapeCharacters.setValue(8838,8839),this.mirroringShapeCharacters.setValue(8839,8838),this.mirroringShapeCharacters.setValue(8840,8841),this.mirroringShapeCharacters.setValue(8841,8840),this.mirroringShapeCharacters.setValue(8842,8843),this.mirroringShapeCharacters.setValue(8843,8842),this.mirroringShapeCharacters.setValue(8847,8848),this.mirroringShapeCharacters.setValue(8848,8847),this.mirroringShapeCharacters.setValue(8849,8850),this.mirroringShapeCharacters.setValue(8850,8849),this.mirroringShapeCharacters.setValue(8856,10680),this.mirroringShapeCharacters.setValue(8866,8867),this.mirroringShapeCharacters.setValue(8867,8866),this.mirroringShapeCharacters.setValue(8870,10974),this.mirroringShapeCharacters.setValue(8872,10980),this.mirroringShapeCharacters.setValue(8873,10979),this.mirroringShapeCharacters.setValue(8875,10981),this.mirroringShapeCharacters.setValue(8880,8881),this.mirroringShapeCharacters.setValue(8881,8880),this.mirroringShapeCharacters.setValue(8882,8883),this.mirroringShapeCharacters.setValue(8883,8882),this.mirroringShapeCharacters.setValue(8884,8885),this.mirroringShapeCharacters.setValue(8885,8884),this.mirroringShapeCharacters.setValue(8886,8887),this.mirroringShapeCharacters.setValue(8887,8886),this.mirroringShapeCharacters.setValue(8905,8906),this.mirroringShapeCharacters.setValue(8906,8905),this.mirroringShapeCharacters.setValue(8907,8908),this.mirroringShapeCharacters.setValue(8908,8907),this.mirroringShapeCharacters.setValue(8909,8771),this.mirroringShapeCharacters.setValue(8912,8913),this.mirroringShapeCharacters.setValue(8913,8912),this.mirroringShapeCharacters.setValue(8918,8919),this.mirroringShapeCharacters.setValue(8919,8918),this.mirroringShapeCharacters.setValue(8920,8921),this.mirroringShapeCharacters.setValue(8921,8920),this.mirroringShapeCharacters.setValue(8922,8923),this.mirroringShapeCharacters.setValue(8923,8922),this.mirroringShapeCharacters.setValue(8924,8925),this.mirroringShapeCharacters.setValue(8925,8924),this.mirroringShapeCharacters.setValue(8926,8927),this.mirroringShapeCharacters.setValue(8927,8926),this.mirroringShapeCharacters.setValue(8928,8929),this.mirroringShapeCharacters.setValue(8929,8928),this.mirroringShapeCharacters.setValue(8930,8931),this.mirroringShapeCharacters.setValue(8931,8930),this.mirroringShapeCharacters.setValue(8932,8933),this.mirroringShapeCharacters.setValue(8933,8932),this.mirroringShapeCharacters.setValue(8934,8935),this.mirroringShapeCharacters.setValue(8935,8934),this.mirroringShapeCharacters.setValue(8936,8937),this.mirroringShapeCharacters.setValue(8937,8936),this.mirroringShapeCharacters.setValue(8938,8939),this.mirroringShapeCharacters.setValue(8939,8938),this.mirroringShapeCharacters.setValue(8940,8941),this.mirroringShapeCharacters.setValue(8941,8940),this.mirroringShapeCharacters.setValue(8944,8945),this.mirroringShapeCharacters.setValue(8945,8944),this.mirroringShapeCharacters.setValue(8946,8954),this.mirroringShapeCharacters.setValue(8947,8955),this.mirroringShapeCharacters.setValue(8948,8956),this.mirroringShapeCharacters.setValue(8950,8957),this.mirroringShapeCharacters.setValue(8951,8958),this.mirroringShapeCharacters.setValue(8954,8946),this.mirroringShapeCharacters.setValue(8955,8947),this.mirroringShapeCharacters.setValue(8956,8948),this.mirroringShapeCharacters.setValue(8957,8950),this.mirroringShapeCharacters.setValue(8958,8951),this.mirroringShapeCharacters.setValue(8968,8969),this.mirroringShapeCharacters.setValue(8969,8968),this.mirroringShapeCharacters.setValue(8970,8971),this.mirroringShapeCharacters.setValue(8971,8970),this.mirroringShapeCharacters.setValue(9001,9002),this.mirroringShapeCharacters.setValue(9002,9001),this.mirroringShapeCharacters.setValue(10088,10089),this.mirroringShapeCharacters.setValue(10089,10088),this.mirroringShapeCharacters.setValue(10090,10091),this.mirroringShapeCharacters.setValue(10091,10090),this.mirroringShapeCharacters.setValue(10092,10093),this.mirroringShapeCharacters.setValue(10093,10092),this.mirroringShapeCharacters.setValue(10094,10095),this.mirroringShapeCharacters.setValue(10095,10094),this.mirroringShapeCharacters.setValue(10096,10097),this.mirroringShapeCharacters.setValue(10097,10096),this.mirroringShapeCharacters.setValue(10098,10099),this.mirroringShapeCharacters.setValue(10099,10098),this.mirroringShapeCharacters.setValue(10100,10101),this.mirroringShapeCharacters.setValue(10101,10100),this.mirroringShapeCharacters.setValue(10197,10198),this.mirroringShapeCharacters.setValue(10198,10197),this.mirroringShapeCharacters.setValue(10205,10206),this.mirroringShapeCharacters.setValue(10206,10205),this.mirroringShapeCharacters.setValue(10210,10211),this.mirroringShapeCharacters.setValue(10211,10210),this.mirroringShapeCharacters.setValue(10212,10213),this.mirroringShapeCharacters.setValue(10213,10212),this.mirroringShapeCharacters.setValue(10214,10215),this.mirroringShapeCharacters.setValue(10215,10214),this.mirroringShapeCharacters.setValue(10216,10217),this.mirroringShapeCharacters.setValue(10217,10216),this.mirroringShapeCharacters.setValue(10218,10219),this.mirroringShapeCharacters.setValue(10219,10218),this.mirroringShapeCharacters.setValue(10627,10628),this.mirroringShapeCharacters.setValue(10628,10627),this.mirroringShapeCharacters.setValue(10629,10630),this.mirroringShapeCharacters.setValue(10630,10629),this.mirroringShapeCharacters.setValue(10631,10632),this.mirroringShapeCharacters.setValue(10632,10631),this.mirroringShapeCharacters.setValue(10633,10634),this.mirroringShapeCharacters.setValue(10634,10633),this.mirroringShapeCharacters.setValue(10635,10636),this.mirroringShapeCharacters.setValue(10636,10635),this.mirroringShapeCharacters.setValue(10637,10640),this.mirroringShapeCharacters.setValue(10638,10639),this.mirroringShapeCharacters.setValue(10639,10638),this.mirroringShapeCharacters.setValue(10640,10637),this.mirroringShapeCharacters.setValue(10641,10642),this.mirroringShapeCharacters.setValue(10642,10641),this.mirroringShapeCharacters.setValue(10643,10644),this.mirroringShapeCharacters.setValue(10644,10643),this.mirroringShapeCharacters.setValue(10645,10646),this.mirroringShapeCharacters.setValue(10646,10645),this.mirroringShapeCharacters.setValue(10647,10648),this.mirroringShapeCharacters.setValue(10648,10647),this.mirroringShapeCharacters.setValue(10680,8856),this.mirroringShapeCharacters.setValue(10688,10689),this.mirroringShapeCharacters.setValue(10689,10688),this.mirroringShapeCharacters.setValue(10692,10693),this.mirroringShapeCharacters.setValue(10693,10692),this.mirroringShapeCharacters.setValue(10703,10704),this.mirroringShapeCharacters.setValue(10704,10703),this.mirroringShapeCharacters.setValue(10705,10706),this.mirroringShapeCharacters.setValue(10706,10705),this.mirroringShapeCharacters.setValue(10708,10709),this.mirroringShapeCharacters.setValue(10709,10708),this.mirroringShapeCharacters.setValue(10712,10713),this.mirroringShapeCharacters.setValue(10713,10712),this.mirroringShapeCharacters.setValue(10714,10715),this.mirroringShapeCharacters.setValue(10715,10714),this.mirroringShapeCharacters.setValue(10741,8725),this.mirroringShapeCharacters.setValue(10744,10745),this.mirroringShapeCharacters.setValue(10745,10744),this.mirroringShapeCharacters.setValue(10748,10749),this.mirroringShapeCharacters.setValue(10749,10748),this.mirroringShapeCharacters.setValue(10795,10796),this.mirroringShapeCharacters.setValue(10796,10795),this.mirroringShapeCharacters.setValue(10797,10796),this.mirroringShapeCharacters.setValue(10798,10797),this.mirroringShapeCharacters.setValue(10804,10805),this.mirroringShapeCharacters.setValue(10805,10804),this.mirroringShapeCharacters.setValue(10812,10813),this.mirroringShapeCharacters.setValue(10813,10812),this.mirroringShapeCharacters.setValue(10852,10853),this.mirroringShapeCharacters.setValue(10853,10852),this.mirroringShapeCharacters.setValue(10873,10874),this.mirroringShapeCharacters.setValue(10874,10873),this.mirroringShapeCharacters.setValue(10877,10878),this.mirroringShapeCharacters.setValue(10878,10877),this.mirroringShapeCharacters.setValue(10879,10880),this.mirroringShapeCharacters.setValue(10880,10879),this.mirroringShapeCharacters.setValue(10881,10882),this.mirroringShapeCharacters.setValue(10882,10881),this.mirroringShapeCharacters.setValue(10883,10884),this.mirroringShapeCharacters.setValue(10884,10883),this.mirroringShapeCharacters.setValue(10891,10892),this.mirroringShapeCharacters.setValue(10892,10891),this.mirroringShapeCharacters.setValue(10897,10898),this.mirroringShapeCharacters.setValue(10898,10897),this.mirroringShapeCharacters.setValue(10899,10900),this.mirroringShapeCharacters.setValue(10900,10899),this.mirroringShapeCharacters.setValue(10901,10902),this.mirroringShapeCharacters.setValue(10902,10901),this.mirroringShapeCharacters.setValue(10903,10904),this.mirroringShapeCharacters.setValue(10904,10903),this.mirroringShapeCharacters.setValue(10905,10906),this.mirroringShapeCharacters.setValue(10906,10905),this.mirroringShapeCharacters.setValue(10907,10908),this.mirroringShapeCharacters.setValue(10908,10907),this.mirroringShapeCharacters.setValue(10913,10914),this.mirroringShapeCharacters.setValue(10914,10913),this.mirroringShapeCharacters.setValue(10918,10919),this.mirroringShapeCharacters.setValue(10919,10918),this.mirroringShapeCharacters.setValue(10920,10921),this.mirroringShapeCharacters.setValue(10921,10920),this.mirroringShapeCharacters.setValue(10922,10923),this.mirroringShapeCharacters.setValue(10923,10922),this.mirroringShapeCharacters.setValue(10924,10925),this.mirroringShapeCharacters.setValue(10925,10924),this.mirroringShapeCharacters.setValue(10927,10928),this.mirroringShapeCharacters.setValue(10928,10927),this.mirroringShapeCharacters.setValue(10931,10932),this.mirroringShapeCharacters.setValue(10932,10931),this.mirroringShapeCharacters.setValue(10939,10940),this.mirroringShapeCharacters.setValue(10940,10939),this.mirroringShapeCharacters.setValue(10941,10942),this.mirroringShapeCharacters.setValue(10942,10941),this.mirroringShapeCharacters.setValue(10943,10944),this.mirroringShapeCharacters.setValue(10944,10943),this.mirroringShapeCharacters.setValue(10945,10946),this.mirroringShapeCharacters.setValue(10946,10945),this.mirroringShapeCharacters.setValue(10947,10948),this.mirroringShapeCharacters.setValue(10948,10947),this.mirroringShapeCharacters.setValue(10949,10950),this.mirroringShapeCharacters.setValue(10950,10949),this.mirroringShapeCharacters.setValue(10957,10958),this.mirroringShapeCharacters.setValue(10958,10957),this.mirroringShapeCharacters.setValue(10959,10960),this.mirroringShapeCharacters.setValue(10960,10959),this.mirroringShapeCharacters.setValue(10961,10962),this.mirroringShapeCharacters.setValue(10962,10961),this.mirroringShapeCharacters.setValue(10963,10964),this.mirroringShapeCharacters.setValue(10964,10963),this.mirroringShapeCharacters.setValue(10965,10966),this.mirroringShapeCharacters.setValue(10966,10965),this.mirroringShapeCharacters.setValue(10974,8870),this.mirroringShapeCharacters.setValue(10979,8873),this.mirroringShapeCharacters.setValue(10980,8872),this.mirroringShapeCharacters.setValue(10981,8875),this.mirroringShapeCharacters.setValue(10988,10989),this.mirroringShapeCharacters.setValue(10989,10988),this.mirroringShapeCharacters.setValue(10999,11e3),this.mirroringShapeCharacters.setValue(11e3,10999),this.mirroringShapeCharacters.setValue(11001,11002),this.mirroringShapeCharacters.setValue(11002,11001),this.mirroringShapeCharacters.setValue(12296,12297),this.mirroringShapeCharacters.setValue(12297,12296),this.mirroringShapeCharacters.setValue(12298,12299),this.mirroringShapeCharacters.setValue(12299,12298),this.mirroringShapeCharacters.setValue(12300,12301),this.mirroringShapeCharacters.setValue(12301,12300),this.mirroringShapeCharacters.setValue(12302,12303),this.mirroringShapeCharacters.setValue(12303,12302),this.mirroringShapeCharacters.setValue(12304,12305),this.mirroringShapeCharacters.setValue(12305,12304),this.mirroringShapeCharacters.setValue(12308,12309),this.mirroringShapeCharacters.setValue(12309,12308),this.mirroringShapeCharacters.setValue(12310,12311),this.mirroringShapeCharacters.setValue(12311,12310),this.mirroringShapeCharacters.setValue(12312,12313),this.mirroringShapeCharacters.setValue(12313,12312),this.mirroringShapeCharacters.setValue(12314,12315),this.mirroringShapeCharacters.setValue(12315,12314),this.mirroringShapeCharacters.setValue(65288,65289),this.mirroringShapeCharacters.setValue(65289,65288),this.mirroringShapeCharacters.setValue(65308,65310),this.mirroringShapeCharacters.setValue(65310,65308),this.mirroringShapeCharacters.setValue(65339,65341),this.mirroringShapeCharacters.setValue(65341,65339),this.mirroringShapeCharacters.setValue(65371,65373),this.mirroringShapeCharacters.setValue(65373,65371),this.mirroringShapeCharacters.setValue(65375,65376),this.mirroringShapeCharacters.setValue(65376,65375),this.mirroringShapeCharacters.setValue(65378,65379),this.mirroringShapeCharacters.setValue(65379,65378)},t}(),Aa=function(){function t(){this.types=[],this.textOrder=-1,this.rtlCharacterTypes=new Array(65536),this.L=0,this.LRE=1,this.LRO=2,this.R=3,this.AL=4,this.RLE=5,this.RLO=6,this.PDF=7,this.EN=8,this.ES=9,this.ET=10,this.AN=11,this.CS=12,this.NSM=13,this.BN=14,this.B=15,this.S=16,this.WS=17,this.ON=18,this.charTypes=[this.L,this.EN,this.BN,this.ES,this.ES,this.S,this.ET,this.ET,this.B,this.AN,this.AN,this.S,this.CS,this.CS,this.WS,this.NSM,this.NSM,this.B,this.BN,27,this.BN,28,30,this.B,31,31,this.S,32,32,this.WS,33,34,this.ON,35,37,this.ET,38,42,this.ON,43,43,this.ET,44,44,this.CS,45,45,this.ET,46,46,this.CS,47,47,this.CS,48,57,this.EN,58,58,this.CS,59,64,this.ON,65,90,this.L,91,96,this.ON,97,122,this.L,123,126,this.ON,127,132,this.BN,133,133,this.B,134,159,this.BN,160,160,this.CS,161,161,this.ON,162,165,this.ET,166,169,this.ON,170,170,this.L,171,175,this.ON,176,177,this.ET,178,179,this.EN,180,180,this.ON,181,181,this.L,182,184,this.ON,185,185,this.EN,186,186,this.L,187,191,this.ON,192,214,this.L,215,215,this.ON,216,246,this.L,247,247,this.ON,248,696,this.L,697,698,this.ON,699,705,this.L,706,719,this.ON,720,721,this.L,722,735,this.ON,736,740,this.L,741,749,this.ON,750,750,this.L,751,767,this.ON,768,855,this.NSM,856,860,this.L,861,879,this.NSM,880,883,this.L,884,885,this.ON,886,893,this.L,894,894,this.ON,895,899,this.L,900,901,this.ON,902,902,this.L,903,903,this.ON,904,1013,this.L,1014,1014,this.ON,1015,1154,this.L,1155,1158,this.NSM,1159,1159,this.L,1160,1161,this.NSM,1162,1417,this.L,1418,1418,this.ON,1419,1424,this.L,1425,1441,this.NSM,1442,1442,this.L,1443,1465,this.NSM,1466,1466,this.L,1467,1469,this.NSM,1470,1470,this.R,1471,1471,this.NSM,1472,1472,this.R,1473,1474,this.NSM,1475,1475,this.R,1476,1476,this.NSM,1477,1487,this.L,1488,1514,this.R,1515,1519,this.L,1520,1524,this.R,1525,1535,this.L,1536,1539,this.AL,1540,1547,this.L,1548,1548,this.CS,1549,1549,this.AL,1550,1551,this.ON,1552,1557,this.NSM,1558,1562,this.L,1563,1563,this.AL,1564,1566,this.L,1567,1567,this.AL,1568,1568,this.L,1569,1594,this.AL,1595,1599,this.L,1600,1610,this.AL,1611,1624,this.NSM,1625,1631,this.L,1632,1641,this.AN,1642,1642,this.ET,1643,1644,this.AN,1645,1647,this.AL,1648,1648,this.NSM,1649,1749,this.AL,1750,1756,this.NSM,1757,1757,this.AL,1758,1764,this.NSM,1765,1766,this.AL,1767,1768,this.NSM,1769,1769,this.ON,1770,1773,this.NSM,1774,1775,this.AL,1776,1785,this.EN,1786,1805,this.AL,1806,1806,this.L,1807,1807,this.BN,1808,1808,this.AL,1809,1809,this.NSM,1810,1839,this.AL,1840,1866,this.NSM,1867,1868,this.L,1869,1871,this.AL,1872,1919,this.L,1920,1957,this.AL,1958,1968,this.NSM,1969,1969,this.AL,1970,2304,this.L,2305,2306,this.NSM,2307,2363,this.L,2364,2364,this.NSM,2365,2368,this.L,2369,2376,this.NSM,2377,2380,this.L,2381,2381,this.NSM,2382,2384,this.L,2385,2388,this.NSM,2389,2401,this.L,2402,2403,this.NSM,2404,2432,this.L,2433,2433,this.NSM,2434,2491,this.L,2492,2492,this.NSM,2493,2496,this.L,2497,2500,this.NSM,2501,2508,this.L,2509,2509,this.NSM,2510,2529,this.L,2530,2531,this.NSM,2532,2545,this.L,2546,2547,this.ET,2548,2560,this.L,2561,2562,this.NSM,2563,2619,this.L,2620,2620,this.NSM,2621,2624,this.L,2625,2626,this.NSM,2627,2630,this.L,2631,2632,this.NSM,2633,2634,this.L,2635,2637,this.NSM,2638,2671,this.L,2672,2673,this.NSM,2674,2688,this.L,2689,2690,this.NSM,2691,2747,this.L,2748,2748,this.NSM,2749,2752,this.L,2753,2757,this.NSM,2758,2758,this.L,2759,2760,this.NSM,2761,2764,this.L,2765,2765,this.NSM,2766,2785,this.L,2786,2787,this.NSM,2788,2800,this.L,2801,2801,this.ET,2802,2816,this.L,2817,2817,this.NSM,2818,2875,this.L,2876,2876,this.NSM,2877,2878,this.L,2879,2879,this.NSM,2880,2880,this.L,2881,2883,this.NSM,2884,2892,this.L,2893,2893,this.NSM,2894,2901,this.L,2902,2902,this.NSM,2903,2945,this.L,2946,2946,this.NSM,2947,3007,this.L,3008,3008,this.NSM,3009,3020,this.L,3021,3021,this.NSM,3022,3058,this.L,3059,3064,this.ON,3065,3065,this.ET,3066,3066,this.ON,3067,3133,this.L,3134,3136,this.NSM,3137,3141,this.L,3142,3144,this.NSM,3145,3145,this.L,3146,3149,this.NSM,3150,3156,this.L,3157,3158,this.NSM,3159,3259,this.L,3260,3260,this.NSM,3261,3275,this.L,3276,3277,this.NSM,3278,3392,this.L,3393,3395,this.NSM,3396,3404,this.L,3405,3405,this.NSM,3406,3529,this.L,3530,3530,this.NSM,3531,3537,this.L,3538,3540,this.NSM,3541,3541,this.L,3542,3542,this.NSM,3543,3632,this.L,3633,3633,this.NSM,3634,3635,this.L,3636,3642,this.NSM,3643,3646,this.L,3647,3647,this.ET,3648,3654,this.L,3655,3662,this.NSM,3663,3760,this.L,3761,3761,this.NSM,3762,3763,this.L,3764,3769,this.NSM,3770,3770,this.L,3771,3772,this.NSM,3773,3783,this.L,3784,3789,this.NSM,3790,3863,this.L,3864,3865,this.NSM,3866,3892,this.L,3893,3893,this.NSM,3894,3894,this.L,3895,3895,this.NSM,3896,3896,this.L,3897,3897,this.NSM,3898,3901,this.ON,3902,3952,this.L,3953,3966,this.NSM,3967,3967,this.L,3968,3972,this.NSM,3973,3973,this.L,3974,3975,this.NSM,3976,3983,this.L,3984,3991,this.NSM,3992,3992,this.L,3993,4028,this.NSM,4029,4037,this.L,4038,4038,this.NSM,4039,4140,this.L,4141,4144,this.NSM,4145,4145,this.L,4146,4146,this.NSM,4147,4149,this.L,4150,4151,this.NSM,4152,4152,this.L,4153,4153,this.NSM,4154,4183,this.L,4184,4185,this.NSM,4186,5759,this.L,5760,5760,this.WS,5761,5786,this.L,5787,5788,this.ON,5789,5905,this.L,5906,5908,this.NSM,5909,5937,this.L,5938,5940,this.NSM,5941,5969,this.L,5970,5971,this.NSM,5972,6001,this.L,6002,6003,this.NSM,6004,6070,this.L,6071,6077,this.NSM,6078,6085,this.L,6086,6086,this.NSM,6087,6088,this.L,6089,6099,this.NSM,6100,6106,this.L,6107,6107,this.ET,6108,6108,this.L,6109,6109,this.NSM,6110,6127,this.L,6128,6137,this.ON,6138,6143,this.L,6144,6154,this.ON,6155,6157,this.NSM,6158,6158,this.WS,6159,6312,this.L,6313,6313,this.NSM,6314,6431,this.L,6432,6434,this.NSM,6435,6438,this.L,6439,6443,this.NSM,6444,6449,this.L,6450,6450,this.NSM,6451,6456,this.L,6457,6459,this.NSM,6460,6463,this.L,6464,6464,this.ON,6465,6467,this.L,6468,6469,this.ON,6470,6623,this.L,6624,6655,this.ON,6656,8124,this.L,8125,8125,this.ON,8126,8126,this.L,8127,8129,this.ON,8130,8140,this.L,8141,8143,this.ON,8144,8156,this.L,8157,8159,this.ON,8160,8172,this.L,8173,8175,this.ON,8176,8188,this.L,8189,8190,this.ON,8191,8191,this.L,8192,8202,this.WS,8203,8205,this.BN,8206,8206,this.L,8207,8207,this.R,8208,8231,this.ON,8232,8232,this.WS,8233,8233,this.B,8234,8234,this.LRE,8235,8235,this.RLE,8236,8236,this.PDF,8237,8237,this.LRO,8238,8238,this.RLO,8239,8239,this.WS,8240,8244,this.ET,8245,8276,this.ON,8277,8278,this.L,8279,8279,this.ON,8280,8286,this.L,8287,8287,this.WS,8288,8291,this.BN,8292,8297,this.L,8298,8303,this.BN,8304,8304,this.EN,8305,8307,this.L,8308,8313,this.EN,8314,8315,this.ET,8316,8318,this.ON,8319,8319,this.L,8320,8329,this.EN,8330,8331,this.ET,8332,8334,this.ON,8335,8351,this.L,8352,8369,this.ET,8370,8399,this.L,8400,8426,this.NSM,8427,8447,this.L,8448,8449,this.ON,8450,8450,this.L,8451,8454,this.ON,8455,8455,this.L,8456,8457,this.ON,8458,8467,this.L,8468,8468,this.ON,8469,8469,this.L,8470,8472,this.ON,8473,8477,this.L,8478,8483,this.ON,8484,8484,this.L,8485,8485,this.ON,8486,8486,this.L,8487,8487,this.ON,8488,8488,this.L,8489,8489,this.ON,8490,8493,this.L,8494,8494,this.ET,8495,8497,this.L,8498,8498,this.ON,8499,8505,this.L,8506,8507,this.ON,8508,8511,this.L,8512,8516,this.ON,8517,8521,this.L,8522,8523,this.ON,8524,8530,this.L,8531,8543,this.ON,8544,8591,this.L,8592,8721,this.ON,8722,8723,this.ET,8724,9013,this.ON,9014,9082,this.L,9083,9108,this.ON,9109,9109,this.L,9110,9168,this.ON,9169,9215,this.L,9216,9254,this.ON,9255,9279,this.L,9280,9290,this.ON,9291,9311,this.L,9312,9371,this.EN,9372,9449,this.L,9450,9450,this.EN,9451,9751,this.ON,9752,9752,this.L,9753,9853,this.ON,9854,9855,this.L,9856,9873,this.ON,9874,9887,this.L,9888,9889,this.ON,9890,9984,this.L,9985,9988,this.ON,9989,9989,this.L,9990,9993,this.ON,9994,9995,this.L,9996,10023,this.ON,10024,10024,this.L,10025,10059,this.ON,10060,10060,this.L,10061,10061,this.ON,10062,10062,this.L,10063,10066,this.ON,10067,10069,this.L,10070,10070,this.ON,10071,10071,this.L,10072,10078,this.ON,10079,10080,this.L,10081,10132,this.ON,10133,10135,this.L,10136,10159,this.ON,10160,10160,this.L,10161,10174,this.ON,10175,10191,this.L,10192,10219,this.ON,10220,10223,this.L,10224,11021,this.ON,11022,11903,this.L,11904,11929,this.ON,11930,11930,this.L,11931,12019,this.ON,12020,12031,this.L,12032,12245,this.ON,12246,12271,this.L,12272,12283,this.ON,12284,12287,this.L,12288,12288,this.WS,12289,12292,this.ON,12293,12295,this.L,12296,12320,this.ON,12321,12329,this.L,12330,12335,this.NSM,12336,12336,this.ON,12337,12341,this.L,12342,12343,this.ON,12344,12348,this.L,12349,12351,this.ON,12352,12440,this.L,12441,12442,this.NSM,12443,12444,this.ON,12445,12447,this.L,12448,12448,this.ON,12449,12538,this.L,12539,12539,this.ON,12540,12828,this.L,12829,12830,this.ON,12831,12879,this.L,12880,12895,this.ON,12896,12923,this.L,12924,12925,this.ON,12926,12976,this.L,12977,12991,this.ON,12992,13003,this.L,13004,13007,this.ON,13008,13174,this.L,13175,13178,this.ON,13179,13277,this.L,13278,13279,this.ON,13280,13310,this.L,13311,13311,this.ON,13312,19903,this.L,19904,19967,this.ON,19968,42127,this.L,42128,42182,this.ON,42183,64284,this.L,64285,64285,this.R,64286,64286,this.NSM,64287,64296,this.R,64297,64297,this.ET,64298,64310,this.R,64311,64311,this.L,64312,64316,this.R,64317,64317,this.L,64318,64318,this.R,64319,64319,this.L,64320,64321,this.R,64322,64322,this.L,64323,64324,this.R,64325,64325,this.L,64326,64335,this.R,64336,64433,this.AL,64434,64466,this.L,64467,64829,this.AL,64830,64831,this.ON,64832,64847,this.L,64848,64911,this.AL,64912,64913,this.L,64914,64967,this.AL,64968,65007,this.L,65008,65020,this.AL,65021,65021,this.ON,65022,65023,this.L,65024,65039,this.NSM,65040,65055,this.L,65056,65059,this.NSM,65060,65071,this.L,65072,65103,this.ON,65104,65104,this.CS,65105,65105,this.ON,65106,65106,this.CS,65107,65107,this.L,65108,65108,this.ON,65109,65109,this.CS,65110,65118,this.ON,65119,65119,this.ET,65120,65121,this.ON,65122,65123,this.ET,65124,65126,this.ON,65127,65127,this.L,65128,65128,this.ON,65129,65130,this.ET,65131,65131,this.ON,65132,65135,this.L,65136,65140,this.AL,65141,65141,this.L,65142,65276,this.AL,65277,65278,this.L,65279,65279,this.BN,65280,65280,this.L,65281,65282,this.ON,65283,65285,this.ET,65286,65290,this.ON,65291,65291,this.ET,65292,65292,this.CS,65293,65293,this.ET,65294,65294,this.CS,65295,65295,this.ES,65296,65305,this.EN,65306,65306,this.CS,65307,65312,this.ON,65313,65338,this.L,65339,65344,this.ON,65345,65370,this.L,65371,65381,this.ON,65382,65503,this.L,65504,65505,this.ET,65506,65508,this.ON,65509,65510,this.ET,65511,65511,this.L,65512,65518,this.ON,65519,65528,this.L,65529,65531,this.BN,65532,65533,this.ON,65534,65535,this.L];for(var t=0;t<this.charTypes.length;++t)for(var e=this.charTypes[t],i=this.charTypes[++t],r=this.charTypes[++t];e<=i;)this.rtlCharacterTypes[e++]=r}return t.prototype.getVisualOrder=function(t,e){this.types=this.getCharacterCode(t),this.textOrder=e?this.LRE:this.L,this.doVisualOrder();for(var i=[],r=0;r<this.levels.length;r++)i[r]=this.levels[r];return i},t.prototype.getCharacterCode=function(t){for(var e=[],i=0;i<t.length;i++)e[i]=this.rtlCharacterTypes[t[i].charCodeAt(0)];return e},t.prototype.setDefaultLevels=function(){for(var t=0;t<this.length;t++)this.levels[t]=this.textOrder},t.prototype.setLevels=function(){this.setDefaultLevels();for(var t=0;t<this.length;++t){var e=this.levels[t];0!=(128&e)&&(e&=127,this.result[t]=0==(1&e)?this.L:this.R),this.levels[t]=e}},t.prototype.updateLevels=function(t,e,i){if(0==(1&e))for(var r=t;r<i;++r)this.result[r]===this.R?this.levels[r]+=1:this.result[r]!==this.L&&(this.levels[r]+=2);else for(r=t;r<i;++r)this.result[r]!==this.R&&(this.levels[r]+=1)},t.prototype.doVisualOrder=function(){this.length=this.types.length,this.result=this.types,this.levels=[],this.setLevels(),this.length=this.getEmbeddedCharactersLength();for(var t=this.textOrder,e=0;e<this.length;){for(var i=this.levels[e],r=0==(1&Math.max(t,i))?this.L:this.R,n=e+1;n<this.length&&this.levels[n]===i;)++n;var o=n<this.length?this.levels[n]:this.textOrder,s=0==(1&Math.max(o,i))?this.L:this.R;this.checkNSM(e,n,i,r,s),this.updateLevels(e,i,n),t=i,e=n}this.checkEmbeddedCharacters(this.length)},t.prototype.getEmbeddedCharactersLength=function(){for(var t=0,e=0;e<this.length;++e)this.types[e]!==this.LRE&&this.types[e]!==this.RLE&&this.types[e]!==this.LRO&&this.types[e]!==this.RLO&&this.types[e]!==this.PDF&&this.types[e]!==this.BN&&(this.result[t]=this.result[e],this.levels[t]=this.levels[e],t++);return t},t.prototype.checkEmbeddedCharacters=function(t){for(var e=this.types.length-1;e>=0;--e)this.types[e]===this.LRE||this.types[e]===this.RLE||this.types[e]===this.LRO||this.types[e]===this.RLO||this.types[e]===this.PDF||this.types[e]===this.BN?(this.result[e]=this.types[e],this.levels[e]=-1):(t-=1,this.result[e]=this.result[t],this.levels[e]=this.levels[t]);for(e=0;e<this.types.length;e++)-1===this.levels[e]&&(this.levels[e]=0===e?this.textOrder:this.levels[e-1])},t.prototype.checkNSM=function(t,e,i,r,n){for(var o=r,s=t;s<e;++s)this.result[s]===this.NSM?this.result[s]=o:o=this.result[s];this.checkEuropeanDigits(t,e,i,r,n)},t.prototype.checkEuropeanDigits=function(t,e,i,r,n){for(var o=t;o<e;++o)if(this.result[o]===this.EN)for(var s=o-1;s>=t;--s)if(this.result[s]===this.L||this.result[s]===this.R||this.result[s]===this.AL){this.result[s]===this.AL&&(this.result[o]=this.AN);break}this.checkArabicCharacters(t,e,i,r,n)},t.prototype.checkArabicCharacters=function(t,e,i,r,n){for(var o=t;o<e;++o)this.result[o]===this.AL&&(this.result[o]=this.R);this.checkEuropeanNumberSeparator(t,e,i,r,n)},t.prototype.checkEuropeanNumberSeparator=function(t,e,i,r,n){for(var o=t+1;o<e-1;++o)if(this.result[o]===this.ES||this.result[o]===this.CS){var s=this.result[o-1],a=this.result[o+1];s===this.EN&&a===this.EN?this.result[o]=this.EN:this.result[o]===this.CS&&s===this.AN&&a===this.AN&&(this.result[o]=this.AN)}this.checkEuropeanNumberTerminator(t,e,i,r,n)},t.prototype.checkEuropeanNumberTerminator=function(t,e,i,r,n){for(var o=t;o<e;++o)if(this.result[o]===this.ET){var s=o,a=[];a.push(this.ET);var l=this.getLength(s,e,a),h=s===t?r:this.result[s-1];if(h!==this.EN&&(h=l===e?n:this.result[l]),h===this.EN)for(var u=s;u<l;++u)this.result[u]=this.EN;o=l}this.checkOtherNeutrals(t,e,i,r,n)},t.prototype.checkOtherNeutrals=function(t,e,i,r,n){for(var o=t;o<e;++o)this.result[o]!==this.ES&&this.result[o]!==this.ET&&this.result[o]!==this.CS||(this.result[o]=this.ON);this.checkOtherCharacters(t,e,i,r,n)},t.prototype.checkOtherCharacters=function(t,e,i,r,n){for(var o=t;o<e;++o)if(this.result[o]===this.EN){for(var s=r,a=o-1;a>=t;--a)if(this.result[a]===this.L||this.result[a]===this.R){s=this.result[a];break}s===this.L&&(this.result[o]=this.L)}this.checkCommanCharacters(t,e,i,r,n)},t.prototype.getLength=function(t,e,i){for(--t;++t<e;){for(var r=this.result[t],n=0;n<i.length;++n)r===i[n]&&(t=this.getLength(++t,e,i));return t}return e},t.prototype.checkCommanCharacters=function(t,e,i,r,n){for(var o=t;o<e;++o)if(this.result[o]===this.WS||this.result[o]===this.ON||this.result[o]===this.B||this.result[o]===this.S){var s=o,a=[this.B,this.S,this.WS,this.ON],l=this.getLength(s,e,a),h=0,u=0,c=0;s===t?h=r:(h=this.result[s-1])===this.AN?h=this.R:h===this.EN&&(h=this.R),l===e?u=n:(u=this.result[l])===this.AN?u=this.R:u===this.EN&&(u=this.R),c=h===u?h:0==(1&i)?this.L:this.R;for(var p=s;p<l;++p)this.result[p]=c;o=l}},t}(),Na=function(){function t(){this.openBracket="(",this.closeBracket=")"}return t.prototype.layout=function(t,e,i,r,n){if(null==t)throw new Error("ArgumentNullException : line");if(null==e)throw new Error("ArgumentNullException : font");var o=[];return e.Unicode?o=this.customLayout(t,i,n,e,r):(o=[])[0]=t,o},t.prototype.splitLayout=function(t,e,i,r,n){if(null==t)throw new Error("ArgumentNullException : line");if(null==e)throw new Error("ArgumentNullException : font");return this.customSplitLayout(t,e,i,r,n)},t.prototype.getGlyphIndex=function(t,e,i,r,n){if(null==t)throw new Error("ArgumentNullException : line");if(null==e)throw new Error("ArgumentNullException : font");if(r=null,0===t.length)return{success:!1,glyphs:r};var o=(new ja).shape(t,0),s=e.fontInternal.ttfReader;r=new Uint16Array(o.length);for(var a=0,l=0,h=o.length;l<h;l++){var u=o[l],c=s.getGlyph(u);null!==c&&void 0!==c&&(r[a++]=c.index)}return{success:!0,glyphs:r}},t.prototype.customLayout=function(t,e,i,r,n){if(null===n||void 0===n){if(null==t)throw new Error("ArgumentNullException : line");var o=null;if(null!==i&&void 0!==i&&i.textDirection!==Yo.None){o=(new Ra).getLogicalToVisualString(t,e)}return o}if(null==t)throw new Error("ArgumentNullException : line");if(null==r)throw new Error("ArgumentNullException : font");var s=null;if(null!==i&&void 0!==i&&i.textDirection!==Yo.None){var a=(new ja).shape(t,0);s=this.customLayout(a,e,i)}o=[];if(n){for(var l=s.split(""),h=l.length,u=0;u<h;u++)l[u]=this.addChars(r,l[u]);o=l}else(o=[])[0]=this.addChars(r,s);return o},t.prototype.addChars=function(t,e){var i=e;if(null==t)throw new Error("ArgumentNullException : font");if(null==i)throw new Error("ArgumentNullException : line");var r=i,n=t.fontInternal.ttfReader;t.setSymbols(r),r=n.convertString(r);var o=ko.toUnicodeArray(r,!1);return r=ko.byteToString(o)},t.prototype.customSplitLayout=function(t,e,i,r,n){if(null==t)throw new Error("ArgumentNullException : line");if(null==e)throw new Error("ArgumentNullException : font");return this.customLayout(t,i,n).split("")},t}();!function(t){t[t.Paginate=0]="Paginate",t[t.OnePage=1]="OnePage"}(ra||(ra={}));var Fa;!function(t){t[t.FitPage=0]="FitPage",t[t.FitElement=1]="FitElement",t[t.FitColumnsToPage=2]="FitColumnsToPage"}(Fa||(Fa={}));var Va;!function(t){t[t.Start=0]="Start",t[t.Line=1]="Line",t[t.Bezier3=3]="Bezier3",t[t.Bezier=3]="Bezier",t[t.PathTypeMask=7]="PathTypeMask",t[t.DashMode=16]="DashMode",t[t.PathMarker=32]="PathMarker",t[t.CloseSubpath=128]="CloseSubpath"}(Va||(Va={}));var za,Ga=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),_a=function(t){function e(e){var i=t.call(this)||this;return i.mbackground=new Jo(255,255,255),i.mbStroking=!1,i.mfunction=null,i.dictionaryProperties=new to,i.mpatternDictionary=new eo,i.mpatternDictionary.items.setValue(i.dictionaryProperties.type,new Qn(i.dictionaryProperties.pattern)),i.mpatternDictionary.items.setValue(i.dictionaryProperties.patternType,new lo(2)),i.shading=e,i.colorSpace=Wo.Rgb,i}return Ga(e,t),Object.defineProperty(e.prototype,"background",{get:function(){return this.mbackground},set:function(t){this.mbackground=t;var e=this.shading;t.isEmpty?e.remove(this.dictionaryProperties.background):e.items.setValue(this.dictionaryProperties.background,t.toArray(this.colorSpace))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"antiAlias",{get:function(){return this.shading.items.getValue(this.dictionaryProperties.antiAlias).value},set:function(t){var e=this.shading,i=e.items.getValue(this.dictionaryProperties.antiAlias);null==i&&void 0===i?(i=new ia(t),e.items.setValue(this.dictionaryProperties.antiAlias,i)):i.value=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"function",{get:function(){return this.mfunction},set:function(t){this.mfunction=t,null!=t&&void 0!==t?this.shading.items.setValue(this.dictionaryProperties.function,new jo(this.mfunction)):this.shading.remove(this.dictionaryProperties.function)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bBox",{get:function(){return this.shading.items.getValue(this.dictionaryProperties.bBox)},set:function(t){var e=this.shading;null==t&&void 0===t?e.remove(this.dictionaryProperties.bBox):e.items.setValue(this.dictionaryProperties.bBox,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorSpace",{get:function(){return this.mcolorSpace},set:function(t){var e=this.shading.items.getValue(this.dictionaryProperties.colorSpace);if(t!==this.mcolorSpace||null==e){this.mcolorSpace=t;var i=this.colorSpaceToDeviceName(t);this.shading.items.setValue(this.dictionaryProperties.colorSpace,new Qn(i))}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stroking",{get:function(){return this.mbStroking},set:function(t){this.mbStroking=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"patternDictionary",{get:function(){return null==this.mpatternDictionary&&(this.mpatternDictionary=new eo),this.mpatternDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shading",{get:function(){return this.mshading},set:function(t){if(null==t)throw new Error("ArgumentNullException : Shading");t!==this.mshading&&(this.mshading=t,this.patternDictionary.items.setValue(this.dictionaryProperties.shading,new jo(this.mshading)))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"matrix",{get:function(){return this.mmatrix},set:function(t){if(null==t)throw new Error("ArgumentNullException : Matrix");if(t!==this.mmatrix){this.mmatrix=t.clone();var e=new ho(this.mmatrix.matrix.elements);this.mpatternDictionary.items.setValue(this.dictionaryProperties.matrix,e)}},enumerable:!0,configurable:!0}),e.prototype.monitorChanges=function(t,i,r,n,o){var s=!1;if(t instanceof e){this.colorSpace!==o&&(this.colorSpace=o,this.resetFunction()),i.setColorSpace("Pattern",this.mbStroking);var a=r.getResources().getName(this);i.setColourWithPattern(null,a,this.mbStroking),s=!0}return s},e.prototype.resetChanges=function(t){},e.prototype.colorSpaceToDeviceName=function(t){var e;switch(t){case Wo.Rgb:e="DeviceRGB"}return e},e.prototype.resetPatternDictionary=function(t){this.mpatternDictionary=t},e.prototype.cloneAntiAliasingValue=function(t){if(null==t)throw new Error("ArgumentNullException : brush");var e=this.shading.items.getValue(this.dictionaryProperties.antiAlias);null!=e&&t.shading.items.setValue(this.dictionaryProperties.antiAlias,new ia(e.value))},e.prototype.cloneBackgroundValue=function(t){var e=this.background;e.isEmpty||(t.background=e)},Object.defineProperty(e.prototype,"element",{get:function(){return this.patternDictionary},enumerable:!0,configurable:!0}),e}(es),Ha=function(){function t(t,e){if(this.dictionaryProperties=new to,this.writeTransformation=!0,void 0===t);else if(t instanceof Qo&&void 0===e){this.content=new Lo;var i=new Qo(t.width,t.height);this.setSize(i),this.initialize()}else this.content=new Lo,this.setSize(new Qo(t,e)),this.initialize()}return Object.defineProperty(t.prototype,"size",{get:function(){return this.templateSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.size.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.size.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphics",{get:function(){if(null==this.pdfGraphics||void 0===this.pdfGraphics){var t=new Ja(this),e=new $a(this.size,t,this.content);this.pdfGraphics=e,this.pdfGraphics.initializeCoordinates()}return this.pdfGraphics},enumerable:!0,configurable:!0}),t.prototype.getResources=function(){return null==this.resources&&(this.resources=new Ua,this.content.items.setValue(this.dictionaryProperties.resources,this.resources)),this.resources},t.prototype.initialize=function(){this.addType(),this.addSubType()},t.prototype.addType=function(){var t=new Qn(this.dictionaryProperties.xObject);this.content.items.setValue(this.dictionaryProperties.type,t)},t.prototype.addSubType=function(){var t=new Qn(this.dictionaryProperties.form);this.content.items.setValue(this.dictionaryProperties.subtype,t)},t.prototype.reset=function(t){void 0===t?(null!=this.resources&&(this.resources=null,this.content.remove(this.dictionaryProperties.resources)),null!=this.graphics&&this.graphics.reset(this.size)):(this.setSize(t),this.reset())},t.prototype.setSize=function(t){var e=new Zo(new Xo(0,0),t),i=ho.fromRectangle(e);this.content.items.setValue(this.dictionaryProperties.bBox,i),this.templateSize=t},Object.defineProperty(t.prototype,"element",{get:function(){return this.content},enumerable:!0,configurable:!0}),t}(),Wa=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ua=function(t){function e(e){var i=t.call(this,e)||this;return i.properties=new eo,i}return Wa(e,t),Object.defineProperty(e.prototype,"names",{get:function(){return this.getNames()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"document",{get:function(){return this.pdfDocument},set:function(t){this.pdfDocument=t},enumerable:!0,configurable:!0}),e.prototype.getName=function(t){var e=t.element,i=null;if(this.names.containsKey(e)&&(i=this.names.getValue(e)),null==i){var r=this.generateName();i=new Qn(r),this.names.setValue(e,i),t instanceof Cs?this.add(t,i):t instanceof Ha?this.add(t,i):t instanceof _a||t instanceof Ya?this.add(t,i):t instanceof $s?this.add(t,i):(t instanceof sa||t instanceof la)&&this.add(t,i)}return i},e.prototype.getNames=function(){null==this.pdfNames&&(this.pdfNames=new Ys);var t=this.items.getValue(this.dictionaryProperties.font);if(null!=t){Es.dereference(t)}return this.pdfNames},e.prototype.requireProcedureSet=function(t){if(null==t)throw new Error("ArgumentNullException:procedureSetName");var e=this.items.getValue(this.dictionaryProperties.procset);null==e&&(e=new ho,this.items.setValue(this.dictionaryProperties.procset,e));var i=new Qn(t);e.contains(i)||e.add(i)},e.prototype.removeFont=function(t){for(var e=null,i=this.pdfNames.keys(),r=0;r<this.pdfNames.size();r++)if(this.pdfNames.getValue(i[r])===new Qn(t)){e=i[r];break}null!=e&&this.pdfNames.remove(e)},e.prototype.generateName=function(){return qa.getNewGuidString()},e.prototype.add=function(t,e){if(t instanceof Cs){var i=null,r=this.items.getValue(this.dictionaryProperties.font);if(null!=r){var n=r;i=r,i=r}else i=new eo,this.items.setValue(this.dictionaryProperties.font,i);i.items.setValue(e.value,new jo(t.element))}else if(t instanceof Ha){var o=void 0;null==(o=this.items.getValue(this.dictionaryProperties.xObject))&&(o=new eo,this.items.setValue(this.dictionaryProperties.xObject,o)),o.items.setValue(e.value,new jo(t.element))}else if(t instanceof es){if(t instanceof _a||t instanceof Ya){if(null!=(a=t.element)){var s=this.items.getValue(this.dictionaryProperties.pattern);null==s&&(s=new eo,this.items.setValue(this.dictionaryProperties.pattern,s)),s.items.setValue(e.value,new jo(a))}}}else if(t instanceof $s){var a=t.element,l=null;null==(l=this.items.getValue(this.dictionaryProperties.extGState))&&(l=new eo,this.items.setValue(this.dictionaryProperties.extGState,l)),l.items.setValue(e.value,new jo(a))}else{o=this.Dictionary.items.getValue(this.dictionaryProperties.xObject);var h=void 0;void 0!==this.pdfDocument&&(h=this.pdfDocument.sections.element.items.getValue(this.dictionaryProperties.resources).items.getValue(this.dictionaryProperties.xObject));this.Dictionary.items.values();var u=!1,c=void 0;if(void 0===this.pdfDocument||void 0!==typeof h&&null!=h){if(void 0!==this.pdfDocument)for(var p=h.items.values(),d=0;d<p.length;d++)void 0!==p[d]&&void 0!==p[d].element&&p[d].element.data[0]===t.element.data[0]&&(c=p[d],u=!0)}else h=new eo,this.pdfDocument.sections.element.items.getValue(this.dictionaryProperties.resources).items.setValue(this.dictionaryProperties.xObject,h);if(null==o&&(o=new eo,this.Dictionary.items.setValue(this.dictionaryProperties.xObject,o)),u&&void 0!==c)o.items.setValue(e.value,c);else{n=new jo(t.element);o.items.setValue(e.value,n),void 0!==this.pdfDocument&&h.items.setValue(e.value,n)}}},e}(eo),qa=function(){function t(){}return t.getNewGuidString=function(){return"aaaaaaaa-aaaa-4aaa-baaa-aaaaaaaaaaaa".replace(/[ab]/g,function(t){var e=16*Math.random()|0;return("a"===t?e:3&e|8).toString(16)})},t}(),Ka=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ya=function(t){function e(e,i){var r=t.call(this)||this;r.mStroking=!1,r.mLocation=new Xo(0,0),r.mDictionaryProperties=new to;var n=null;return e instanceof ts?n=e:e instanceof Qo&&(n=new ts(0,0,e.width,e.height)),null!==i&&i instanceof sl&&(r.mPage=i),r.brushStream=new Lo,r.mResources=new Ua,r.brushStream.items.setValue(r.mDictionaryProperties.resources,r.mResources),r.setBox(n),r.setObligatoryFields(),null!==i&&i instanceof sl&&(r.mPage=i,r.graphics.colorSpace=i.document.colorSpace),r}return Ka(e,t),e.prototype.initialize=function(t,e,i,r){this.mPage=e,this.mLocation=i,this.mTransformationMatrix=r,this.tempBrushStream=this.brushStream,this.brushStream=new Lo;var n=new Ua;return this.brushStream.items.setValue(this.mDictionaryProperties.resources,n),this.setBox(t),this.setObligatoryFields(),this},Object.defineProperty(e.prototype,"location",{get:function(){return this.mLocation},set:function(t){this.mLocation=t},enumerable:!0,configurable:!0}),e.prototype.setObligatoryFields=function(){if(this.brushStream.items.setValue(this.mDictionaryProperties.patternType,new lo(1)),this.brushStream.items.setValue(this.mDictionaryProperties.paintType,new lo(1)),this.brushStream.items.setValue(this.mDictionaryProperties.tilingType,new lo(1)),this.brushStream.items.setValue(this.mDictionaryProperties.xStep,new lo(this.mBox.right-this.mBox.left)),this.brushStream.items.setValue(this.mDictionaryProperties.yStep,new lo(this.mBox.bottom-this.mBox.top)),null!=this.mPage&&null!=this.mLocation)if(null==this.mTransformationMatrix&&void 0===this.mTransformationMatrix){var t=this.mPage.size.height%this.rectangle.size.height-this.mLocation.y;this.brushStream.items.setValue(this.mDictionaryProperties.matrix,new ho([1,0,0,1,this.mLocation.x,t]))}else{t=0;var e=this.mTransformationMatrix.matrix.elements;t=this.mPage.size.height>this.rectangle.size.height?this.mTransformationMatrix.matrix.offsetY-this.mPage.size.height%this.rectangle.size.height:this.mPage.size.height%this.rectangle.size.height+this.mTransformationMatrix.matrix.offsetY,this.brushStream.items.setValue(this.mDictionaryProperties.matrix,new ho([e[0],e[1],e[2],e[3],e[4],t]))}},e.prototype.setBox=function(t){this.mBox=t;var e=new Zo(this.mBox.left,this.mBox.top,this.mBox.right,this.mBox.bottom);this.brushStream.items.setValue(this.mDictionaryProperties.bBox,ho.fromRectangle(e))},Object.defineProperty(e.prototype,"rectangle",{get:function(){return this.mBox},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.mBox.size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"graphics",{get:function(){if(null==this.mGraphics&&void 0===this.mGraphics){var t=new Ja(this),e=new $a(this.size,t,this.brushStream);this.mGraphics=e,this.mResources=this.getResources(),this.mGraphics.initializeCoordinates()}return this.mGraphics},enumerable:!0,configurable:!0}),e.prototype.getResources=function(){return this.mResources},Object.defineProperty(e.prototype,"stroking",{get:function(){return this.mStroking},set:function(t){this.mStroking=t},enumerable:!0,configurable:!0}),e.prototype.clone=function(){var t=this.initialize(this.rectangle,this.mPage,this.location,this.mTransformationMatrix);return null!=this.mTransformationMatrix&&null!=this.mTransformationMatrix.matrix&&t.brushStream.items.setValue(this.mDictionaryProperties.matrix,new ho(this.mTransformationMatrix.matrix.elements)),t.brushStream.data=this.tempBrushStream.data,t.mResources=new Ua(this.mResources),t.brushStream.items.setValue(this.mDictionaryProperties.resources,t.mResources),t},e.prototype.monitorChanges=function(t,i,r,n,o){var s=!1;if(t!==this){i.setColorSpace("Pattern",this.mStroking);var a=r.getResources().getName(this);i.setColourWithPattern(null,a,this.mStroking),s=!0}else if(t instanceof e){i.setColorSpace("Pattern",this.mStroking);var l=r.getResources().getName(this);i.setColourWithPattern(null,l,this.mStroking),s=!0}return s},e.prototype.resetChanges=function(t){},Object.defineProperty(e.prototype,"element",{get:function(){return this.brushStream},enumerable:!0,configurable:!0}),e}(es),$a=function(){function t(t,e,i){this.currentColorSpace=Wo.Rgb,this.previousTextRenderingMode=Vo.Fill,this.previousCharacterSpacing=0,this.previousWordSpacing=0,this.previousTextScaling=100,this.procedureSets=new Ks,this.isNormalRender=!0,this.isUseFontSize=!1,this.isItalic=!1,this.isEmfTextScaled=!1,this.isEmf=!1,this.isEmfPlus=!1,this.isBaselineFormat=!0,this.emfScalingFactor=new Qo(0,0),this.colorSpaceChanged=!1,this.dictionaryProperties=new to,this.isOverloadWithPosition=!1,this.isPointOverload=!1,this.currentColorSpaces=["RGB","CMYK","GrayScale","Indexed"],this.isImageOptimized=!1,this.graphicsState=[],this.istransparencySet=!1,this.internalAutomaticFields=null,this.startCutIndex=-1,this.getResources=e,this.canvasSize=t,this.pdfStreamWriter=i instanceof Hs?i:new Hs(i),this.initialize()}return Object.defineProperty(t.prototype,"stringLayoutResult",{get:function(){return this.pdfStringLayoutResult},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.canvasSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mediaBoxUpperRightBound",{get:function(){return void 0===this.internalMediaBoxUpperRightBound&&(this.internalMediaBoxUpperRightBound=0),this.internalMediaBoxUpperRightBound},set:function(t){this.internalMediaBoxUpperRightBound=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clientSize",{get:function(){return new Qo(this.clipBounds.width,this.clipBounds.height)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"colorSpace",{get:function(){return this.currentColorSpace},set:function(t){this.currentColorSpace=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"streamWriter",{get:function(){return this.pdfStreamWriter},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"matrix",{get:function(){return null==this.transformationMatrix&&(this.transformationMatrix=new Us),this.transformationMatrix},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layer",{get:function(){return this.pageLayer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"page",{get:function(){return this.pageLayer.page},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"automaticFields",{get:function(){return null!=this.internalAutomaticFields&&void 0!==this.internalAutomaticFields||(this.internalAutomaticFields=new Js),this.internalAutomaticFields},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){this.bStateSaved=!1,this.currentPen=null,this.currentBrush=null,this.currentFont=null,this.currentColorSpace=Wo.Rgb,this.bCSInitialized=!1,this.transformationMatrix=null,this.previousTextRenderingMode=-1,this.previousCharacterSpacing=-1,this.previousWordSpacing=-1,this.previousTextScaling=-100,this.currentStringFormat=null,this.clipBounds=new Zo(new Xo(0,0),this.size),this.getResources.getResources().requireProcedureSet(this.procedureSets.pdf)},t.prototype.drawPdfTemplate=function(t,e,i){if(void 0===i){if(null==t)throw Error("ArgumentNullException-template");this.drawPdfTemplate(t,e,t.size)}else{if(null==t)throw Error("ArgumentNullException-template");var r=t.width>0?i.width/t.width:1,n=t.height>0?i.height/t.height:1,o=!(1===r&&1===n),s=this.save(),a=new Us;null!=this.pageLayer&&this.getTranslateTransform(e.x,e.y+i.height,a),o&&this.getScaleTransform(r,n,a),this.pdfStreamWriter.modifyCtm(a);var l=this.getResources.getResources().getName(t);this.pdfStreamWriter.executeObject(l),this.restore(s);var h=t.graphics;if(null!=h)for(var u=0;u<h.automaticFields.automaticFields.length;u++){var c=h.automaticFields.automaticFields[u],p=new Xo(c.location.x+e.x,c.location.y+e.y),d=0==t.size.width?0:i.width/t.size.width,f=0==t.size.height?0:i.height/t.size.height;this.automaticFields.add(new ta(c.field,p,d,f)),this.page.dictionary.modify()}this.getResources.getResources().requireProcedureSet(this.procedureSets.imageB),this.getResources.getResources().requireProcedureSet(this.procedureSets.imageC),this.getResources.getResources().requireProcedureSet(this.procedureSets.imageI),this.getResources.getResources().requireProcedureSet(this.procedureSets.text)}},t.prototype.drawString=function(t,e,i,r,n,o,s,a,l){if("string"==typeof t&&e instanceof Cs&&(i instanceof Ws||null===i)&&(r instanceof es||null===r)&&"number"==typeof n&&"number"==typeof o&&(s instanceof ys||null===s)&&void 0===a)this.isOverloadWithPosition=!0,this.drawString(t,e,i,r,n,o,this.clientSize.width-n,0,s);else{var h=i,u=r,c=n,p=o,d=s,f=a,g=l,m=(new vs).layout(t,e,g,new Qo(d,f),this.isOverloadWithPosition,this.clientSize);if(!m.empty){var y=this.checkCorrectLayoutRectangle(m.actualSize,c,p,g);d<=0&&(c=y.x,d=y.width),f<=0&&(p=y.y,f=y.height),this.drawStringLayoutResult(m,e,h,u,new Zo(c,p,d,f),g),this.isEmfTextScaled=!1,this.emfScalingFactor=new Qo(0,0)}this.getResources.getResources().requireProcedureSet(this.procedureSets.text),this.isNormalRender=!0,this.pdfStringLayoutResult=m,this.isUseFontSize=!1}},t.prototype.drawLine=function(t,e,i,r,n){if(e instanceof Xo){var o=e,s=i;this.drawLine(t,o.x,o.y,s.x,s.y)}else{o=e,s=i;var a=r,l=n;this.stateControl(t,null,null);var h=this.streamWriter;h.beginPath(o,s),h.appendLineSegment(a,l),h.strokePath(),this.getResources.getResources().requireProcedureSet(this.procedureSets.pdf)}},t.prototype.drawRectangle=function(t,e,i,r,n,o){if(t instanceof Ws&&"number"==typeof e){var s=i;this.drawRectangle(t,null,e,s,r,n)}else if(t instanceof es&&"number"==typeof e){s=i;this.drawRectangle(null,t,e,s,r,n)}else{s=i;var a=r,l=n,h=o;if(e instanceof Ya){this.bCSInitialized=!1;var u=this.matrix.matrix.offsetX+s,c=void 0;c=null!=this.layer&&null!=this.layer.page?this.layer.page.size.height-this.matrix.matrix.offsetY+a:this.clientSize.height-this.matrix.matrix.offsetY+a,e.location=new Xo(u,c),e.graphics.colorSpace=this.colorSpace}else e instanceof _a&&(e.colorSpace=this.colorSpace);e instanceof rs&&e.color.isEmpty&&(e=null);var p=t,d=e;this.stateControl(p,d,null),this.streamWriter.appendRectangle(s,a,l,h),this.drawPathHelper(p,d,!1)}},t.prototype.drawPathHelper=function(t,e,i,r){if("boolean"==typeof i){var n=i;this.drawPathHelper(t,e,Ho.Winding,n)}else{var o=null!=t,s=null!=e,a=(n=i)===Ho.Alternate;o&&s?this.streamWriter.fillStrokePath(a):o||s?o?this.streamWriter.strokePath():this.streamWriter.fillPath(a):this.streamWriter.endPath()}},t.prototype.drawImage=function(t,e,i,r,n){if("number"==typeof e&&"number"==typeof i&&void 0===r){var o=t.physicalDimension;this.drawImage(t,e,i,o.width,o.height)}else{var s=e,a=i,l=n;t.save();var h=new Us;this.getTranslateTransform(s,a+l,h),this.getScaleTransform(r,n,h),this.pdfStreamWriter.write("q"),this.pdfStreamWriter.modifyCtm(h);var u=this.getResources.getResources();void 0!==this.pageLayer&&null!=this.page&&(u.document=this.page.document);var c=u.getName(t);void 0!==this.pageLayer&&this.page.setResources(u),this.pdfStreamWriter.executeObject(c),this.pdfStreamWriter.write(Zn.restoreState),this.pdfStreamWriter.write(Zn.newLine);var p=this.getResources.getResources();p.requireProcedureSet(this.procedureSets.imageB),p.requireProcedureSet(this.procedureSets.imageC),p.requireProcedureSet(this.procedureSets.imageI),p.requireProcedureSet(this.procedureSets.text)}},t.prototype.getLineBounds=function(t,e,i,r,n){var o;if(!e.empty&&t<e.lineCount&&t>=0){var s=e.lines[t],a=this.getTextVerticalAlignShift(e.actualSize.height,r.height,n)+r.y+e.lineHeight*t,l=s.width,h=this.getHorizontalAlignShift(l,r.width,n),u=this.getLineIndent(s,n,r,0===t);h+=this.rightToLeft(n)?0:u;var c=r.x+h,p=this.shouldJustify(s,r.width,n)?r.width-u:l-u,d=e.lineHeight;o=new Zo(c,a,p,d)}else o=new Zo(0,0,0,0);return o},t.prototype.checkCorrectLayoutRectangle=function(t,e,i,r){var n=new Zo(e,i,t.width,t.width);if(null!=r){switch(r.alignment){case Fo.Center:n.x-=n.width/2;break;case Fo.Right:n.x-=n.width}switch(r.lineAlignment){case No.Middle:n.y-=n.height/2;break;case No.Bottom:n.y-=n.height}}return n},t.prototype.setLayer=function(t){this.pageLayer=t;var e=t.page;null!=e&&void 0!==e&&(e.beginSave=this.pageSave)},t.prototype.pageSave=function(t){if(null!=t.graphics.automaticFields)for(var e=0;e<t.graphics.automaticFields.automaticFields.length;e++){var i=t.graphics.automaticFields.automaticFields[e];i.field.performDraw(t.graphics,i.location,i.scalingX,i.scalingY)}},t.prototype.drawStringLayoutResult=function(t,e,i,r,n,o){if(t.empty)throw new Error("ArgumentNullException:result");this.applyStringSettings(e,i,r,o,n);var s=null!=o?o.horizontalScalingFactor:100;s===this.previousTextScaling||this.isEmfTextScaled||(this.pdfStreamWriter.setTextScaling(s),this.previousTextScaling=s);var a=null==o||0===o.lineSpacing?e.height:o.lineSpacing+e.height,l=0;l=null!=o&&o.subSuperScript===as.SubScript?a-(e.height+e.metrics.getDescent(o)):a-e.metrics.getAscent(o),this.shift=l,this.pdfStreamWriter.startNextLine(n.x,n.y-l),this.pdfStreamWriter.setLeading(+a);for(var h=0,u="",c=0;c<t.lines.length;c++)if(h+=t.lineHeight,n.y+h>this.clientSize.height){this.startCutIndex=c;break}for(var p=this.startCutIndex;p<t.lines.length&&p>=0;p++)u+=t.lines[p].text;var d=new Zo(n.x,n.y,n.width,n.height);if(this.drawLayoutResult(t,e,o,n),this.underlineStrikeoutText(i,r,t,e,d,o),this.isEmfPlus=!1,this.isUseFontSize=!1,-1!==this.startCutIndex){this.getNextPage().graphics.drawString(u,e,i,r,n.x,0,n.width,0,o)}},t.prototype.getNextPage=function(){var t=this.currentPage.section,e=t.indexOf(this.currentPage);return e===t.count-1?t.add():t.getPages()[e+1]},t.prototype.setClip=function(t,e){void 0===e?this.setClip(t,Ho.Winding):(this.pdfStreamWriter.appendRectangle(t),this.pdfStreamWriter.clipPath(e===Ho.Alternate))},t.prototype.applyStringSettings=function(t,e,i,r,n){i instanceof Ya?(this.bCSInitialized=!1,i.graphics.colorSpace=this.colorSpace):i instanceof _a&&(this.bCSInitialized=!1,i.colorSpace=this.colorSpace);var o=this.getTextRenderingMode(e,i,r);this.stateControl(e,i,t,r),this.pdfStreamWriter.beginText(),o!==this.previousTextRenderingMode&&(this.pdfStreamWriter.setTextRenderingMode(o),this.previousTextRenderingMode=o);var s=null!=r?r.characterSpacing:0;s===this.previousCharacterSpacing||this.isEmfTextScaled||(this.pdfStreamWriter.setCharacterSpacing(s),this.previousCharacterSpacing=s);var a=null!=r?r.wordSpacing:0;a!==this.previousWordSpacing&&(this.pdfStreamWriter.setWordSpacing(a),this.previousWordSpacing=a)},t.prototype.getTextVerticalAlignShift=function(t,e,i){var r=0;if(e>=0&&null!=i&&i.lineAlignment!==No.Top)switch(i.lineAlignment){case No.Middle:r=(e-t)/2;break;case No.Bottom:r=e-t}return r},t.prototype.drawLayoutResult=function(t,e,i,r){var n=this.getTextVerticalAlignShift(t.actualSize.height,r.height,i);0!==n&&this.pdfStreamWriter.startNextLine(0,n);for(var o=e,s=null!=o&&o.isUnicode,a=(null!=o&&o.isEmbedFont,t.lines),l=0,h=a.length;l<h&&l!==this.startCutIndex;l++){var u=a[l],c=(u.text,u.width),p=this.getHorizontalAlignShift(c,r.width,i),d=this.getLineIndent(u,i,r,0===l);0===(p+=this.rightToLeft(i)?0:d)||this.isEmfTextScaled||this.pdfStreamWriter.startNextLine(p,0),s?this.drawUnicodeLine(u,r,e,i):this.drawAsciiLine(u,r,e,i),0===p||this.isEmfTextScaled||this.pdfStreamWriter.startNextLine(-p,0),this.isOverloadWithPosition&&a.length>1&&(this.pdfStreamWriter.startNextLine(-r.x,0),r.x=0,r.width=this.clientSize.width,this.isOverloadWithPosition=!1,this.isPointOverload=!0)}this.getResources.getResources().requireProcedureSet(this.procedureSets.text),0!==n&&this.pdfStreamWriter.startNextLine(0,-(n-t.lineHeight)),this.pdfStreamWriter.endText()},t.prototype.drawAsciiLine=function(t,e,i,r){this.justifyLine(t,e.width,r);var n="";if(-1!==t.text.indexOf("(")||-1!==t.text.indexOf(")"))for(var o=0;o<t.text.length;o++)"("===t.text[o]?n+="\\(":")"===t.text[o]?n+="\\)":n+=t.text[o];""===n&&(n=t.text);var s="("+n+")";this.pdfStreamWriter.showNextLineText(new ko(s))},t.prototype.drawUnicodeLine=function(t,e,i,r){var n=t.text,o=(t.width,null!==r&&void 0!==r&&r.rightToLeft),s=null!==r&&void 0!==r&&(0!==r.wordSpacing||r.alignment===Fo.Justify),a=i,l=this.justifyLine(t,e.width,r),h=new Na;if(o||null!==r&&void 0!==r&&r.textDirection!==Yo.None){var u=null,c=null!==r&&void 0!==r&&r.alignment===Fo.Right,p=null;p=(u=null!==r&&void 0!==r&&r.textDirection!==Yo.None?h.layout(n,a,r.textDirection===Yo.RightToLeft,s,r):h.layout(n,a,c,s,r)).length>1?null!==r&&void 0!==r&&r.textDirection!==Yo.None?h.splitLayout(n,a,r.textDirection===Yo.RightToLeft,s,r):h.splitLayout(n,a,c,s,r):[n],this.drawUnicodeBlocks(u,p,a,r,l)}else if(s){var d=this.breakUnicodeLine(n,a,null);u=d.tokens,p=d.words;this.drawUnicodeBlocks(u,p,a,r,l)}else{var f=this.convertToUnicode(n,a),g=this.getUnicodeString(f);this.streamWriter.showNextLineText(g)}},t.prototype.drawUnicodeBlocks=function(t,e,i,r,n){if(null==t)throw new Error("Argument Null Exception : blocks");if(null==e)throw new Error("Argument Null Exception : words");if(null==i)throw new Error("Argument Null Exception : font");this.streamWriter.startNextLine();var o=0,s=0,a=0,l=0;try{null!==r&&void 0!==r&&(a=r.firstLineIndent,l=r.paragraphIndent,r.firstLineIndent=0,r.paragraphIndent=0);var h=i.getCharWidth(bs.whiteSpace,r)+n,u=null!=r?r.characterSpacing:0;h+=u+(null!==r&&void 0!==r&&0===n?r.wordSpacing:0);for(var c=0;c<t.length;c++){var p=t[c],d=e[c],f=0;if(0!==o&&this.streamWriter.startNextLine(o,0),d.length>0){f+=i.measureString(d,r).width,f+=u;var g=this.getUnicodeString(p);this.streamWriter.showText(g)}c!==t.length-1&&(s+=o=f+h)}s>0&&this.streamWriter.startNextLine(-s,0)}finally{null!==r&&void 0!==r&&(r.firstLineIndent=a,r.paragraphIndent=l)}},t.prototype.breakUnicodeLine=function(t,e,i){if(null===t)throw new Error("Argument Null Exception : line");i=t.split(null);for(var r=[],n=0;n<i.length;n++){var o=i[n],s=this.convertToUnicode(o,e);r[n]=s}return{tokens:r,words:i}},t.prototype.getUnicodeString=function(t){if(null===t)throw new Error("Argument Null Exception : token");var e=new ko(t);return e.converted=!0,e.encode=Yn.ForceEncoding.Ascii,e},t.prototype.convertToUnicode=function(t,e){var i=null;if(null==t)throw new Error("Argument Null Exception : text");if(null==e)throw new Error("Argument Null Exception : ttfFont");if(e.fontInternal instanceof Ea){var r=e.fontInternal.ttfReader;e.setSymbols(t),i=r.convertString(t);var n=ko.toUnicodeArray(i,!1);i=ko.byteToString(n)}return i},t.prototype.justifyLine=function(t,e,i){var r=t.text,n=t.width,o=this.shouldJustify(t,e,i),s=null!=i&&0!==i.wordSpacing,a=bs.spaces,l=bs.getCharsCount(r,a),h=0;if(o){s&&(n-=l*i.wordSpacing);h=(e-n)/l,this.pdfStreamWriter.setWordSpacing(h)}else s?this.pdfStreamWriter.setWordSpacing(i.wordSpacing):this.pdfStreamWriter.setWordSpacing(0);return h},t.prototype.reset=function(t){this.canvasSize=t,this.streamWriter.clear(),this.initialize(),this.initializeCoordinates()},t.prototype.shouldJustify=function(t,e,i){var r=t.text,n=t.width,o=null!=i&&i.alignment===Fo.Justify,s=e>=0&&n<e,a=bs.spaces,l=bs.getCharsCount(r,a)>0&&r[0]!==bs.whiteSpace,h=(t.lineType&ms.LayoutBreak)>0;return o&&s&&l&&(h||i.alignment===Fo.Justify)},t.prototype.underlineStrikeoutText=function(t,e,i,r,n,o){if(r.underline||r.strikeout){var s=this.createUnderlineStikeoutPen(t,e,r,o);if(null!=s){var a=this.getTextVerticalAlignShift(i.actualSize.height,n.height,o),l=0;l=n.y+a+r.metrics.getAscent(o)+1.5*s.width;for(var h=n.y+a+r.metrics.getHeight(o)/2+1.5*s.width,u=i.lines,c=0,p=i.lineCount;c<p;c++){var d=u[c],f=(d.text,d.width),g=this.getHorizontalAlignShift(f,n.width,o),m=this.getLineIndent(d,o,n,0===c);g+=this.rightToLeft(o)?0:m;var y=n.x+g,b=this.shouldJustify(d,n.width,o)?y+n.width-m:y+f-m;if(r.underline){var v=l;this.drawLine(s,y,v,b,v),l+=i.lineHeight}if(r.strikeout){v=h;this.drawLine(s,y,v,b,v),h+=i.lineHeight}this.isPointOverload&&u.length>1&&(n.x=0,n.width=this.clientSize.width)}this.isPointOverload=!1}}},t.prototype.createUnderlineStikeoutPen=function(t,e,i,r){var n=i.metrics.getSize(r)/20,o=null;return null!=t?o=new Ws(t.color,n):null!=e&&(o=new Ws(e,n)),o},t.prototype.getTextRenderingMode=function(t,e,i){var r=Vo.None;return r=null!=t&&null!=e?Vo.FillStroke:null!=t?Vo.Stroke:Vo.Fill,null!=i&&i.clipPath&&(r|=Vo.ClipFlag),r},t.prototype.getLineIndent=function(t,e,i,r){var n=0,o=(t.lineType&ms.FirstParagraphLine)>0;return null!=e&&o&&(n=r?e.firstLineIndent:e.paragraphIndent,n=i.width>0?Math.min(i.width,n):n),n},t.prototype.getHorizontalAlignShift=function(t,e,i){var r=0;if(e>=0&&null!=i&&i.alignment!==Fo.Left)switch(i.alignment){case Fo.Center:r=(e-t)/2;break;case Fo.Right:r=e-t}return r},t.prototype.rightToLeft=function(t){var e=null!==t&&void 0!==t&&t.rightToLeft;return null!==t&&void 0!==t&&t.textDirection!==Yo.None&&void 0!==t.textDirection&&(e=!0),e},t.prototype.stateControl=function(t,e,i,r){if(void 0===r)this.stateControl(t,e,i,null);else{e instanceof _a&&(this.bCSInitialized=!1,e.colorSpace=this.colorSpace),e instanceof Ya&&(this.bCSInitialized=!1,e.graphics.colorSpace=this.colorSpace);null!==e?(void 0!==this.pageLayer&&null!=this.pageLayer&&!1===this.colorSpaceChanged&&(this.lastDocumentCS=this.pageLayer.page.document.colorSpace,this.lastGraphicsCS=this.pageLayer.page.graphics.colorSpace,this.colorSpace=this.pageLayer.page.document.colorSpace,this.currentColorSpace=this.pageLayer.page.document.colorSpace,this.colorSpaceChanged=!0),this.initCurrentColorSpace(this.currentColorSpace)):null!=t&&(void 0!==this.pageLayer&&null!=this.pageLayer&&(this.colorSpace=this.pageLayer.page.document.colorSpace,this.currentColorSpace=this.pageLayer.page.document.colorSpace),this.initCurrentColorSpace(this.currentColorSpace)),this.penControl(t,!1),this.brushControl(e,!1),this.fontControl(i,r,!1)}},t.prototype.initCurrentColorSpace=function(t){this.getResources.getResources();this.bCSInitialized||(this.currentColorSpace!=Wo.GrayScale?(this.pdfStreamWriter.setColorSpace("Device"+this.currentColorSpaces[this.currentColorSpace],!0),this.pdfStreamWriter.setColorSpace("Device"+this.currentColorSpaces[this.currentColorSpace],!1),this.bCSInitialized=!0):(this.pdfStreamWriter.setColorSpace("DeviceGray",!0),this.pdfStreamWriter.setColorSpace("DeviceGray",!1),this.bCSInitialized=!0))},t.prototype.penControl=function(t,e){null!=t&&(this.currentPen=t,t.monitorChanges(this.currentPen,this.pdfStreamWriter,this.getResources,e,this.colorSpace,this.matrix.clone()),this.currentPen=t.clone())},t.prototype.brushControl=function(t,e){if(null!=t&&void 0!==t){var i=t.clone(),r=i;if(!(null===r||void 0===r||t instanceof rs||t instanceof Ya)){var n=r.matrix,o=this.matrix.clone();null!=n&&(n.multiply(o),o=n),r.matrix=o}this.currentBrush=r,i.monitorChanges(this.currentBrush,this.pdfStreamWriter,this.getResources,e,this.colorSpace),this.currentBrush=t,t=null}},t.prototype.fontControl=function(t,e,i){if(null!=t){var r=null!=e?e.subSuperScript:as.None,n=null!=this.currentStringFormat?this.currentStringFormat.subSuperScript:as.None;if(i||t!==this.currentFont||r!==n){var o=this.getResources.getResources();this.currentFont=t,this.currentStringFormat=e;var s=t.metrics.getSize(e);this.isEmfTextScaled=!1;var a=o.getName(t);this.pdfStreamWriter.setFont(t,a,s)}}},t.prototype.setTransparency=function(t,e,i){if(void 0===e)this.istransparencySet=!0,this.setTransparency(t,t,Uo.Normal);else if("number"==typeof e&&void 0===i)this.setTransparency(t,e,Uo.Normal);else{null==this.trasparencies&&(this.trasparencies=new Ys);var r=null,n=new Qa(t,e,i);this.trasparencies.containsKey(n)&&(r=this.trasparencies.getValue(n)),null==r&&(r=new $s(t,e,i),this.trasparencies.setValue(n,r));var o=this.getResources.getResources().getName(r);this.streamWriter.setGraphicsState(o)}},t.prototype.clipTranslateMargins=function(t,e,i,r,n,o){if(t instanceof Zo&&void 0===e)this.clipBounds=t,this.pdfStreamWriter.writeComment("Clip margins."),this.pdfStreamWriter.appendRectangle(t),this.pdfStreamWriter.closePath(),this.pdfStreamWriter.clipPath(!1),this.pdfStreamWriter.writeComment("Translate co-ordinate system."),this.translateTransform(t.x,t.y);else if("number"==typeof t){var s=new Zo(i,r,this.size.width-i-n,this.size.height-r-o);this.clipBounds=s,this.pdfStreamWriter.writeComment("Clip margins."),this.pdfStreamWriter.appendRectangle(s),this.pdfStreamWriter.closePath(),this.pdfStreamWriter.clipPath(!1),this.pdfStreamWriter.writeComment("Translate co-ordinate system."),this.translateTransform(t,e)}},t.prototype.updateY=function(t){return-t},t.prototype.translateTransform=function(t,e){var i=new Us;this.getTranslateTransform(t,e,i),this.pdfStreamWriter.modifyCtm(i),this.matrix.multiply(i)},t.prototype.getTranslateTransform=function(t,e,i){return i.translate(t,this.updateY(e)),i},t.prototype.scaleTransform=function(t,e){var i=new Us;this.getScaleTransform(t,e,i),this.pdfStreamWriter.modifyCtm(i),this.matrix.multiply(i)},t.prototype.getScaleTransform=function(t,e,i){return null==i&&(i=new Us),i.scale(t,e),i},t.prototype.rotateTransform=function(t){var e=new Us;this.getRotateTransform(t,e),this.pdfStreamWriter.modifyCtm(e),this.matrix.multiply(e)},t.prototype.initializeCoordinates=function(){this.pdfStreamWriter.writeComment("Change co-ordinate system to left/top."),this.mediaBoxUpperRightBound!==-this.size.height&&null==this.cropBox&&(this.mediaBoxUpperRightBound===this.size.height||0===this.mediaBoxUpperRightBound?this.translateTransform(0,this.updateY(this.size.height)):this.translateTransform(0,this.updateY(this.mediaBoxUpperRightBound)))},t.prototype.getRotateTransform=function(t,e){return null!=e&&void 0!==e||(e=new Us),e.rotate(this.updateY(t)),e},t.prototype.save=function(){var t=new Xa(this,this.matrix.clone());return t.brush=this.currentBrush,t.pen=this.currentPen,t.font=this.currentFont,t.colorSpace=this.currentColorSpace,t.characterSpacing=this.previousCharacterSpacing,t.wordSpacing=this.previousWordSpacing,t.textScaling=this.previousTextScaling,t.textRenderingMode=this.previousTextRenderingMode,this.graphicsState.push(t),this.pdfStreamWriter.saveGraphicsState(),t},t.prototype.restore=function(t){if(void 0===t)this.graphicsState.length>0&&this.doRestoreState();else if(-1!==this.graphicsState.indexOf(t))for(;0!==this.graphicsState.length;){if(this.doRestoreState()===t)break}},t.prototype.doRestoreState=function(){var t=this.graphicsState.pop();return this.transformationMatrix=t.matrix,this.currentBrush=t.brush,this.currentPen=t.pen,this.currentFont=t.font,this.currentColorSpace=t.colorSpace,this.previousCharacterSpacing=t.characterSpacing,this.previousWordSpacing=t.wordSpacing,this.previousTextScaling=t.textScaling,this.previousTextRenderingMode=t.textRenderingMode,this.pdfStreamWriter.restoreGraphicsState(),t},t.prototype.drawPath=function(t,e,i){e instanceof Ya?(this.bCSInitialized=!1,e.graphics.colorSpace=this.colorSpace):e instanceof _a&&(this.bCSInitialized=!1,e.colorSpace=this.colorSpace),this.stateControl(t,e,null),this.buildUpPath(i.pathPoints,i.pathTypes),this.drawPathHelper(t,e,i.fillMode,!1)},t.prototype.drawArc=function(t,e,i,r,n,o,s){e instanceof Zo?this.drawArc(t,e.x,e.y,e.width,e.height,i,r):0!==s&&(this.stateControl(t,null,null),this.constructArcPath(e,i,e+r,i+n,o,s),this.drawPathHelper(t,null,!1))},t.prototype.buildUpPath=function(e,i){for(var r=e.length,n=0;n<r;++n){var o=0,s=e[n];switch(i[n]&t.pathTypesValuesMask){case Va.Start:this.pdfStreamWriter.beginPath(s.x,s.y);break;case Va.Bezier3:var a=new Xo(0,0),l=new Xo(0,0),h=this.getBezierPoints(e,i,n,a,l);this.pdfStreamWriter.appendBezierSegment(s,h.p2,h.p3),n=h.i;break;case Va.Line:this.pdfStreamWriter.appendLineSegment(s);break;default:throw new Error("ArithmeticException - Incorrect path formation.")}o=i[n],this.checkFlags(o)}},t.prototype.getBezierPoints=function(e,i,r,n,o){if(++r,(i[r]&t.pathTypesValuesMask)!==Va.Bezier3)throw new Error("ArgumentException : errorMsg");if(n=e[r],++r,(i[r]&t.pathTypesValuesMask)!==Va.Bezier3)throw new Error("ArgumentException : errorMsg");return o=e[r],{i:r,p2:n,p3:o}},t.prototype.checkFlags=function(t){(t&Va.CloseSubpath)===Va.CloseSubpath&&this.pdfStreamWriter.closePath()},t.prototype.constructArcPath=function(t,e,i,r,n,o){var s=this.getBezierArc(t,e,i,r,n,o);if(0!==s.length){var a=[s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7]];this.pdfStreamWriter.beginPath(a[0],a[1]);var l=0;for(l=0;l<s.length;l+=8)a=[s[l],s[l+1],s[l+2],s[l+3],s[l+4],s[l+5],s[l+6],s[l+7]],this.pdfStreamWriter.appendBezierSegment(a[2],a[3],a[4],a[5],a[6],a[7])}},t.prototype.getBezierArc=function(t,e,i,r,n,o){if(t>i){var s=void 0;s=t,t=i,i=s}if(r>e){s=void 0;s=e,e=r,r=s}var a,l;Math.abs(o)<=90?(a=o,l=1):a=o/(l=Math.ceil(Math.abs(o)/90));for(var h=(t+i)/2,u=(e+r)/2,c=(i-t)/2,p=(r-e)/2,d=a*(Math.PI/360),f=Math.abs(4/3*(1-Math.cos(d))/Math.sin(d)),g=[],m=0;m<l;m++){var y=(n+m*a)*(Math.PI/180),b=(n+(m+1)*a)*(Math.PI/180),v=Math.cos(y),w=Math.cos(b),S=Math.sin(y),P=Math.sin(b);a>0?g.push(h+c*v,u-p*S,h+c*(v-f*S),u-p*(S+f*v),h+c*(w+f*P),u-p*(P-f*w),h+c*w,u-p*P):g.push(h+c*v,u-p*S,h+c*(v+f*S),u-p*(S-f*v),h+c*(w-f*P),u-p*(P+f*w),h+c*w,u-p*P)}return g},t.pathTypesValuesMask=15,t.transparencyObject=!1,t}(),Ja=function(){function t(t){this.sender=t}return t.prototype.getResources=function(){return this.sender.getResources()},t}(),Xa=function(){function t(t,e){this.internalTextRenderingMode=Vo.Fill,this.internalCharacterSpacing=0,this.internalWordSpacing=0,this.internalTextScaling=100,this.pdfColorSpace=Wo.Rgb,void 0!==t&&(this.pdfGraphics=t,this.transformationMatrix=e)}return Object.defineProperty(t.prototype,"graphics",{get:function(){return this.pdfGraphics},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"matrix",{get:function(){return this.transformationMatrix},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"characterSpacing",{get:function(){return this.internalCharacterSpacing},set:function(t){this.internalCharacterSpacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wordSpacing",{get:function(){return this.internalWordSpacing},set:function(t){this.internalWordSpacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textScaling",{get:function(){return this.internalTextScaling},set:function(t){this.internalTextScaling=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pen",{get:function(){return this.pdfPen},set:function(t){this.pdfPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"brush",{get:function(){return this.pdfBrush},set:function(t){this.pdfBrush=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"font",{get:function(){return this.pdfFont},set:function(t){this.pdfFont=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"colorSpace",{get:function(){return this.pdfColorSpace},set:function(t){this.pdfColorSpace=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textRenderingMode",{get:function(){return this.internalTextRenderingMode},set:function(t){this.internalTextRenderingMode=t},enumerable:!0,configurable:!0}),t}(),Qa=function(){return function(t,e,i){this.alphaPen=t,this.alphaBrush=e,this.blendMode=i}}(),Za=function(){function t(t,e){if(this.pdfColorSpace=Wo.Rgb,this.isVisible=!0,this.sublayer=!1,this.contentLength=0,this.dictionaryProperties=new to,null===t)throw new Error("ArgumentNullException:page");if(this.pdfPage=t,this.clipPageTemplates=!0,void 0===e)this.content=new Lo;else if(e instanceof Lo||null===e){if(null===e)throw new Error("ArgumentNullException:stream");this.content=e}else this.content=new Lo,this.clipPageTemplates=e}return Object.defineProperty(t.prototype,"colorSpace",{get:function(){return this.pdfColorSpace},set:function(t){this.pdfColorSpace=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"page",{get:function(){return this.pdfPage},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layerId",{get:function(){return this.layerid},set:function(t){this.layerid=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.layerName},set:function(t){this.layerName=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visible",{get:function(){return this.isVisible},set:function(t){this.isVisible=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphics",{get:function(){return null==this.pdfGraphics&&this.initializeGraphics(this.page),this.pdfGraphics},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layers",{get:function(){return null==this.layer?(this.layer=new il(this.page),this.layer.sublayer=!0,this.layer):this.layer},enumerable:!0,configurable:!0}),t.prototype.add=function(){var e=new t(this.pdfPage);return e.name="",e},t.prototype.sign=function(t){return 0===t?0:t>0?1:-1},t.prototype.initializeGraphics=function(t){var e=t,i=new Ja(this.page);if(this.pdfGraphics=new $a(t.size,i,this.content),this.pdfGraphics.mediaBoxUpperRightBound=0,null!=e){var r=e.section.parent;null!=r&&(this.pdfGraphics.colorSpace=r.document.colorSpace,this.colorSpace=r.document.colorSpace)}var n=this.sign(t.origin.y)===this.sign(t.origin.x);(t.origin.x>=0&&t.origin.y>=0||!n)&&this.pdfGraphics.initializeCoordinates();var o=e.section.getActualBounds(e,!0),s=e.section.pageSettings.margins;this.clipPageTemplates?t.origin.x>=0&&t.origin.y>=0&&this.pdfGraphics.clipTranslateMargins(o):this.graphics.clipTranslateMargins(o.x,o.y,s.left,s.top,s.right,s.bottom),this.pdfGraphics.setLayer(this)},Object.defineProperty(t.prototype,"element",{get:function(){return this.content},enumerable:!0,configurable:!0}),t}(),tl=function(){function t(){}return Object.defineProperty(t.prototype,"count",{get:function(){return void 0===this.collection&&(this.collection=[]),this.collection.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"list",{get:function(){return void 0===this.collection&&(this.collection=[]),this.collection},enumerable:!0,configurable:!0}),t}(),el=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),il=function(t){function e(e){var i=t.call(this)||this;if(i.parentLayerCount=0,i.sublayer=!1,i.optionalContent=new eo,e instanceof rl){i.page=e;var r=e;i.parseLayers(r)}return i}return el(e,t),e.prototype.items=function(t,e){if("number"==typeof t&&void 0===e){return this.list[t]}if(null==e)throw new Error("ArgumentNullException: layer");if(e.page!==this.page)throw new Error("ArgumentException: The layer belongs to another page")},e.prototype.add=function(t,e){if(void 0===t){var i=new Za(this.page);return i.name="",this.add(i),i}if(t instanceof Za){var r=this.list.push(t);return this.addLayer(r,t),r}return 0},e.prototype.addLayer=function(t,e){var i=new jo(e);this.page.contents.add(i)},e.prototype.insert=function(t,e){for(var i=[],r=this.list.length,n=t;n<r;n++)i.push(this.list.pop());this.list.push(e);for(n=0;n<i.length;n++)this.list.push(i[n]);this.insertLayer(t,e)},e.prototype.insertLayer=function(t,e){if(null==e)throw new Error("ArgumentNullException:layer");var i=new jo(e);this.page.contents.insert(t,i)},e.prototype.parseLayers=function(t){var e=this.page.contents;this.page.getResources();t.crossTable;var i=new Lo,r=new Lo,n=[];n.push("q"),i.data=n,e.insert(0,new jo(i)),(n=[]).push("Q"),r.data=n,e.insert(e.count,new jo(r))},e.prototype.indexOf=function(t){if(null==t)throw new Error("ArgumentNullException: layer");return this.list.indexOf(t)},e}(tl),rl=function(){function t(t){this.defLayerIndex=-1,this.modified=!1,this.dictionaryProperties=new to,this.pageDictionary=t}return Object.defineProperty(t.prototype,"section",{get:function(){return this.pdfSection},set:function(t){this.pdfSection=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dictionary",{get:function(){return this.pageDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.pageDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"defaultLayer",{get:function(){var t=this.layers,e=this.defaultLayerIndex;return t.items(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"defaultLayerIndex",{get:function(){if(0===this.layerCollection.count||-1===this.defLayerIndex){var t=this.layerCollection.add();this.defLayerIndex=this.layerCollection.indexOf(t)}return this.defLayerIndex},set:function(t){if(t<0||t>this.layers.count-1)throw new Error("ArgumentOutOfRangeException : value, Index can not be less 0 and greater Layers.Count - 1");this.defLayerIndex=t,this.modified=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layers",{get:function(){return null!=this.layerCollection&&void 0!==this.layerCollection||(this.layerCollection=new il(this)),this.layerCollection},enumerable:!0,configurable:!0}),t.prototype.getResources=function(){return null==this.resources&&(this.resources=new Ua,this.dictionary.items.setValue(this.dictionaryProperties.resources,this.resources)),this.resources},Object.defineProperty(t.prototype,"contents",{get:function(){var t=this.pageDictionary.items.getValue(this.dictionaryProperties.contents);return null==t&&(t=new ho,this.pageDictionary.items.setValue(this.dictionaryProperties.contents,t)),t},enumerable:!0,configurable:!0}),t.prototype.setResources=function(t){this.resources=t,this.dictionary.items.setValue(this.dictionaryProperties.resources,this.resources),this.modified=!0},t}(),nl=function(){function t(t){this.alreadyExistsAnnotationError="This annotatation had been already added to page",this.missingAnnotationException="Annotation is not contained in collection.",this.dictionaryProperties=new to,this.internalAnnotations=new ho,this.lists=[],void 0!==t&&(this.page=t)}return Object.defineProperty(t.prototype,"annotations",{get:function(){return this.internalAnnotations},set:function(t){this.internalAnnotations=t},enumerable:!0,configurable:!0}),t.prototype.add=function(t){this.doAdd(t)},t.prototype.doAdd=function(t){if(void 0===t.destination)return t.setPage(this.page),this.internalAnnotations.add(new jo(t)),this.lists.push(t);var e=(new vs).layout(t.text,t.font,t.stringFormat,new Qo(t.bounds.width,0),!1,new Qo(0,0)),i=t.bounds.y;if(1===e.lines.length){var r=t.font.measureString(e.lines[0].text);t.bounds=new Zo(new Xo(t.bounds.x,i),r),t.text=e.lines[0].text,this.page.graphics.drawString(t.text,t.font,null,t.brush,t.bounds.x,t.bounds.y,t.bounds.width,t.bounds.height,null),t.setPage(this.page),this.setColor(t),this.internalAnnotations.add(new jo(t)),this.lists.push(t)}else for(var n=0;n<e.lines.length;n++){r=t.font.measureString(e.lines[n].text);if(0===n)t.bounds=new Zo(t.bounds.x,i,r.width,r.height),t.text=e.lines[n].text,this.page.graphics.drawString(t.text,t.font,null,t.brush,t.bounds.x,i,r.width,r.height,null),t.setPage(this.page),this.setColor(t),this.internalAnnotations.add(new jo(t)),this.lists.push(t),i+=t.bounds.height;else{var o=t.clone();o.bounds=new Zo(new Xo(t.bounds.x,i),r),o.text=e.lines[n].text,this.page.graphics.drawString(o.text,o.font,null,o.brush,o.bounds.x,o.bounds.y,o.bounds.width,o.bounds.height,null),o.setPage(this.page),this.setColor(o),this.internalAnnotations.add(new jo(o)),this.lists.push(o),i+=o.bounds.height}}},t.prototype.setColor=function(t){var e=Wo.Rgb,i=t.color.toArray(e);t.dictionary.items.setValue(this.dictionaryProperties.c,i)},Object.defineProperty(t.prototype,"element",{get:function(){return this.internalAnnotations},enumerable:!0,configurable:!0}),t}(),ol=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),sl=function(t){function e(){var e=t.call(this,new eo)||this;return e.annotationCollection=null,e.beginSave=null,e.initialize(),e}return ol(e,t),Object.defineProperty(e.prototype,"document",{get:function(){return null!==this.section&&null!==this.section.parent?this.section.parent.document:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"graphics",{get:function(){var t=this.defaultLayer.graphics;return t.currentPage=this,t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"crossTable",{get:function(){if(null===this.section)throw new Error("PdfDocumentException : Page is not created");return null===this.section.parent?this.section.parentDocument.crossTable:this.section.parent.document.crossTable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.section.pageSettings.size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"origin",{get:function(){return this.section.pageSettings.origin},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"annotations",{get:function(){return null==this.annotationCollection&&(this.annotationCollection=new nl(this),this.dictionary.items.setValue(this.dictionaryProperties.annots,this.annotationCollection.element),this.annotationCollection.annotations=this.dictionary.items.getValue(this.dictionaryProperties.annots)),this.annotationCollection},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){this.dictionary.items.setValue(this.dictionaryProperties.type,new Qn("Page")),this.dictionary.pageBeginDrawTemplate=new ao(this)},e.prototype.setSection=function(t){this.section=t,this.dictionary.items.setValue(this.dictionaryProperties.parent,new jo(t))},e.prototype.resetProgress=function(){this.isProgressOn=!1},e.prototype.getClientSize=function(){var t=this.section.getActualBounds(this,!0);return new Qo(t.width,t.height)},e.prototype.pageBeginSave=function(){var t=this.document;void 0!==typeof t&&null!=t&&this.drawPageTemplates(t),null!=this.beginSave&&void 0!==this.beginSave&&this.beginSave(this)},e.prototype.drawPageTemplates=function(t){if(this.section.containsTemplates(t,this,!1)){var e=new Za(this,!1);if(this.layers.insert(0,e),this.section.drawTemplates(this,e,t,!1),null!==e.graphics&&void 0!==e.graphics)for(var i=0;i<e.graphics.automaticFields.automaticFields.length;i++){var r=e.graphics.automaticFields.automaticFields[i];r.field.performDraw(e.graphics,r.location,r.scalingX,r.scalingY)}}if(this.section.containsTemplates(t,this,!0)){var n=new Za(this,!1);this.layers.add(n),this.section.drawTemplates(this,n,t,!0)}},e}(rl),al=function(){function t(t){this.pdfPage=void 0!==t?t:null}return Object.defineProperty(t.prototype,"page",{get:function(){return this.pdfPage},enumerable:!0,configurable:!0}),t}(),ll=function(){function t(t){if(this.pdfSection=null,null==t)throw Error('ArgumentNullException("section")');this.section=t}return Object.defineProperty(t.prototype,"section",{get:function(){return this.pdfSection},set:function(t){this.pdfSection=t},enumerable:!0,configurable:!0}),t.prototype.contains=function(t){return this.section.contains(t)},t.prototype.remove=function(t){this.section.remove(t)},t.prototype.add=function(){return this.section.add()},t}(),hl=function(){function t(){}return Object.defineProperty(t.prototype,"left",{get:function(){return this.leftTemplate},set:function(t){this.leftTemplate=this.checkElement(t,Vs.Left)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.topTemplate},set:function(t){this.topTemplate=this.checkElement(t,Vs.Top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.rightTemplate},set:function(t){this.rightTemplate=this.checkElement(t,Vs.Right)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.bottomTemplate},set:function(t){this.bottomTemplate=this.checkElement(t,Vs.Bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"EvenLeft",{get:function(){return this.evenLeft},set:function(t){this.evenLeft=this.checkElement(t,Vs.Left)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"EvenTop",{get:function(){return this.evenTop},set:function(t){this.evenTop=this.checkElement(t,Vs.Top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"EvenRight",{get:function(){return this.evenRight},set:function(t){this.evenRight=this.checkElement(t,Vs.Right)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"EvenBottom",{get:function(){return this.evenBottom},set:function(t){this.evenBottom=this.checkElement(t,Vs.Bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OddLeft",{get:function(){return this.oddLeft},set:function(t){this.oddLeft=this.checkElement(t,Vs.Left)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OddTop",{get:function(){return this.oddTop},set:function(t){this.oddTop=this.checkElement(t,Vs.Top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OddRight",{get:function(){return this.oddRight},set:function(t){this.oddRight=this.checkElement(t,Vs.Right)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OddBottom",{get:function(){return this.oddBottom},set:function(t){this.oddBottom=this.checkElement(t,Vs.Bottom)},enumerable:!0,configurable:!0}),t.prototype.getLeft=function(t){if(null==t)throw new Error("ArgumentNullException:page");return this.isEven(t)?null!=this.EvenLeft?this.EvenLeft:this.left:null!=this.OddLeft?this.OddLeft:this.left},t.prototype.getTop=function(t){if(null==t)throw new Error("ArgumentNullException:page");return this.isEven(t)?null!=this.EvenTop?this.EvenTop:this.top:null!=this.OddTop?this.OddTop:this.top},t.prototype.getRight=function(t){if(null==t)throw new Error("ArgumentNullException:page");return this.isEven(t)?null!=this.EvenRight?this.EvenRight:this.right:null!=this.OddRight?this.OddRight:this.right},t.prototype.getBottom=function(t){if(null==t)throw new Error("ArgumentNullException:page");return this.isEven(t)?null!=this.EvenBottom?this.EvenBottom:this.bottom:null!=this.OddBottom?this.OddBottom:this.bottom},t.prototype.isEven=function(t){var e=t.section.document.pages;return(e.pageCollectionIndex.containsKey(t)?e.pageCollectionIndex.getValue(t)+1:e.indexOf(t)+1)%2==0},t.prototype.checkElement=function(t,e){if(null!=t){if(void 0!==t.type&&t.type!==Vs.None)throw new Error("NotSupportedException:Can not reassign the template element. Please, create new one.");t.type=e}return t},t}(),ul=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),cl=function(t){function e(){var e=t.call(this)||this;return e.leftValue=e.topValue=e.rightValue=e.bottomValue=e.stampValue=!0,e}return ul(e,t),Object.defineProperty(e.prototype,"applyDocumentLeftTemplate",{get:function(){return this.leftValue},set:function(t){this.leftValue=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"applyDocumentTopTemplate",{get:function(){return this.topValue},set:function(t){this.topValue=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"applyDocumentRightTemplate",{get:function(){return this.rightValue},set:function(t){this.rightValue=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"applyDocumentBottomTemplate",{get:function(){return this.bottomValue},set:function(t){this.bottomValue=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"applyDocumentStamps",{get:function(){return this.stampValue},set:function(t){this.stampValue=t},enumerable:!0,configurable:!0}),e}(hl),pl=function(){function t(t,e){this.pageAdded=new al,this.pdfPages=[],this.dictionaryProperties=new to,this.pdfDocument=t,void 0===e?(this.settings=t.pageSettings.clone(),this.initialSettings=this.settings.clone()):(this.settings=e.clone(),this.initialSettings=this.settings.clone()),this.initialize()}return Object.defineProperty(t.prototype,"parent",{get:function(){return this.sectionCollection},set:function(t){this.sectionCollection=t,this.section.items.setValue(this.dictionaryProperties.parent,new jo(t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentDocument",{get:function(){return this.pdfDocument},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pageSettings",{get:function(){return this.settings},set:function(t){if(null==t)throw Error("Value can not be null.");this.settings=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.section},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.pagesReferences.count},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"template",{get:function(){return null==this.pageTemplate&&(this.pageTemplate=new cl),this.pageTemplate},set:function(t){this.pageTemplate=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"document",{get:function(){return this.sectionCollection.document},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pages",{get:function(){return null!=this.pagesCollection&&void 0!==this.pagesCollection||(this.pagesCollection=new ll(this)),this.pagesCollection},enumerable:!0,configurable:!0}),t.prototype.getPages=function(){return this.pdfPages},t.prototype.pointToNativePdf=function(t,e){var i=this.getActualBounds(t,!0);return e.x+=i.x,e.y=this.pageSettings.height-e.y,e},t.prototype.setPageSettings=function(t){this.settings=t,this.state.orientation=t.orientation,this.state.rotate=t.rotate,this.state.size=t.size,this.state.origin=t.origin},t.prototype.initialize=function(){this.pagesReferences=new ho,this.section=new eo,this.state=new dl(this.pdfDocument),this.section.sectionBeginSave=new so(this,this.state),this.pageCount=new lo(0),this.section.items.setValue(this.dictionaryProperties.count,this.pageCount),this.section.items.setValue(this.dictionaryProperties.type,new Qn(this.dictionaryProperties.pages)),this.section.items.setValue(this.dictionaryProperties.kids,this.pagesReferences)},t.prototype.containsTemplates=function(t,e,i){var r=this.getDocumentTemplates(t,e,i),n=this.getSectionTemplates(e,i);return r.length>0||n.length>0},t.prototype.getDocumentTemplates=function(t,e,i){var r=[];return this.template.applyDocumentTopTemplate&&null!=t.template.getTop(e)&&(!t.template.getTop(e).foreground&&!i||t.template.getTop(e).foreground&&i)&&r.push(t.template.getTop(e)),this.template.applyDocumentBottomTemplate&&null!=t.template.getBottom(e)&&(!t.template.getBottom(e).foreground&&!i||t.template.getBottom(e).foreground&&i)&&r.push(t.template.getBottom(e)),this.template.applyDocumentLeftTemplate&&null!=t.template.getLeft(e)&&(!t.template.getLeft(e).foreground&&!i||t.template.getLeft(e).foreground&&i)&&r.push(t.template.getLeft(e)),this.template.applyDocumentRightTemplate&&null!=t.template.getRight(e)&&(!t.template.getRight(e).foreground&&!i||t.template.getRight(e).foreground&&i)&&r.push(t.template.getRight(e)),r},t.prototype.getSectionTemplates=function(t,e){var i=[];if(null!=this.template.getTop(t)){(!(r=this.template.getTop(t)).foreground&&!e||r.foreground&&e)&&i.push(r)}if(null!=this.template.getBottom(t)){(!(r=this.template.getBottom(t)).foreground&&!e||r.foreground&&e)&&i.push(r)}if(null!=this.template.getLeft(t)){(!(r=this.template.getLeft(t)).foreground&&!e||r.foreground&&e)&&i.push(r)}if(null!=this.template.getRight(t)){var r;(!(r=this.template.getRight(t)).foreground&&!e||r.foreground&&e)&&i.push(r)}return i},t.prototype.add=function(t){if(void 0===t){var e=new sl;return this.add(e),e}var i=this.checkPresence(t);this.pdfPages.push(t),this.pagesReferences.add(i),t.setSection(this),t.resetProgress(),this.pageAddedMethod(t)},t.prototype.checkPresence=function(t){for(var e=new jo(t),i=!1,r=this.parent,n=0;n<r.section.length;n++){var o=r.section[n];i=i||o.contains(t)}return e},t.prototype.contains=function(t){return 0<=this.indexOf(t)},t.prototype.indexOf=function(t){for(var e=0;e<this.pdfPages.length;e++)if(this.pdfPages[e]===t)return this.pdfPages.indexOf(t);var i=new jo(t);return this.pagesReferences.indexOf(i)},t.prototype.pageAddedMethod=function(t){var e=new al(t);this.onPageAdded(e);this.parent.document.pages.onPageAdded(e),this.pageCount.intValue=this.count},t.prototype.onPageAdded=function(t){},t.prototype.getActualBounds=function(t,e,i){if(t instanceof sl&&"boolean"==typeof e){var r=this.parent.document;return this.getActualBounds(r,t,e)}t=t,e=e,i=i;var n=new Zo(0,0,0,0);n.height=i?this.pageSettings.size.height:this.pageSettings.getActualSize().height,n.width=i?this.pageSettings.size.width:this.pageSettings.getActualSize().width;var o=this.getLeftIndentWidth(t,e,i),s=this.getTopIndentHeight(t,e,i),a=this.getRightIndentWidth(t,e,i),l=this.getBottomIndentHeight(t,e,i);return n.x+=o,n.y+=s,n.width-=o+a,n.height-=s+l,n},t.prototype.getLeftIndentWidth=function(t,e,i){if(null==t)throw new Error("ArgumentNullException:document");if(null==e)throw new Error("ArgumentNullException:page");var r=i?this.pageSettings.margins.left:0,n=null!=this.template.getLeft(e)?this.template.getLeft(e).width:0,o=null!=t.template.getLeft(e)?t.template.getLeft(e).width:0;return r+=this.template.applyDocumentLeftTemplate?Math.max(n,o):n},t.prototype.getTopIndentHeight=function(t,e,i){if(null==t)throw new Error("ArgumentNullException:document");if(null==e)throw new Error("ArgumentNullException:page");var r=i?this.pageSettings.margins.top:0,n=null!=this.template.getTop(e)?this.template.getTop(e).height:0,o=null!=t.template.getTop(e)?t.template.getTop(e).height:0;return r+=this.template.applyDocumentTopTemplate?Math.max(n,o):n},t.prototype.getRightIndentWidth=function(t,e,i){if(null==t)throw new Error("ArgumentNullException:document");if(null==e)throw new Error("ArgumentNullException:page");var r=i?this.pageSettings.margins.right:0,n=null!=this.template.getRight(e)?this.template.getRight(e).width:0,o=null!=t.template.getRight(e)?t.template.getRight(e).width:0;return r+=this.template.applyDocumentRightTemplate?Math.max(n,o):n},t.prototype.getBottomIndentHeight=function(t,e,i){if(null==t)throw new Error("ArgumentNullException:document");if(null==e)throw new Error("ArgumentNullException:page");var r=i?this.pageSettings.margins.bottom:0,n=null!=this.template.getBottom(e)?this.template.getBottom(e).height:0,o=null!=t.template.getBottom(e)?t.template.getBottom(e).height:0;return r+=this.template.applyDocumentBottomTemplate?Math.max(n,o):n},t.prototype.remove=function(t){if(null==t)throw Error('ArgumentNullException("page")');var e=this.pdfPages.indexOf(t);this.pagesReferences.removeAt(e);for(var i=[],r=0;r<e;r++)i.push(this.pdfPages[r]);for(r=e+1;r<this.pdfPages.length;r++)i.push(this.pdfPages[r]);this.pdfPages=i},t.prototype.applyPageSettings=function(t,e,i){var r=new Zo(i.origin,i.size);t.items.setValue(this.dictionaryProperties.mediaBox,ho.fromRectangle(r));var n=0;n=fl.rotateFactor*i.rotate;var o=new lo(n);t.items.setValue(this.dictionaryProperties.rotate,o)},t.prototype.beginSave=function(t,e){var i=e.document;this.applyPageSettings(this.section,i.pageSettings,t)},t.prototype.drawTemplates=function(t,e,i,r){var n=this.getDocumentTemplates(i,t,r),o=this.getSectionTemplates(t,r);this.drawTemplatesHelper(e,i,n),this.drawTemplatesHelper(e,i,o)},t.prototype.drawTemplatesHelper=function(t,e,i){if(null!=i&&i.length>0)for(var r=i.length,n=0;n<r;n++){i[n].draw(t,e)}},t}(),dl=function(){function t(t){this.pageOrientation=t.pageSettings.orientation,this.pageRotate=t.pageSettings.rotate,this.pageSize=t.pageSettings.size,this.pageOrigin=t.pageSettings.origin}return Object.defineProperty(t.prototype,"orientation",{get:function(){return this.pageOrientation},set:function(t){this.pageOrientation=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rotate",{get:function(){return this.pageRotate},set:function(t){this.pageRotate=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.pageSize},set:function(t){this.pageSize=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"origin",{get:function(){return this.pageOrigin},set:function(t){this.pageOrigin=t},enumerable:!0,configurable:!0}),t}(),fl=function(){function t(t){this.sections=[],this.dictionaryProperties=new to,this.pdfDocument=t.clone(),this.initialize()}return Object.defineProperty(t.prototype,"section",{get:function(){return this.sections},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"document",{get:function(){return this.pdfDocument},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.sections.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.pages},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){this.sectionCount=new lo(0),this.sectionCollection=new ho,this.pages=new eo,this.pages.beginSave=new io(this),this.pages.items.setValue(this.dictionaryProperties.type,new Qn("Pages")),this.pages.items.setValue(this.dictionaryProperties.kids,this.sectionCollection),this.pages.items.setValue(this.dictionaryProperties.count,this.sectionCount),this.pages.items.setValue(this.dictionaryProperties.resources,new eo),this.setPageSettings(this.pages,this.pdfDocument.pageSettings)},t.prototype.pdfSectionCollection=function(t){if(t<0||t>=this.count)throw new Error("IndexOutOfRangeException()");return this.sections[t]},t.prototype.setPageSettings=function(t,e){var i=new Zo(new Xo,e.size);t.items.setValue(this.dictionaryProperties.mediaBox,ho.fromRectangle(i))},t.prototype.add=function(t){if(void 0===t){var e=new pl(this.pdfDocument);return this.add(e),e}var i=this.checkSection(t);return this.sections.push(t),t.parent=this,this.sectionCollection.add(i),this.sections.indexOf(t)},t.prototype.checkSection=function(t){var e=new jo(t);this.sectionCollection.contains(e);return e},t.prototype.countPages=function(){var t=0;return this.sections.forEach(function(e){return t+=e.count}),t},t.prototype.beginSave=function(){this.sectionCount.intValue=this.countPages()},t.rotateFactor=90,t}(),gl=function(){function t(t){this.pdfPageCollectionIndex=new Xn,this.document=t}return Object.defineProperty(t.prototype,"count",{get:function(){return this.countPages()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pageCollectionIndex",{get:function(){return this.pdfPageCollectionIndex},enumerable:!0,configurable:!0}),t.prototype.add=function(t){if(void 0===t){var e=new sl;return this.add(e),e}this.getLastSection().add(t)},t.prototype.getLastSection=function(){var t=this.document.sections;0===t.section.length&&t.add();return t.section[t.section.length-1]},t.prototype.onPageAdded=function(t){},t.prototype.countPages=function(){for(var t=this.document.sections,e=0,i=0;i<t.section.length;i++)e+=t.section[i].count;return e},t.prototype.getPageByIndex=function(t){return this.getPage(t)},t.prototype.getPage=function(t){if(t<0||t>=this.count)throw Error('ArgumentOutOfRangeException("index", "Value can not be less 0")');for(var e=null,i=0,r=0,n=0,o=this.document.sections.count,s=0;s<o;s++){var a=this.document.sections.section[s];if(r=a.count,n=t-i,t>=i&&n<r){e=a.getPages()[n];break}i+=r}return e},t.prototype.indexOf=function(t){var e=-1;if(null==t)throw new Error("ArgumentNullException: page");for(var i=0,r=0,n=this.document.sections.count;r<n;r++){var o=this.document.sections.pdfSectionCollection(r);if((e=o.indexOf(t))>=0){e+=i;break}e=-1,i+=o.count}return e},t.prototype.remove=function(t){if(null==t)throw Error('ArgumentNullException("page")');for(var e=null,i=0,r=this.document.sections.count;i<r;i++)if((e=this.document.sections.pdfSectionCollection(i)).pages.contains(t)){e.pages.remove(t);break}return e},t}(),ml=function(){function t(){this.referenceObjects=[],this.pdfFontCollection=new Xn}return t.prototype.search=function(t){var e=null,i=this.getGroup(t);return null==i?i=this.createNewGroup():i.length>0&&(e=i[0]),i.push(t),e},t.prototype.createNewGroup=function(){var t=[];return this.referenceObjects.push(t),t},t.prototype.getGroup=function(t){var e=null;if(null!==t)for(var i=this.referenceObjects.length,r=0;r<i;r++){if(this.referenceObjects.length>0){var n=this.referenceObjects[r];if(n.length>0){var o=n[0];if(t.equalsTo(o)){e=n;break}}else this.removeGroup(n)}i=this.referenceObjects.length}return e},t.prototype.removeGroup=function(t){if(null!==t){var e=this.referenceObjects.indexOf(t);this.referenceObjects.slice(e,e+1)}},t.prototype.destroy=function(){this.pdfFontCollection=void 0,this.referenceObjects=void 0},t}(),yl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),bl=function(t){function e(i){var r=t.call(this)||this;r.defaultMargin=40,r.streamWriter=null,r.document=r;var n=!1;void 0===i?(e.cacheCollection=new ml,n=!1):n=i;var o=new Bs;r.setMainObjectCollection(o);var s=new Es;s.isMerging=n,s.document=r,r.setCrossTable(s);var a=new ks;return r.setCatalog(a),o.add(a),a.position=-1,r.sectionCollection=new fl(r),r.documentPageCollection=new gl(r),a.pages=r.sectionCollection,r}return yl(e,t),Object.defineProperty(e,"defaultFont",{get:function(){return null==this.defaultStandardFont&&(this.defaultStandardFont=new Sl(ns.Helvetica,8)),this.defaultStandardFont},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sections",{get:function(){return this.sectionCollection},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pageSettings",{get:function(){return null==this.settings&&(this.settings=new _s(this.defaultMargin)),this.settings},set:function(t){this.settings=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pages",{get:function(){return this.documentPageCollection},enumerable:!0,configurable:!0}),Object.defineProperty(e,"cache",{get:function(){return void 0===e.cacheCollection||null==e.cacheCollection?new ml:e.cacheCollection},set:function(t){this.cacheCollection=t},enumerable:!0,configurable:!0}),Object.defineProperty(e,"enableCache",{get:function(){return this.isCacheEnabled},set:function(t){this.isCacheEnabled=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorSpace",{get:function(){return this.pdfColorSpace===Wo.Rgb||this.pdfColorSpace===Wo.Cmyk||this.pdfColorSpace===Wo.GrayScale?this.pdfColorSpace:Wo.Rgb},set:function(t){t===Wo.Rgb||t===Wo.Cmyk||t===Wo.GrayScale?this.pdfColorSpace=t:this.pdfColorSpace=Wo.Rgb},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"template",{get:function(){return null==this.pageTemplate&&(this.pageTemplate=new hl),this.pageTemplate},set:function(t){this.pageTemplate=t},enumerable:!0,configurable:!0}),e.prototype.docSave=function(t,e,i){if(this.checkPagesPresence(),null===t)throw new Error("ArgumentNullException : stream");this.streamWriter=t;var r=new xs(t);if(r.document=this,"boolean"==typeof e&&void 0===i)return this.crossTable.save(r);this.crossTable.save(r,e)},e.prototype.checkPagesPresence=function(){0===this.pages.count&&this.pages.add()},e.prototype.destroy=function(){this.catalog=void 0,this.colorSpace=void 0,this.currentSavingObj=void 0,this.documentPageCollection=void 0,this.isStreamCopied=void 0,this.pageSettings=void 0,this.pageTemplate=void 0,this.pdfColorSpace=void 0,this.sectionCollection=void 0,e.cache.destroy(),this.crossTable.pdfObjects.destroy(),e.cache=void 0,this.streamWriter.destroy()},e.defaultStandardFont=null,e.isCacheEnabled=!0,e}(Ts),vl=function(){function t(){}return t.getMetrics=function(t,e,i){var r=null;switch(t){case ns.Helvetica:r=this.getHelveticaMetrics(t,e,i);break;case ns.Courier:r=this.getCourierMetrics(t,e,i);break;case ns.TimesRoman:r=this.getTimesMetrics(t,e,i);break;case ns.Symbol:r=this.getSymbolMetrics(t,e,i);break;case ns.ZapfDingbats:r=this.getZapfDingbatsMetrics(t,e,i);break;default:r=this.getHelveticaMetrics(ns.Helvetica,e,i)}return r.name=t.toString(),r.subScriptSizeFactor=this.subSuperScriptFactor,r.superscriptSizeFactor=this.subSuperScriptFactor,r},t.getHelveticaMetrics=function(t,e,i){var r=new Ma;return(e&$o.Bold)>0&&(e&$o.Italic)>0?(r.ascent=this.helveticaBoldItalicAscent,r.descent=this.helveticaBoldItalicDescent,r.postScriptName=this.helveticaBoldItalicName,r.size=i,r.widthTable=new ka(this.arialBoldWidth),r.height=r.ascent-r.descent):(e&$o.Bold)>0?(r.ascent=this.helveticaBoldAscent,r.descent=this.helveticaBoldDescent,r.postScriptName=this.helveticaBoldName,r.size=i,r.widthTable=new ka(this.arialBoldWidth),r.height=r.ascent-r.descent):(e&$o.Italic)>0?(r.ascent=this.helveticaItalicAscent,r.descent=this.helveticaItalicDescent,r.postScriptName=this.helveticaItalicName,r.size=i,r.widthTable=new ka(this.arialWidth),r.height=r.ascent-r.descent):(r.ascent=this.helveticaAscent,r.descent=this.helveticaDescent,r.postScriptName=this.helveticaName,r.size=i,r.widthTable=new ka(this.arialWidth),r.height=r.ascent-r.descent),r},t.getCourierMetrics=function(t,e,i){var r=new Ma;return(e&$o.Bold)>0&&(e&$o.Italic)>0?(r.ascent=this.courierBoldItalicAscent,r.descent=this.courierBoldItalicDescent,r.postScriptName=this.courierBoldItalicName,r.size=i,r.widthTable=new ka(this.fixedWidth),r.height=r.ascent-r.descent):(e&$o.Bold)>0?(r.ascent=this.courierBoldAscent,r.descent=this.courierBoldDescent,r.postScriptName=this.courierBoldName,r.size=i,r.widthTable=new ka(this.fixedWidth),r.height=r.ascent-r.descent):(e&$o.Italic)>0?(r.ascent=this.courierItalicAscent,r.descent=this.courierItalicDescent,r.postScriptName=this.courierItalicName,r.size=i,r.widthTable=new ka(this.fixedWidth),r.height=r.ascent-r.descent):(r.ascent=this.courierAscent,r.descent=this.courierDescent,r.postScriptName=this.courierName,r.size=i,r.widthTable=new ka(this.fixedWidth),r.height=r.ascent-r.descent),r},t.getTimesMetrics=function(t,e,i){var r=new Ma;return(e&$o.Bold)>0&&(e&$o.Italic)>0?(r.ascent=this.timesBoldItalicAscent,r.descent=this.timesBoldItalicDescent,r.postScriptName=this.timesBoldItalicName,r.size=i,r.widthTable=new ka(this.timesRomanBoldItalicWidths),r.height=r.ascent-r.descent):(e&$o.Bold)>0?(r.ascent=this.timesBoldAscent,r.descent=this.timesBoldDescent,r.postScriptName=this.timesBoldName,r.size=i,r.widthTable=new ka(this.timesRomanBoldWidth),r.height=r.ascent-r.descent):(e&$o.Italic)>0?(r.ascent=this.timesItalicAscent,r.descent=this.timesItalicDescent,r.postScriptName=this.timesItalicName,r.size=i,r.widthTable=new ka(this.timesRomanItalicWidth),r.height=r.ascent-r.descent):(r.ascent=this.timesAscent,r.descent=this.timesDescent,r.postScriptName=this.timesName,r.size=i,r.widthTable=new ka(this.timesRomanWidth),r.height=r.ascent-r.descent),r},t.getSymbolMetrics=function(t,e,i){var r=new Ma;return r.ascent=this.symbolAscent,r.descent=this.symbolDescent,r.postScriptName=this.symbolName,r.size=i,r.widthTable=new ka(this.symbolWidth),r.height=r.ascent-r.descent,r},t.getZapfDingbatsMetrics=function(t,e,i){var r=new Ma;return r.ascent=this.zapfDingbatsAscent,r.descent=this.zapfDingbatsDescent,r.postScriptName=this.zapfDingbatsName,r.size=i,r.widthTable=new ka(this.zapfDingbatsWidth),r.height=r.ascent-r.descent,r},t.subSuperScriptFactor=1.52,t.helveticaAscent=931,t.helveticaDescent=-225,t.helveticaName="Helvetica",t.helveticaBoldAscent=962,t.helveticaBoldDescent=-228,t.helveticaBoldName="Helvetica-Bold",t.helveticaItalicAscent=931,t.helveticaItalicDescent=-225,t.helveticaItalicName="Helvetica-Oblique",t.helveticaBoldItalicAscent=962,t.helveticaBoldItalicDescent=-228,t.helveticaBoldItalicName="Helvetica-BoldOblique",t.courierAscent=805,t.courierDescent=-250,t.courierName="Courier",t.courierBoldAscent=801,t.courierBoldDescent=-250,t.courierBoldName="Courier-Bold",t.courierItalicAscent=805,t.courierItalicDescent=-250,t.courierItalicName="Courier-Oblique",t.courierBoldItalicAscent=801,t.courierBoldItalicDescent=-250,t.courierBoldItalicName="Courier-BoldOblique",t.timesAscent=898,t.timesDescent=-218,t.timesName="Times-Roman",t.timesBoldAscent=935,t.timesBoldDescent=-218,t.timesBoldName="Times-Bold",t.timesItalicAscent=883,t.timesItalicDescent=-217,t.timesItalicName="Times-Italic",t.timesBoldItalicAscent=921,t.timesBoldItalicDescent=-218,t.timesBoldItalicName="Times-BoldItalic",t.symbolAscent=1010,t.symbolDescent=-293,t.symbolName="Symbol",t.zapfDingbatsAscent=820,t.zapfDingbatsDescent=-143,t.zapfDingbatsName="ZapfDingbats",t.arialWidth=[278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,0,556,0,222,556,333,1e3,556,556,333,1e3,667,333,1e3,0,611,0,0,222,222,333,333,350,556,1e3,333,1e3,500,333,944,0,500,667,0,333,556,556,556,556,260,556,333,737,370,556,584,0,737,333,400,584,333,333,333,556,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,584,611,556,556,556,556,500,556,500],t.arialBoldWidth=[278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,0,556,0,278,556,500,1e3,556,556,333,1e3,667,333,1e3,0,611,0,0,278,278,500,500,350,556,1e3,333,1e3,556,333,944,0,500,667,0,333,556,556,556,556,280,556,333,737,370,556,584,0,737,333,400,584,333,333,333,611,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,584,611,611,611,611,611,556,611,556],t.fixedWidth=[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600],t.timesRomanWidth=[250,333,408,500,500,833,778,180,333,333,500,564,250,333,250,278,500,500,500,500,500,500,500,500,500,500,278,278,564,564,564,444,921,722,667,667,722,611,556,722,722,333,389,722,611,889,722,722,556,722,667,556,611,722,722,944,722,722,611,333,278,333,469,500,333,444,500,444,500,444,333,500,500,278,278,500,278,778,500,500,500,500,333,389,278,500,500,722,500,500,444,480,200,480,541,0,500,0,333,500,444,1e3,500,500,333,1e3,556,333,889,0,611,0,0,333,333,444,444,350,500,1e3,333,980,389,333,722,0,444,722,0,333,500,500,500,500,200,500,333,760,276,500,564,0,760,333,400,564,300,300,333,500,453,250,333,300,310,500,750,750,750,444,722,722,722,722,722,722,889,667,611,611,611,611,333,333,333,333,722,722,722,722,722,722,722,564,722,722,722,722,722,722,556,500,444,444,444,444,444,444,667,444,444,444,444,444,278,278,278,278,500,500,500,500,500,500,500,564,500,500,500,500,500,500,500,500],t.timesRomanBoldWidth=[250,333,555,500,500,1e3,833,278,333,333,500,570,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500,930,722,667,722,722,667,611,778,778,389,500,778,667,944,722,778,611,778,722,556,667,722,722,1e3,722,722,667,333,278,333,581,500,333,500,556,444,556,444,333,500,556,278,333,556,278,833,556,500,556,556,444,389,333,556,500,722,500,500,444,394,220,394,520,0,500,0,333,500,500,1e3,500,500,333,1e3,556,333,1e3,0,667,0,0,333,333,500,500,350,500,1e3,333,1e3,389,333,722,0,444,722,0,333,500,500,500,500,220,500,333,747,300,500,570,0,747,333,400,570,300,300,333,556,540,250,333,300,330,500,750,750,750,500,722,722,722,722,722,722,1e3,722,667,667,667,667,389,389,389,389,722,722,778,778,778,778,778,570,778,722,722,722,722,722,611,556,500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278,500,556,500,500,500,500,500,570,500,556,556,556,556,500,556,500],t.timesRomanItalicWidth=[250,333,420,500,500,833,778,214,333,333,500,675,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,675,675,675,500,920,611,611,667,722,611,611,722,722,333,444,667,556,833,667,722,611,722,611,500,556,722,611,833,611,556,556,389,278,389,422,500,333,500,500,444,500,444,278,500,500,278,278,444,278,722,500,500,500,500,389,389,278,500,444,667,444,444,389,400,275,400,541,0,500,0,333,500,556,889,500,500,333,1e3,500,333,944,0,556,0,0,333,333,556,556,350,500,889,333,980,389,333,667,0,389,556,0,389,500,500,500,500,275,500,333,760,276,500,675,0,760,333,400,675,300,300,333,500,523,250,333,300,310,500,750,750,750,500,611,611,611,611,611,611,889,667,611,611,611,611,333,333,333,333,722,667,722,722,722,722,722,675,722,722,722,722,722,556,611,500,500,500,500,500,500,500,667,444,444,444,444,444,278,278,278,278,500,500,500,500,500,500,500,675,500,500,500,500,500,444,500,444],t.timesRomanBoldItalicWidths=[250,389,555,500,500,833,778,278,333,333,500,570,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500,832,667,667,667,722,667,667,722,778,389,500,667,611,889,722,722,611,722,667,556,611,722,667,889,667,611,611,333,278,333,570,500,333,500,500,444,500,444,333,500,556,278,278,500,278,778,556,500,500,500,389,389,278,556,444,667,500,444,389,348,220,348,570,0,500,0,333,500,500,1e3,500,500,333,1e3,556,333,944,0,611,0,0,333,333,500,500,350,500,1e3,333,1e3,389,333,722,0,389,611,0,389,500,500,500,500,220,500,333,747,266,500,606,0,747,333,400,570,300,300,333,576,500,250,333,300,300,500,750,750,750,500,667,667,667,667,667,667,944,667,667,667,667,667,389,389,389,389,722,722,722,722,722,722,722,570,722,722,722,722,722,611,611,500,500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278,500,556,500,500,500,500,500,570,500,556,556,556,556,444,500,444],t.symbolWidth=[250,333,713,500,549,833,778,439,333,333,500,549,250,549,250,278,500,500,500,500,500,500,500,500,500,500,278,278,549,549,549,444,549,722,667,722,612,611,763,603,722,333,631,722,686,889,722,722,768,741,556,592,611,690,439,768,645,795,611,333,863,333,658,500,500,631,549,549,494,439,521,411,603,329,603,549,549,576,521,549,549,521,549,603,439,576,713,686,493,686,494,480,200,480,549,750,620,247,549,167,713,500,753,753,753,753,1042,987,603,987,603,400,549,411,549,549,713,494,460,549,549,549,549,1e3,603,1e3,658,823,686,795,987,768,768,823,768,768,713,713,713,713,713,713,713,768,713,790,790,890,823,549,250,713,603,603,1042,987,603,987,603,494,329,790,790,786,713,384,384,384,384,384,384,494,494,494,494,329,274,686,686,686,384,384,384,384,384,384,494,494,494,-1],t.zapfDingbatsWidth=[278,974,961,974,980,719,789,790,791,690,960,939,549,855,911,933,911,945,974,755,846,762,761,571,677,763,760,759,754,494,552,537,577,692,786,788,788,790,793,794,816,823,789,841,823,833,816,831,923,744,723,749,790,792,695,776,768,792,759,707,708,682,701,826,815,789,789,707,687,696,689,786,787,713,791,785,791,873,761,762,762,759,759,892,892,788,784,438,138,277,415,392,392,668,668,390,390,317,317,276,276,509,509,410,410,234,234,334,334,732,544,544,910,667,760,760,776,595,694,626,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,894,838,1016,458,748,924,748,918,927,928,928,834,873,828,924,924,917,930,931,463,883,836,836,867,867,696,696,874,874,760,946,771,865,771,888,967,888,831,873,927,970,918],t}(),wl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Sl=function(t){function e(i,r,n){var o=t.call(this,r,void 0===n?i instanceof e?i.style:$o.Regular:n)||this;return o.dictionaryProperties=new to,o.encodings=["Unknown","StandardEncoding","MacRomanEncoding","MacExpertEncoding","WinAnsiEncoding","PDFDocEncoding","IdentityH"],o.pdfFontFamily=void 0===i?ns.Helvetica:i instanceof e?i.fontFamily:i,o.checkStyle(),o.initializeInternals(),o}return wl(e,t),Object.defineProperty(e.prototype,"fontFamily",{get:function(){return this.pdfFontFamily},enumerable:!0,configurable:!0}),e.prototype.checkStyle=function(){if(this.fontFamily===ns.Symbol||this.fontFamily===ns.ZapfDingbats){var t=this.style;t&=~($o.Bold|$o.Italic),this.setStyle(t)}},e.prototype.getLineWidth=function(t,i){if(null==t)throw new Error("ArgumentNullException:line");for(var r=0,n=(this.name,0),o=(t=e.convert(t)).length;n<o;n++){var s=t[n];r+=this.getCharWidthInternal(s,i)}var a=this.metrics.getSize(i);return r*=Cs.charSizeMultiplier*a,r=this.applyFormatSettings(t,i,r)},e.prototype.equalsToFont=function(t){var e=!1,i=t;if(null!=i){var r=this.fontFamily===i.fontFamily,n=~($o.Underline|$o.Strikeout),o=(this.style&n)==(i.style&n);e=r&&o}return e},e.prototype.initializeInternals=function(){bl.cache.search(this);var t=null,e=vl.getMetrics(this.pdfFontFamily,this.style,this.size);this.metrics=e,t=this.createInternals(),this.setInternals(t)},e.prototype.createInternals=function(){var t=new eo;if(t.items.setValue(this.dictionaryProperties.type,new Qn(this.dictionaryProperties.font)),t.items.setValue(this.dictionaryProperties.subtype,new Qn(this.dictionaryProperties.type1)),t.items.setValue(this.dictionaryProperties.baseFont,new Qn(this.metrics.postScriptName)),this.fontFamily!==ns.Symbol&&this.fontFamily!==ns.ZapfDingbats){var e=this.encodings[ls.WinAnsiEncoding];t.items.setValue(this.dictionaryProperties.encoding,new Qn(e))}return t},e.prototype.getCharWidthInternal=function(t,i){var r=0;r=t.charCodeAt(0),"0"!==this.name&&"1"!==this.name&&"2"!==this.name&&"3"!==this.name&&"4"!==this.name||(r-=e.charOffset),r=r>=0&&128!==r?r:0;return this.metrics.widthTable.items(r)},e.convert=function(t){return t},e.charOffset=32,e}(Cs),Pl=function(){function t(t){this.dictionaryProperties=new to,this.pdfColor=new Jo(255,255,255),this.rectangle=new Zo(0,0,0,0),this.pdfPage=null,this.textBrush=new rs(new Jo(0,0,0)),this.textFont=new Sl(ns.TimesRoman,10),this.format=new ys(Fo.Left),this.content="",this.pdfDictionary=new eo,this.internalColor=new Jo,this.darkness=1,void 0===t?this.initialize():(this.initialize(),this.bounds=t)}return Object.defineProperty(t.prototype,"color",{get:function(){return this.pdfColor},set:function(t){this.pdfColor=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"innerColor",{get:function(){return this.internalColor},set:function(t){this.internalColor=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return this.rectangle},set:function(t){this.rectangle=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"page",{get:function(){return this.pdfPage},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"font",{get:function(){return this.textFont},set:function(t){this.textFont=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stringFormat",{get:function(){return this.format},set:function(t){this.format=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"brush",{get:function(){return this.textBrush},set:function(t){this.textBrush=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return this.content},set:function(t){this.content=t,this.dictionary.items.setValue(this.dictionaryProperties.contents,new ko(this.content))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dictionary",{get:function(){return this.pdfDictionary},set:function(t){this.pdfDictionary=t},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){this.pdfDictionary.annotationBeginSave=new oo(this),this.pdfDictionary.items.setValue(this.dictionaryProperties.type,new Qn(this.dictionaryProperties.annot))},t.prototype.setPage=function(t){this.pdfPage=t,this.pdfDictionary.items.setValue(this.dictionaryProperties.p,new jo(this.pdfPage))},t.prototype.beginSave=function(){this.save()},t.prototype.save=function(){var t=new Zo(this.rectangle.x,this.rectangle.y,this.rectangle.width,this.rectangle.height),e=this.pdfPage.section,i=t.height,r=e.pointToNativePdf(this.page,new Xo(t.x,t.y));t.x=r.x,t.width=r.x+t.width,t.y=r.y-this.page.document.pageSettings.margins.top,t.height=t.y-i,this.pdfDictionary.items.setValue(this.dictionaryProperties.rect,ho.fromRectangle(t)),this.dictionary.items.setValue(this.dictionaryProperties.ca,new lo(this.darkness))},Object.defineProperty(t.prototype,"element",{get:function(){return this.pdfDictionary},enumerable:!0,configurable:!0}),t}(),Cl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),xl=function(t){function e(e){return t.call(this,e)||this}return Cl(e,t),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.dictionary.items.setValue(this.dictionaryProperties.subtype,new Qn(this.dictionaryProperties.link))},e}(Pl),Ol=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Bl=function(t){function e(e){var i=t.call(this,e)||this;return i.pdfAction=null,i}return Ol(e,t),e.prototype.getSetAction=function(t){if(void 0===t)return this.pdfAction;this.pdfAction=t},e}(xl),Ll=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Tl=(function(t){function e(e,i){var r=t.call(this,e)||this;return r.pdfDestination=null,void 0!==i&&(r.destination=i),r}Ll(e,t),Object.defineProperty(e.prototype,"destination",{get:function(){return this.pdfDestination},set:function(t){this.pdfDestination=t},enumerable:!0,configurable:!0}),e.prototype.save=function(){t.prototype.save.call(this),null!=this.pdfDestination&&this.dictionary.items.setValue(this.dictionaryProperties.dest,this.pdfDestination.element)},e.prototype.clone=function(){var t=new e(this.bounds,this.destination);return t.color=this.color,t.brush=this.brush,t.destination=this.destination,t.font=this.font,t}}(xl),function(){function t(t){this.layoutElement=t}return Object.defineProperty(t.prototype,"elements",{get:function(){return this.layoutElement},enumerable:!0,configurable:!0}),t.prototype.getElement=function(){return this.layoutElement},t.prototype.layout=function(t){return this.layoutInternal(t)},t.prototype.Layouter=function(t){return this.layoutInternal(t)},t.prototype.getNextPage=function(t){return t.section.add()},t.prototype.getPaginateBounds=function(t){if(null==t)throw new Error("ArgumentNullException : param");return t.format.usePaginateBounds?t.format.paginateBounds:new Zo(t.bounds.x,0,t.bounds.width,t.bounds.height)},t}()),Ml=function(){function t(t){void 0===t||(this.break=t.break,this.layout=t.layout,this.paginateBounds=t.paginateBounds,this.boundsSet=t.usePaginateBounds)}return Object.defineProperty(t.prototype,"layout",{get:function(){return this.layoutType},set:function(t){this.layoutType=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"break",{get:function(){return this.breakType},set:function(t){this.breakType=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paginateBounds",{get:function(){return void 0===this.layoutPaginateBounds&&null==this.layoutPaginateBounds&&(this.layoutPaginateBounds=new Zo(0,0,0,0)),this.layoutPaginateBounds},set:function(t){this.layoutPaginateBounds=t,this.boundsSet=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"usePaginateBounds",{get:function(){return this.boundsSet},enumerable:!0,configurable:!0}),t}(),Dl=function(){function t(){}return Object.defineProperty(t.prototype,"page",{get:function(){return this.pdfPage},set:function(t){this.pdfPage=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return new Zo(this.layoutBounds.x,this.layoutBounds.y,this.layoutBounds.width,this.layoutBounds.height)},set:function(t){this.layoutBounds=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"format",{get:function(){return this.layoutFormat},set:function(t){this.layoutFormat=t},enumerable:!0,configurable:!0}),t}(),kl=function(){function t(t,e){this.pdfPage=t,this.layoutBounds=e}return Object.defineProperty(t.prototype,"page",{get:function(){return this.pdfPage},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return this.layoutBounds},enumerable:!0,configurable:!0}),t}(),El=function(){function t(){var t=new Ws(new Jo(0,0,0));t.dashStyle=_o.Solid;var e=new Ws(new Jo(0,0,0));e.dashStyle=_o.Solid;var i=new Ws(new Jo(0,0,0));i.dashStyle=_o.Solid;var r=new Ws(new Jo(0,0,0));r.dashStyle=_o.Solid,this.leftPen=t,this.rightPen=e,this.topPen=i,this.bottomPen=r}return Object.defineProperty(t.prototype,"left",{get:function(){return this.leftPen},set:function(t){this.leftPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.rightPen},set:function(t){this.rightPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.topPen},set:function(t){this.topPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.bottomPen},set:function(t){this.bottomPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"all",{set:function(t){this.leftPen=this.rightPen=this.topPen=this.bottomPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isAll",{get:function(){return this.leftPen===this.rightPen&&this.leftPen===this.topPen&&this.leftPen===this.bottomPen},enumerable:!0,configurable:!0}),Object.defineProperty(t,"default",{get:function(){return new t},enumerable:!0,configurable:!0}),t}(),jl=function(){function t(t,e,i,r){this.hasLeftPad=!1,this.hasRightPad=!1,this.hasTopPad=!1,this.hasBottomPad=!1,void 0===t?(this.leftPad=this.rightPad=5.76,this.bottomPad=this.topPad=.5):(this.leftPad=t,this.rightPad=e,this.topPad=i,this.bottomPad=r,this.hasLeftPad=!0,this.hasRightPad=!0,this.hasTopPad=!0,this.hasBottomPad=!0)}return Object.defineProperty(t.prototype,"left",{get:function(){return this.leftPad},set:function(t){this.leftPad=t,this.hasLeftPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.rightPad},set:function(t){this.rightPad=t,this.hasRightPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.topPad},set:function(t){this.topPad=t,this.hasTopPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.bottomPad},set:function(t){this.bottomPad=t,this.hasBottomPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"all",{set:function(t){this.leftPad=this.rightPad=this.topPad=this.bottomPad=t,this.hasLeftPad=!0,this.hasRightPad=!0,this.hasTopPad=!0,this.hasBottomPad=!0},enumerable:!0,configurable:!0}),t}(),Il=function(){function t(){}return Object.defineProperty(t.prototype,"raiseBeginPageLayout",{get:function(){return void 0!==this.beginPageLayout},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"raiseEndPageLayout",{get:function(){return void 0!==this.endPageLayout},enumerable:!0,configurable:!0}),t.prototype.onBeginPageLayout=function(t){this.beginPageLayout&&this.beginPageLayout(this,t)},t.prototype.onEndPageLayout=function(t){this.endPageLayout&&this.endPageLayout(this,t)},t.prototype.drawHelper=function(t,e,i,r){if(e instanceof Xo&&void 0===e.width&&void 0===i)return this.drawHelper(t,e.x,e.y);if("number"==typeof e&&"number"==typeof i&&void 0===r)return this.drawHelper(t,e,i,null);if(e instanceof Zo&&void 0!==e.width&&void 0===i)return this.drawHelper(t,e,null);if(e instanceof Xo&&void 0===e.width&&i instanceof Ml)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&"number"==typeof i&&(r instanceof Ml||null==r)){var n=t.graphics.clientSize.width-e,o=new Zo(e,i,n,0);return this.drawHelper(t,o,r)}if(e instanceof Zo&&void 0!==e.width&&"boolean"==typeof i)return this.bEmbedFonts=i,this.drawHelper(t,e,null);var s=new Dl,a=e,l=i;if(s.page=t,s.bounds=a,null!=s){var h=s.bounds.x,u=s.bounds.y;0===s.bounds.x&&(h=El.default.right.width/2),0===s.bounds.y&&(u=El.default.top.width/2);var c=new Zo(h,u,s.bounds.width,s.bounds.height);s.bounds=c}s.format=null!=l?l:new Ml;return this.layout(s)},t}(),Rl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Al=function(t){function e(e){return t.call(this,e)||this}return Rl(e,t),Object.defineProperty(e.prototype,"element",{get:function(){return t.prototype.getElement.call(this)},enumerable:!0,configurable:!0}),e.prototype.layoutInternal=function(t){this.format=null!==this.element.stringFormat&&void 0!==this.element.stringFormat?this.element.stringFormat:null;var e=t.page,i=t.bounds,r=this.element.value,n=null,o=new Nl;for(o.page=e,o.remainder=r;;){o=this.layoutOnPage(r,e,i,t),n=this.getLayoutResult(o);break}return n},e.prototype.getLayoutResult=function(t){return new Fl(t.page,t.bounds,t.remainder,t.lastLineBounds)},e.prototype.layoutOnPage=function(t,e,i,r){var n=new Nl;n.remainder=t,n.page=e,i=this.checkCorrectBounds(e,i);var o=(new vs).layout(t,this.element.font,this.format,i,e.getClientSize().height,!1,new Qo(0,0)),s=null==o.remainder,a=(r.format.break===Fa.FitElement||o.empty,e.graphics),l=this.element.getBrush();this.element instanceof Wl&&(l.color=new Jo(0,0,255)),a.drawStringLayoutResult(o,this.element.font,this.element.pen,l,i,this.format);o.lines[o.lineCount-1];return n.lastLineBounds=a.getLineBounds(o.lineCount-1,o,this.element.font,i,this.format),n.bounds=this.getTextPageBounds(e,i,o),n.remainder=o.remainder,n.end=s,n},e.prototype.checkCorrectBounds=function(t,e){var i=t.graphics.clientSize;return e.height=e.height>0?e.height:i.height-e.y,e},e.prototype.getTextPageBounds=function(t,e,i){var r=i.actualSize,n=e.x,o=e.y,s=e.width>0?e.width:r.width,a=r.height;n=t.graphics.checkCorrectLayoutRectangle(r,e.x,e.y,this.format).x;var l=t.graphics.getTextVerticalAlignShift(r.height,e.height,this.format);return new Zo(n,o+=l,s,a)},e}(Tl),Nl=function(){return function(){}}(),Fl=function(t){function e(e,i,r,n){var o=t.call(this,e,i)||this;return o.remainderText=r,o.lastLineTextBounds=n,o}return Rl(e,t),Object.defineProperty(e.prototype,"remainder",{get:function(){return this.remainderText},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastLineBounds",{get:function(){return this.lastLineTextBounds},enumerable:!0,configurable:!0}),e}(kl),Vl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),zl=function(t){function e(e,i,r,n,o){var s=t.call(this)||this;return s.content="",s.elementValue="",s.hasPointOverload=!1,s.isPdfTextElement=!1,void 0===e||("string"==typeof e&&void 0===i?(s.content=e,s.elementValue=e):"string"==typeof e&&i instanceof Cs&&void 0===r?(s.content=e,s.elementValue=e,s.pdfFont=i):"string"==typeof e&&i instanceof Cs&&r instanceof Ws&&void 0===n?(s.content=e,s.elementValue=e,s.pdfFont=i,s.pdfPen=r):"string"==typeof e&&i instanceof Cs&&r instanceof es&&void 0===n?(s.content=e,s.elementValue=e,s.pdfFont=i,s.pdfBrush=r):(s.content=e,s.elementValue=e,s.pdfFont=i,s.pdfPen=r,s.pdfBrush=n,s.format=o)),s}return Vl(e,t),Object.defineProperty(e.prototype,"text",{get:function(){return this.content},set:function(t){this.elementValue=t,this.content=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.elementValue},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pen",{get:function(){return this.pdfPen},set:function(t){this.pdfPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"brush",{get:function(){return this.pdfBrush},set:function(t){this.pdfBrush=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"font",{get:function(){return this.pdfFont},set:function(t){this.pdfFont=t,this.pdfFont instanceof Sl&&null!=this.content?this.elementValue=Sl.convert(this.content):this.elementValue=this.content},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stringFormat",{get:function(){return this.format},set:function(t){this.format=t},enumerable:!0,configurable:!0}),e.prototype.getBrush=function(){return null==this.pdfBrush||void 0===this.pdfBrush?new rs(new Jo(0,0,0)):this.pdfBrush},e.prototype.layout=function(t){return new Al(this).layout(t)},e.prototype.drawText=function(t,e,i,r){if(e instanceof Xo&&void 0===e.width&&void 0===i)return this.hasPointOverload=!0,this.drawText(t,e.x,e.y);if("number"==typeof e&&"number"==typeof i&&void 0===r)return this.hasPointOverload=!0,this.drawText(t,e,i,null);if(e instanceof Zo&&void 0!==e.width&&void 0===i)return this.drawText(t,e,null);if(e instanceof Xo&&void 0===e.width&&i instanceof Ml)return this.hasPointOverload=!0,this.drawText(t,e.x,e.y,i);if("number"==typeof e&&"number"==typeof i&&(r instanceof Ml||null==r)){this.hasPointOverload=!0;var n=t.graphics.clientSize.width-e,o=new Zo(e,i,n,0);return this.drawText(t,o,r)}if(e instanceof Zo&&void 0!==e.width&&"boolean"==typeof i)return this.drawText(t,e,null);var s=new vs;if(this.hasPointOverload){var a=s.layout(this.value,this.font,this.stringFormat,new Qo(t.graphics.clientSize.width-e.x,0),!0,t.graphics.clientSize),l=void 0,h=e,u=i;if((m=new Dl).page=t,m.bounds=h,m.format=null!=u?u:new Ml,a.lines.length>1){if(this.text=a.layoutLines[0].text,m.bounds.y<=m.page.graphics.clientSize.height){var c=new Xo(m.bounds.x,m.bounds.y);l=this.layout(m);for(var p=new Zo(0,l.bounds.y+a.lineHeight,t.graphics.clientSize.width,a.lineHeight),d=1;d<a.lines.length;d++)if(m.page=l.page,m.bounds=new Zo(new Xo(p.x,p.y),new Qo(p.width,p.height)),this.text=a.layoutLines[d].text,p.y+a.lineHeight>l.page.graphics.clientSize.height&&(m.page=m.page.graphics.getNextPage(),p=c.y>l.page.graphics.clientSize.height-l.bounds.height?new Zo(0,l.bounds.height,l.page.graphics.clientSize.width,a.lineHeight):new Zo(0,0,l.page.graphics.clientSize.width,a.lineHeight),m.bounds=p),l=this.layout(m),d!==a.lines.length-1)p=new Zo(0,l.bounds.y+a.lineHeight,l.page.graphics.clientSize.width,a.lineHeight);else{var f=this.font.measureString(this.text,this.format).width;l=this.calculateResultBounds(l,f,l.page.graphics.clientSize.width,0)}}return l}var g=this.font.measureString(this.text,this.format);return m.bounds.y<=m.page.graphics.clientSize.height&&(l=this.layout(m),l=this.calculateResultBounds(l,g.width,l.page.graphics.clientSize.width,0)),l}l=s.layout(this.value,this.font,this.stringFormat,new Qo(e.width,0),!1,t.graphics.clientSize);var m,y=void 0;h=e,u=i;if((m=new Dl).page=t,m.bounds=h,m.format=null!=u?u:new Ml,l.lines.length>1){if(this.text=l.layoutLines[0].text,m.bounds.y<=m.page.graphics.clientSize.height){c=new Xo(m.bounds.x,m.bounds.y);y=this.layout(m);for(p=new Zo(h.x,y.bounds.y+l.lineHeight,h.width,l.lineHeight),d=1;d<l.lines.length;d++)if(m.page=y.page,m.bounds=new Zo(p.x,p.y,p.width,p.height),this.text=l.layoutLines[d].text,p.y+l.lineHeight>y.page.graphics.clientSize.height&&(m.page=m.page.graphics.getNextPage(),p=c.y>y.page.graphics.clientSize.height-y.bounds.height?new Zo(h.x,l.lineHeight,h.width,l.lineHeight):new Zo(h.x,0,h.width,l.lineHeight),m.bounds=p),y=this.layout(m),d!==l.lines.length-1)p=new Zo(h.x,y.bounds.y+l.lineHeight,h.width,l.lineHeight);else{f=this.font.measureString(this.text,this.format).width;y=this.calculateResultBounds(y,f,h.width,h.x)}}return y}g=this.font.measureString(this.text,this.format);return m.bounds.y<=m.page.graphics.clientSize.height&&(y=this.layout(m),y=this.calculateResultBounds(y,g.width,h.width,h.x)),y},e.prototype.calculateResultBounds=function(t,e,i,r){return null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Fo.Center?(t.bounds.x=r+(i-e)/2,t.bounds.width=e):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Fo.Right?(t.bounds.x=r+(i-e),t.bounds.width=e):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Fo.Justify?(t.bounds.x=r,t.bounds.width=i):(t.bounds.width=r,t.bounds.width=e),t},e}(Il),Gl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),_l=function(t){function e(e,i){var r=t.call(this,e)||this;return void 0!==i&&(r.uri=i),r}return Gl(e,t),Object.defineProperty(e.prototype,"uriAction",{get:function(){return void 0===this.pdfUriAction&&(this.pdfUriAction=new Ao),this.pdfUriAction},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"uri",{get:function(){return this.uriAction.uri},set:function(t){this.uriAction.uri!==t&&(this.uriAction.uri=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"action",{get:function(){return this.getSetAction()},set:function(t){this.getSetAction(t),this.uriAction.next=t},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.dictionary.items.setValue(this.dictionaryProperties.subtype,new Qn(this.dictionaryProperties.link));this.uriAction.element;this.dictionary.items.setValue(this.dictionaryProperties.a,this.uriAction.element)},e}(Bl),Hl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Wl=function(t){function e(){var e=t.call(this)||this;e.uniformResourceLocator="",e.uriAnnotation=null,e.recalculateBounds=!1,e.defaultBorder=new ho;for(var i=0;i<3;i++)e.defaultBorder.add(new lo(0));return e}return Hl(e,t),Object.defineProperty(e.prototype,"url",{get:function(){return this.uniformResourceLocator},set:function(t){if(0===t.length)throw new Error("ArgumentException : Url - string can not be empty");this.uniformResourceLocator=t},enumerable:!0,configurable:!0}),e.prototype.draw=function(t,e){if(t instanceof sl){var i=new vs,r=this.font.style;if(e instanceof Xo){this.recalculateBounds=!0,this.font.style=$o.Underline;if(1===(a=i.layout(this.value,this.font,this.stringFormat,new Qo(t.graphics.clientSize.width-e.x,0),!0,t.graphics.clientSize)).lines.length){var n=this.font.measureString(this.value),o=new Zo(e,n);o=this.calculateBounds(o,n.width,t.graphics.clientSize.width,e.x),this.uriAnnotation=new _l(o,this.url),this.uriAnnotation.dictionary.items.setValue("Border",this.defaultBorder),t.annotations.add(this.uriAnnotation);var s=this.drawText(t,e);return this.font.style=r,s}s=this.drawMultipleLineWithPoint(a,t,e);return this.font.style=r,s}var a=i.layout(this.value,this.font,this.stringFormat,new Qo(e.width,0),!1,new Qo(0,0));if(this.font.style=$o.Underline,1===a.lines.length){n=this.font.measureString(this.value),o=new Zo(new Xo(e.x,e.y),n);o=this.calculateBounds(o,n.width,e.width,e.x),this.uriAnnotation=new _l(o,this.url),this.uriAnnotation.dictionary.items.setValue("Border",this.defaultBorder),t.annotations.add(this.uriAnnotation);var l=this.drawText(t,e);return this.font.style=r,l}l=this.drawMultipleLineWithBounds(a,t,e);return this.font.style=r,l}var h=new sl;return h=t.page,this.draw(h,e)},e.prototype.drawMultipleLineWithPoint=function(t,e,i){for(var r,n=0;n<t.layoutLines.length;n++){var o=this.font.measureString(t.lines[n].text),s=new Zo(i,o);if(0!==n&&(s.x=0),this.text=t.lines[n].text,s.y+o.height>e.graphics.clientSize.height){if(0===n)break;e=e.graphics.getNextPage(),s=new Zo(0,0,e.graphics.clientSize.width,o.height),i.y=0}s=this.calculateBounds(s,o.width,e.graphics.clientSize.width,s.x),this.uriAnnotation=new _l(s,this.url),this.uriAnnotation.dictionary.items.setValue("Border",this.defaultBorder),e.annotations.add(this.uriAnnotation),r=0!==n?this.drawText(e,new Xo(0,s.y)):this.drawText(e,s.x,s.y),i.y+=o.height}return r},e.prototype.drawMultipleLineWithBounds=function(t,e,i){for(var r,n=0;n<t.layoutLines.length;n++){var o=this.font.measureString(t.lines[n].text),s=new Zo(new Xo(i.x,i.y),o);if(s=this.calculateBounds(s,o.width,i.width,i.x),this.text=t.lines[n].text,i.y+o.height>e.graphics.clientSize.height){if(0===n)break;e=e.graphics.getNextPage(),i=new Zo(i.x,0,i.width,o.height),s.y=0}this.uriAnnotation=new _l(s,this.url),this.uriAnnotation.dictionary.items.setValue("Border",this.defaultBorder),e.annotations.add(this.uriAnnotation),r=this.drawText(e,i),i.y+=o.height}return r},e.prototype.calculateBounds=function(t,e,i,r){return null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Fo.Center?(t.x=r+(i-e)/2,t.width=e):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Fo.Right?(t.x=r+(i-e),t.width=e):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Fo.Justify?(t.x=r,t.width=i):(t.width=r,t.width=e),t},e}(zl),Ul=function(){function t(){}return t.convert=function(t,e){var i="";switch(e){case As.None:i="";break;case As.Numeric:i=t.toString();break;case As.LowerLatin:i=this.arabicToLetter(t).toLowerCase();break;case As.LowerRoman:i=this.arabicToRoman(t).toLowerCase();break;case As.UpperLatin:i=this.arabicToLetter(t);break;case As.UpperRoman:i=this.arabicToRoman(t)}return i},t.arabicToRoman=function(t){var e="",i=this.generateNumber(t,1e3,"M");e+=i.returnValue,t=i.intArabic;var r=this.generateNumber(t,900,"CM");e+=r.returnValue,t=r.intArabic;var n=this.generateNumber(t,500,"D");e+=n.returnValue,t=n.intArabic;var o=this.generateNumber(t,400,"CD");e+=o.returnValue,t=o.intArabic;var s=this.generateNumber(t,100,"C");e+=s.returnValue,t=s.intArabic;var a=this.generateNumber(t,90,"XC");e+=a.returnValue,t=a.intArabic;var l=this.generateNumber(t,50,"L");e+=l.returnValue,t=l.intArabic;var h=this.generateNumber(t,40,"XL");e+=h.returnValue,t=h.intArabic;var u=this.generateNumber(t,10,"X");e+=u.returnValue,t=u.intArabic;var c=this.generateNumber(t,9,"IX");e+=c.returnValue,t=c.intArabic;var p=this.generateNumber(t,5,"V");e+=p.returnValue,t=p.intArabic;var d=this.generateNumber(t,4,"IV");e+=d.returnValue,t=d.intArabic;var f=this.generateNumber(t,1,"I");return e+=f.returnValue,t=f.intArabic,e.toString()},t.arabicToLetter=function(t){for(var e=this.convertToLetter(t),i="";e.length>0;){var r=e.pop();i=this.appendChar(i,r)}return i.toString()},t.generateNumber=function(t,e,i){for(var r="";t>=e;)t-=e,r+=i;return{returnValue:r.toString(),intArabic:t}},t.convertToLetter=function(t){if(t<=0)throw Error("ArgumentOutOfRangeException-arabic, Value can not be less 0");for(var e=[];t>this.letterLimit;){var i=t%this.letterLimit;0===i?(t=t/this.letterLimit-1,i=this.letterLimit):t/=this.letterLimit,e.push(i)}return e.push(t),e},t.appendChar=function(e,i){return e+=String.fromCharCode(t.acsiiStartIndex+i)},t.letterLimit=26,t.acsiiStartIndex=64,t}(),ql=function(){function t(t,e){this.pdfTemplate=null,this.content="",void 0===t||(this.template=t,this.value=e)}return Object.defineProperty(t.prototype,"template",{get:function(){return this.pdfTemplate},set:function(t){this.pdfTemplate=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.content},set:function(t){this.content=t},enumerable:!0,configurable:!0}),t}(),Kl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Yl=function(t){function e(){var e=t.call(this)||this;return e.list=new Ys,e}return Kl(e,t),e.prototype.performDraw=function(e,i,r,n){t.prototype.performDrawHelper.call(this,e,i,r,n);var o=this.getValue(e),s=new Ha(this.getSize());this.list.setValue(e,new ql(s,o));var a=this.getSize();s.graphics.drawString(o,this.getFont(),this.pen,this.getBrush(),0,0,a.width,a.height,this.stringFormat);var l=new Xo(i.x+this.location.x,i.y+this.location.y);e.drawPdfTemplate(s,l,new Qo(s.width*r,s.height*n))},e}(Zs),$l=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Jl=(function(t){function e(e,i){var r=t.call(this)||this;return r.internalNumberStyle=As.Numeric,void 0===i?r.font=e:i instanceof es?(r.font=e,r.brush=i):(r.font=e,r.bounds=i),r}$l(e,t),Object.defineProperty(e.prototype,"numberStyle",{get:function(){return this.internalNumberStyle},set:function(t){this.internalNumberStyle=t},enumerable:!0,configurable:!0}),e.prototype.getValue=function(t){var e=this.getPageFromGraphics(t);return this.internalGetValue(e)},e.prototype.internalGetValue=function(t){var e=t.document.pages.indexOf(t)+1;return Ul.convert(e,this.numberStyle)}}(Yl),function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),Xl=(function(t){function e(e,i,r){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o];var s=t.call(this)||this;return s.internalAutomaticFields=null,s.internalText="",s.font=e,s.brush=i,s.text=r,s.automaticFields=n,s}Jl(e,t),Object.defineProperty(e.prototype,"text",{get:function(){return this.internalText},set:function(t){this.internalText=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"automaticFields",{get:function(){return this.internalAutomaticFields},set:function(t){this.internalAutomaticFields=t},enumerable:!0,configurable:!0}),e.prototype.getValue=function(t){var e=this.text.toString();if(void 0!==this.automaticFields&&null!=this.automaticFields&&this.automaticFields.length>0)for(var i=0;i<this.automaticFields.length;i++){var r=this.automaticFields[i];e=e.replace("{"+i+"}",r.getValue(t))}return e}}(Yl),function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),Ql=function(t){function e(){var e=t.call(this)||this;return e.list=new Ys,e.painterGraphics=[],e}return Xl(e,t),e.prototype.performDraw=function(e,i,r,n){t.prototype.performDrawHelper.call(this,e,i,r,n);var o=this.getPageFromGraphics(e).document,s=this.getValue(e);if(this.list.containsKey(o)){var a=this.list.getValue(o),l=new Xo(i.x+this.location.x,i.y+this.location.y);e.drawPdfTemplate(a.template,l,new Qo(a.template.width*r,a.template.height*n)),this.painterGraphics.push(e)}else{var h=this.getSize(),u=new Ha(h);this.list.setValue(o,new ql(u,s)),u.graphics.drawString(s,this.getFont(),this.pen,this.getBrush(),0,0,h.width,h.height,this.stringFormat);l=new Xo(i.x+this.location.x,i.y+this.location.y);e.drawPdfTemplate(u,l,new Qo(u.width*r,u.height*n)),this.painterGraphics.push(e)}},e}(Zs),Zl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();!function(t){function e(e,i){var r=t.call(this)||this;return r.internalNumberStyle=As.Numeric,void 0===i?r.font=e:i instanceof es?(r.font=e,r.brush=i):(r.font=e,r.bounds=i),r}Zl(e,t),Object.defineProperty(e.prototype,"numberStyle",{get:function(){return this.internalNumberStyle},set:function(t){this.internalNumberStyle=t},enumerable:!0,configurable:!0}),e.prototype.getValue=function(t){var e=this.getPageFromGraphics(t).section.parent.document.pages.count;return Ul.convert(e,this.numberStyle)}}(Ql);!function(t){t[t.Location=0]="Location",t[t.FitToPage=1]="FitToPage",t[t.FitR=2]="FitR"}(za||(za={}));!function(){function t(t,e){this.dictionaryProperties=new to,this.destinationMode=za.Location,this.zoomFactor=0,this.destinationLocation=new Xo(0,0),this.bounds=new Zo,this.array=new ho;Rs.RotateAngle0;this.destinationLocation=new Xo(0,this.destinationLocation.y),this.pdfPage=t,e instanceof Xo?this.destinationLocation=e:this.bounds=e}Object.defineProperty(t.prototype,"zoom",{get:function(){return this.zoomFactor},set:function(t){this.zoomFactor=t,this.initializePrimitive()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"page",{get:function(){return this.pdfPage},set:function(t){this.pdfPage=t,this.initializePrimitive()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mode",{get:function(){return this.destinationMode},set:function(t){this.destinationMode=t,this.initializePrimitive()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this.destinationLocation},set:function(t){this.destinationLocation=t,this.initializePrimitive()},enumerable:!0,configurable:!0}),t.prototype.pointToNativePdf=function(t,e){return t.section.pointToNativePdf(t,e)},t.prototype.initializePrimitive=function(){switch(this.array.clear(),this.array.add(new jo(this.pdfPage)),this.destinationMode){case za.Location:var t=this.pdfPage,e=new Xo;e=this.pointToNativePdf(t,this.destinationLocation),this.array.add(new Qn(this.dictionaryProperties.xyz)),this.array.add(new lo(e.x)),this.array.add(new lo(e.y)),this.array.add(new lo(this.zoomFactor));break;case za.FitToPage:this.array.add(new Qn(this.dictionaryProperties.fit))}},Object.defineProperty(t.prototype,"element",{get:function(){return this.initializePrimitive(),this.array},enumerable:!0,configurable:!0})}();var th,eh=function(){function t(t){this.mDictionary=null,this.mDictionaryProperties=new to,this.mDictionary=t}return Object.defineProperty(t.prototype,"domain",{get:function(){return this.mDictionary.items.getValue(this.mDictionaryProperties.domain)},set:function(t){this.mDictionary.items.setValue(this.mDictionaryProperties.domain,t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"range",{get:function(){return this.mDictionary.items.getValue(this.mDictionaryProperties.range)},set:function(t){this.mDictionary.items.setValue(this.mDictionaryProperties.range,t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dictionary",{get:function(){return this.mDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.mDictionary},enumerable:!0,configurable:!0}),t}(),ih=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rh=function(t){function e(e,i,r,n){var o=t.call(this,new Lo)||this;return void 0===e?o.dictionary.items.setValue(o.mDictionaryProperties.functionType,new lo(0)):(o.dictionary.items.setValue(o.mDictionaryProperties.functionType,new lo(0)),o.checkParams(e,i,r,n),o.setDomainAndRange(e,i),o.setSizeAndValues(r,n)),o}return ih(e,t),e.prototype.checkParams=function(t,e,i,r){e.length,t.length,r.length},e.prototype.setDomainAndRange=function(t,e){this.domain=new ho(t),this.range=new ho(e)},e.prototype.setSizeAndValues=function(t,e){var i=this.dictionary;this.dictionary.items.setValue(this.mDictionaryProperties.size,new ho(t)),this.dictionary.items.setValue(this.mDictionaryProperties.bitsPerSample,new lo(8)),i.writeBytes(e)},e}(eh);!function(t){t[t.None=0]="None",t[t.Start=1]="Start",t[t.End=2]="End",t[t.Both=3]="Both"}(th||(th={}));var nh;!function(t){t[t.BackwardDiagonal=0]="BackwardDiagonal",t[t.ForwardDiagonal=1]="ForwardDiagonal",t[t.Horizontal=2]="Horizontal",t[t.Vertical=3]="Vertical"}(nh||(nh={}));var oh;!function(t){t[t.Function=1]="Function",t[t.Axial=2]="Axial",t[t.Radial=3]="Radial"}(oh||(oh={}));var sh;!function(t){t[t.ActiveBorder=1]="ActiveBorder",t[t.ActiveCaption=2]="ActiveCaption",t[t.ActiveCaptionText=3]="ActiveCaptionText",t[t.AppWorkspace=4]="AppWorkspace",t[t.Control=5]="Control",t[t.ControlDark=6]="ControlDark",t[t.ControlDarkDark=7]="ControlDarkDark",t[t.ControlLight=8]="ControlLight",t[t.ControlLightLight=9]="ControlLightLight",t[t.ControlText=10]="ControlText",t[t.Desktop=11]="Desktop",t[t.GrayText=12]="GrayText",t[t.Highlight=13]="Highlight",t[t.HighlightText=14]="HighlightText",t[t.HotTrack=15]="HotTrack",t[t.InactiveBorder=16]="InactiveBorder",t[t.InactiveCaption=17]="InactiveCaption",t[t.InactiveCaptionText=18]="InactiveCaptionText",t[t.Info=19]="Info",t[t.InfoText=20]="InfoText",t[t.Menu=21]="Menu",t[t.MenuText=22]="MenuText",t[t.ScrollBar=23]="ScrollBar",t[t.Window=24]="Window",t[t.WindowFrame=25]="WindowFrame",t[t.WindowText=26]="WindowText",t[t.Transparent=27]="Transparent",t[t.AliceBlue=28]="AliceBlue",t[t.AntiqueWhite=29]="AntiqueWhite",t[t.Aqua=30]="Aqua",t[t.Aquamarine=31]="Aquamarine",t[t.Azure=32]="Azure",t[t.Beige=33]="Beige",t[t.Bisque=34]="Bisque",t[t.Black=35]="Black",t[t.BlanchedAlmond=36]="BlanchedAlmond",t[t.Blue=37]="Blue",t[t.BlueViolet=38]="BlueViolet",t[t.Brown=39]="Brown",t[t.BurlyWood=40]="BurlyWood",t[t.CadetBlue=41]="CadetBlue",t[t.Chartreuse=42]="Chartreuse",t[t.Chocolate=43]="Chocolate",t[t.Coral=44]="Coral",t[t.CornflowerBlue=45]="CornflowerBlue",t[t.Cornsilk=46]="Cornsilk",t[t.Crimson=47]="Crimson",t[t.Cyan=48]="Cyan",t[t.DarkBlue=49]="DarkBlue",t[t.DarkCyan=50]="DarkCyan",t[t.DarkGoldenrod=51]="DarkGoldenrod",t[t.DarkGray=52]="DarkGray",t[t.DarkGreen=53]="DarkGreen",t[t.DarkKhaki=54]="DarkKhaki",t[t.DarkMagenta=55]="DarkMagenta",t[t.DarkOliveGreen=56]="DarkOliveGreen",t[t.DarkOrange=57]="DarkOrange",t[t.DarkOrchid=58]="DarkOrchid",t[t.DarkRed=59]="DarkRed",t[t.DarkSalmon=60]="DarkSalmon",t[t.DarkSeaGreen=61]="DarkSeaGreen",t[t.DarkSlateBlue=62]="DarkSlateBlue",t[t.DarkSlateGray=63]="DarkSlateGray",t[t.DarkTurquoise=64]="DarkTurquoise",t[t.DarkViolet=65]="DarkViolet",t[t.DeepPink=66]="DeepPink",t[t.DeepSkyBlue=67]="DeepSkyBlue",t[t.DimGray=68]="DimGray",t[t.DodgerBlue=69]="DodgerBlue",t[t.Firebrick=70]="Firebrick",t[t.FloralWhite=71]="FloralWhite",t[t.ForestGreen=72]="ForestGreen",t[t.Fuchsia=73]="Fuchsia",t[t.Gainsboro=74]="Gainsboro",t[t.GhostWhite=75]="GhostWhite",t[t.Gold=76]="Gold",t[t.Goldenrod=77]="Goldenrod",t[t.Gray=78]="Gray",t[t.Green=79]="Green",t[t.GreenYellow=80]="GreenYellow",t[t.Honeydew=81]="Honeydew",t[t.HotPink=82]="HotPink",t[t.IndianRed=83]="IndianRed",t[t.Indigo=84]="Indigo",t[t.Ivory=85]="Ivory",t[t.Khaki=86]="Khaki",t[t.Lavender=87]="Lavender",t[t.LavenderBlush=88]="LavenderBlush",t[t.LawnGreen=89]="LawnGreen",t[t.LemonChiffon=90]="LemonChiffon",t[t.LightBlue=91]="LightBlue",t[t.LightCoral=92]="LightCoral",t[t.LightCyan=93]="LightCyan",t[t.LightGoldenrodYellow=94]="LightGoldenrodYellow",t[t.LightGray=95]="LightGray",t[t.LightGreen=96]="LightGreen",t[t.LightPink=97]="LightPink",t[t.LightSalmon=98]="LightSalmon",t[t.LightSeaGreen=99]="LightSeaGreen",t[t.LightSkyBlue=100]="LightSkyBlue",t[t.LightSlateGray=101]="LightSlateGray",t[t.LightSteelBlue=102]="LightSteelBlue",t[t.LightYellow=103]="LightYellow",t[t.Lime=104]="Lime",t[t.LimeGreen=105]="LimeGreen",t[t.Linen=106]="Linen",t[t.Magenta=107]="Magenta",t[t.Maroon=108]="Maroon",t[t.MediumAquamarine=109]="MediumAquamarine",t[t.MediumBlue=110]="MediumBlue",t[t.MediumOrchid=111]="MediumOrchid",t[t.MediumPurple=112]="MediumPurple",t[t.MediumSeaGreen=113]="MediumSeaGreen",t[t.MediumSlateBlue=114]="MediumSlateBlue",t[t.MediumSpringGreen=115]="MediumSpringGreen",t[t.MediumTurquoise=116]="MediumTurquoise",t[t.MediumVioletRed=117]="MediumVioletRed",t[t.MidnightBlue=118]="MidnightBlue",t[t.MintCream=119]="MintCream",t[t.MistyRose=120]="MistyRose",t[t.Moccasin=121]="Moccasin",t[t.NavajoWhite=122]="NavajoWhite",t[t.Navy=123]="Navy",t[t.OldLace=124]="OldLace",t[t.Olive=125]="Olive",t[t.OliveDrab=126]="OliveDrab",t[t.Orange=127]="Orange",t[t.OrangeRed=128]="OrangeRed",t[t.Orchid=129]="Orchid",t[t.PaleGoldenrod=130]="PaleGoldenrod",t[t.PaleGreen=131]="PaleGreen",t[t.PaleTurquoise=132]="PaleTurquoise",t[t.PaleVioletRed=133]="PaleVioletRed",t[t.PapayaWhip=134]="PapayaWhip",t[t.PeachPuff=135]="PeachPuff",t[t.Peru=136]="Peru",t[t.Pink=137]="Pink",t[t.Plum=138]="Plum",t[t.PowderBlue=139]="PowderBlue",t[t.Purple=140]="Purple",t[t.Red=141]="Red",t[t.RosyBrown=142]="RosyBrown",t[t.RoyalBlue=143]="RoyalBlue",t[t.SaddleBrown=144]="SaddleBrown",t[t.Salmon=145]="Salmon",t[t.SandyBrown=146]="SandyBrown",t[t.SeaGreen=147]="SeaGreen",t[t.SeaShell=148]="SeaShell",t[t.Sienna=149]="Sienna",t[t.Silver=150]="Silver",t[t.SkyBlue=151]="SkyBlue",t[t.SlateBlue=152]="SlateBlue",t[t.SlateGray=153]="SlateGray",t[t.Snow=154]="Snow",t[t.SpringGreen=155]="SpringGreen",t[t.SteelBlue=156]="SteelBlue",t[t.Tan=157]="Tan",t[t.Teal=158]="Teal",t[t.Thistle=159]="Thistle",t[t.Tomato=160]="Tomato",t[t.Turquoise=161]="Turquoise",t[t.Violet=162]="Violet",t[t.Wheat=163]="Wheat",t[t.White=164]="White",t[t.WhiteSmoke=165]="WhiteSmoke",t[t.Yellow=166]="Yellow",t[t.YellowGreen=167]="YellowGreen",t[t.ButtonFace=168]="ButtonFace",t[t.ButtonHighlight=169]="ButtonHighlight",t[t.ButtonShadow=170]="ButtonShadow",t[t.GradientActiveCaption=171]="GradientActiveCaption",t[t.GradientInactiveCaption=172]="GradientInactiveCaption",t[t.MenuBar=173]="MenuBar",t[t.MenuHighlight=174]="MenuHighlight"}(sh||(sh={}));!function(){function t(){}Object.defineProperty(t,"AliceBlue",{get:function(){var t=null;return this.sBrushes.containsKey(sh.AliceBlue)&&(t=this.sBrushes.getValue(sh.AliceBlue)),null==t&&(t=this.getBrush(sh.AliceBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"AntiqueWhite",{get:function(){var t=null;return this.sBrushes.containsKey(sh.AntiqueWhite)&&(t=this.sBrushes.getValue(sh.AntiqueWhite)),null==t&&(t=this.getBrush(sh.AntiqueWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Aqua",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Aqua)&&(t=this.sBrushes.getValue(sh.Aqua)),null==t&&(t=this.getBrush(sh.Aqua)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Aquamarine",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Aquamarine)&&(t=this.sBrushes.getValue(sh.Aquamarine)),null==t&&(t=this.getBrush(sh.Aquamarine)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Azure",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Azure)&&(t=this.sBrushes.getValue(sh.Azure)),null==t&&(t=this.getBrush(sh.Azure)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Beige",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Beige)&&(t=this.sBrushes.getValue(sh.Beige)),null==t&&(t=this.getBrush(sh.Beige)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Bisque",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Bisque)&&(t=this.sBrushes.getValue(sh.Bisque)),null==t&&(t=this.getBrush(sh.Bisque)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Black",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Black)&&(t=this.sBrushes.getValue(sh.Black)),null==t&&(t=this.getBrush(sh.Black)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BlanchedAlmond",{get:function(){var t=null;return this.sBrushes.containsKey(sh.BlanchedAlmond)&&(t=this.sBrushes.getValue(sh.BlanchedAlmond)),null==t&&(t=this.getBrush(sh.BlanchedAlmond)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Blue",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Blue)&&(t=this.sBrushes.getValue(sh.Blue)),null==t&&(t=this.getBrush(sh.Blue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BlueViolet",{get:function(){var t=null;return this.sBrushes.containsKey(sh.BlueViolet)&&(t=this.sBrushes.getValue(sh.BlueViolet)),null==t&&(t=this.getBrush(sh.BlueViolet)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Brown",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Brown)&&(t=this.sBrushes.getValue(sh.Brown)),null==t&&(t=this.getBrush(sh.Brown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BurlyWood",{get:function(){var t=null;return this.sBrushes.containsKey(sh.BurlyWood)&&(t=this.sBrushes.getValue(sh.BurlyWood)),null==t&&(t=this.getBrush(sh.BurlyWood)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"CadetBlue",{get:function(){var t=null;return this.sBrushes.containsKey(sh.CadetBlue)&&(t=this.sBrushes.getValue(sh.CadetBlue)),null==t&&(t=this.getBrush(sh.CadetBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Chartreuse",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Chartreuse)&&(t=this.sBrushes.getValue(sh.Chartreuse)),null==t&&(t=this.getBrush(sh.Chartreuse)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Chocolate",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Chocolate)&&(t=this.sBrushes.getValue(sh.Chocolate)),null==t&&(t=this.getBrush(sh.Chocolate)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Coral",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Coral)&&(t=this.sBrushes.getValue(sh.Coral)),null==t&&(t=this.getBrush(sh.Coral)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"CornflowerBlue",{get:function(){var t=null;return this.sBrushes.containsKey(sh.CornflowerBlue)&&(t=this.sBrushes.getValue(sh.CornflowerBlue)),null==t&&(t=this.getBrush(sh.CornflowerBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Cornsilk",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Cornsilk)&&(t=this.sBrushes.getValue(sh.Cornsilk)),null==t&&(t=this.getBrush(sh.Cornsilk)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Crimson",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Crimson)&&(t=this.sBrushes.getValue(sh.Crimson)),null==t&&(t=this.getBrush(sh.Crimson)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Cyan",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Cyan)&&(t=this.sBrushes.getValue(sh.Cyan)),null==t&&(t=this.getBrush(sh.Cyan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkBlue",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DarkBlue)&&(t=this.sBrushes.getValue(sh.DarkBlue)),null==t&&(t=this.getBrush(sh.DarkBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkCyan",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DarkCyan)&&(t=this.sBrushes.getValue(sh.DarkCyan)),null==t&&(t=this.getBrush(sh.DarkCyan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkGoldenrod",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DarkGoldenrod)&&(t=this.sBrushes.getValue(sh.DarkGoldenrod)),null==t&&(t=this.getBrush(sh.DarkGoldenrod)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkGray",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DarkGray)&&(t=this.sBrushes.getValue(sh.DarkGray)),null==t&&(t=this.getBrush(sh.DarkGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkGreen",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DarkGreen)&&(t=this.sBrushes.getValue(sh.DarkGreen)),null==t&&(t=this.getBrush(sh.DarkGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkKhaki",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DarkKhaki)&&(t=this.sBrushes.getValue(sh.DarkKhaki)),null==t&&(t=this.getBrush(sh.DarkKhaki)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkMagenta",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DarkMagenta)&&(t=this.sBrushes.getValue(sh.DarkMagenta)),null==t&&(t=this.getBrush(sh.DarkMagenta)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkOliveGreen",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DarkOliveGreen)&&(t=this.sBrushes.getValue(sh.DarkOliveGreen)),null==t&&(t=this.getBrush(sh.DarkOliveGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkOrange",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DarkOrange)&&(t=this.sBrushes.getValue(sh.DarkOrange)),null==t&&(t=this.getBrush(sh.DarkOrange)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkOrchid",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DarkOrchid)&&(t=this.sBrushes.getValue(sh.DarkOrchid)),null==t&&(t=this.getBrush(sh.DarkOrchid)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkRed",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DarkRed)&&(t=this.sBrushes.getValue(sh.DarkRed)),null==t&&(t=this.getBrush(sh.DarkRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSalmon",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DarkSalmon)&&(t=this.sBrushes.getValue(sh.DarkSalmon)),null==t&&(t=this.getBrush(sh.DarkSalmon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DarkSeaGreen)&&(t=this.sBrushes.getValue(sh.DarkSeaGreen)),null==t&&(t=this.getBrush(sh.DarkSeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSlateBlue",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DarkSlateBlue)&&(t=this.sBrushes.getValue(sh.DarkSlateBlue)),null==t&&(t=this.getBrush(sh.DarkSlateBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSlateGray",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DarkSlateGray)&&(t=this.sBrushes.getValue(sh.DarkSlateGray)),null==t&&(t=this.getBrush(sh.DarkSlateGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkTurquoise",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DarkTurquoise)&&(t=this.sBrushes.getValue(sh.DarkTurquoise)),null==t&&(t=this.getBrush(sh.DarkTurquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkViolet",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DarkViolet)&&(t=this.sBrushes.getValue(sh.DarkViolet)),null==t&&(t=this.getBrush(sh.DarkViolet)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DeepPink",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DeepPink)&&(t=this.sBrushes.getValue(sh.DeepPink)),null==t&&(t=this.getBrush(sh.DeepPink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DeepSkyBlue",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DeepSkyBlue)&&(t=this.sBrushes.getValue(sh.DeepSkyBlue)),null==t&&(t=this.getBrush(sh.DeepSkyBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DimGray",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DimGray)&&(t=this.sBrushes.getValue(sh.DimGray)),null==t&&(t=this.getBrush(sh.DimGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DodgerBlue",{get:function(){var t=null;return this.sBrushes.containsKey(sh.DodgerBlue)&&(t=this.sBrushes.getValue(sh.DodgerBlue)),null==t&&(t=this.getBrush(sh.DodgerBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Firebrick",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Firebrick)&&(t=this.sBrushes.getValue(sh.Firebrick)),null==t&&(t=this.getBrush(sh.Firebrick)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"FloralWhite",{get:function(){var t=null;return this.sBrushes.containsKey(sh.FloralWhite)&&(t=this.sBrushes.getValue(sh.FloralWhite)),null==t&&(t=this.getBrush(sh.FloralWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"ForestGreen",{get:function(){var t=null;return this.sBrushes.containsKey(sh.ForestGreen)&&(t=this.sBrushes.getValue(sh.ForestGreen)),null==t&&(t=this.getBrush(sh.ForestGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Fuchsia",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Fuchsia)&&(t=this.sBrushes.getValue(sh.Fuchsia)),null==t&&(t=this.getBrush(sh.Fuchsia)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Gainsboro",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Gainsboro)&&(t=this.sBrushes.getValue(sh.Gainsboro)),null==t&&(t=this.getBrush(sh.Gainsboro)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"GhostWhite",{get:function(){var t=null;return this.sBrushes.containsKey(sh.GhostWhite)&&(t=this.sBrushes.getValue(sh.GhostWhite)),null==t&&(t=this.getBrush(sh.GhostWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Gold",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Gold)&&(t=this.sBrushes.getValue(sh.Gold)),null==t&&(t=this.getBrush(sh.Gold)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Goldenrod",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Goldenrod)&&(t=this.sBrushes.getValue(sh.Goldenrod)),null==t&&(t=this.getBrush(sh.Goldenrod)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Gray",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Gray)&&(t=this.sBrushes.getValue(sh.Gray)),null==t&&(t=this.getBrush(sh.Gray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Green",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Green)&&(t=this.sBrushes.getValue(sh.Green)),null==t&&(t=this.getBrush(sh.Green)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"GreenYellow",{get:function(){var t=null;return this.sBrushes.containsKey(sh.GreenYellow)&&(t=this.sBrushes.getValue(sh.GreenYellow)),null==t&&(t=this.getBrush(sh.GreenYellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Honeydew",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Honeydew)&&(t=this.sBrushes.getValue(sh.Honeydew)),null==t&&(t=this.getBrush(sh.Honeydew)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"HotPink",{get:function(){var t=null;return this.sBrushes.containsKey(sh.HotPink)&&(t=this.sBrushes.getValue(sh.HotPink)),null==t&&(t=this.getBrush(sh.HotPink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"IndianRed",{get:function(){var t=null;return this.sBrushes.containsKey(sh.IndianRed)&&(t=this.sBrushes.getValue(sh.IndianRed)),null==t&&(t=this.getBrush(sh.IndianRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Indigo",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Indigo)&&(t=this.sBrushes.getValue(sh.Indigo)),null==t&&(t=this.getBrush(sh.Indigo)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Ivory",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Ivory)&&(t=this.sBrushes.getValue(sh.Ivory)),null==t&&(t=this.getBrush(sh.Ivory)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Khaki",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Khaki)&&(t=this.sBrushes.getValue(sh.Khaki)),null==t&&(t=this.getBrush(sh.Khaki)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Lavender",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Lavender)&&(t=this.sBrushes.getValue(sh.Lavender)),null==t&&(t=this.getBrush(sh.Lavender)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LavenderBlush",{get:function(){var t=null;return this.sBrushes.containsKey(sh.LavenderBlush)&&(t=this.sBrushes.getValue(sh.LavenderBlush)),null==t&&(t=this.getBrush(sh.LavenderBlush)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LawnGreen",{get:function(){var t=null;return this.sBrushes.containsKey(sh.LawnGreen)&&(t=this.sBrushes.getValue(sh.LawnGreen)),null==t&&(t=this.getBrush(sh.LawnGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LemonChiffon",{get:function(){var t=null;return this.sBrushes.containsKey(sh.LemonChiffon)&&(t=this.sBrushes.getValue(sh.LemonChiffon)),null==t&&(t=this.getBrush(sh.LemonChiffon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightBlue",{get:function(){var t=null;return this.sBrushes.containsKey(sh.LightBlue)&&(t=this.sBrushes.getValue(sh.LightBlue)),null==t&&(t=this.getBrush(sh.LightBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightCoral",{get:function(){var t=null;return this.sBrushes.containsKey(sh.LightCoral)&&(t=this.sBrushes.getValue(sh.LightCoral)),null==t&&(t=this.getBrush(sh.LightCoral)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightCyan",{get:function(){var t=null;return this.sBrushes.containsKey(sh.LightCyan)&&(t=this.sBrushes.getValue(sh.LightCyan)),null==t&&(t=this.getBrush(sh.LightCyan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightGoldenrodYellow",{get:function(){var t=null;return this.sBrushes.containsKey(sh.LightGoldenrodYellow)&&(t=this.sBrushes.getValue(sh.LightGoldenrodYellow)),null==t&&(t=this.getBrush(sh.LightGoldenrodYellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightGray",{get:function(){var t=null;return this.sBrushes.containsKey(sh.LightGray)&&(t=this.sBrushes.getValue(sh.LightGray)),null==t&&(t=this.getBrush(sh.LightGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightGreen",{get:function(){var t=null;return this.sBrushes.containsKey(sh.LightGreen)&&(t=this.sBrushes.getValue(sh.LightGreen)),null==t&&(t=this.getBrush(sh.LightGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightPink",{get:function(){var t=null;return this.sBrushes.containsKey(sh.LightPink)&&(t=this.sBrushes.getValue(sh.LightPink)),null==t&&(t=this.getBrush(sh.LightPink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSalmon",{get:function(){var t=null;return this.sBrushes.containsKey(sh.LightSalmon)&&(t=this.sBrushes.getValue(sh.LightSalmon)),null==t&&(t=this.getBrush(sh.LightSalmon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(sh.LightSeaGreen)&&(t=this.sBrushes.getValue(sh.LightSeaGreen)),null==t&&(t=this.getBrush(sh.LightSeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSkyBlue",{get:function(){var t=null;return this.sBrushes.containsKey(sh.LightSkyBlue)&&(t=this.sBrushes.getValue(sh.LightSkyBlue)),null==t&&(t=this.getBrush(sh.LightSkyBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSlateGray",{get:function(){var t=null;return this.sBrushes.containsKey(sh.LightSlateGray)&&(t=this.sBrushes.getValue(sh.LightSlateGray)),null==t&&(t=this.getBrush(sh.LightSlateGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSteelBlue",{get:function(){var t=null;return this.sBrushes.containsKey(sh.LightSteelBlue)&&(t=this.sBrushes.getValue(sh.LightSteelBlue)),null==t&&(t=this.getBrush(sh.LightSteelBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightYellow",{get:function(){var t=null;return this.sBrushes.containsKey(sh.LightYellow)&&(t=this.sBrushes.getValue(sh.LightYellow)),null==t&&(t=this.getBrush(sh.LightYellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Lime",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Lime)&&(t=this.sBrushes.getValue(sh.Lime)),null==t&&(t=this.getBrush(sh.Lime)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LimeGreen",{get:function(){var t=null;return this.sBrushes.containsKey(sh.LimeGreen)&&(t=this.sBrushes.getValue(sh.LimeGreen)),null==t&&(t=this.getBrush(sh.LimeGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Linen",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Linen)&&(t=this.sBrushes.getValue(sh.Linen)),null==t&&(t=this.getBrush(sh.Linen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Magenta",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Magenta)&&(t=this.sBrushes.getValue(sh.Magenta)),null==t&&(t=this.getBrush(sh.Magenta)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Maroon",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Maroon)&&(t=this.sBrushes.getValue(sh.Maroon)),null==t&&(t=this.getBrush(sh.Maroon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumAquamarine",{get:function(){var t=null;return this.sBrushes.containsKey(sh.MediumAquamarine)&&(t=this.sBrushes.getValue(sh.MediumAquamarine)),null==t&&(t=this.getBrush(sh.MediumAquamarine)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumBlue",{get:function(){var t=null;return this.sBrushes.containsKey(sh.MediumBlue)&&(t=this.sBrushes.getValue(sh.MediumBlue)),null==t&&(t=this.getBrush(sh.MediumBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumOrchid",{get:function(){var t=null;return this.sBrushes.containsKey(sh.MediumOrchid)&&(t=this.sBrushes.getValue(sh.MediumOrchid)),null==t&&(t=this.getBrush(sh.MediumOrchid)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumPurple",{get:function(){var t=null;return this.sBrushes.containsKey(sh.MediumPurple)&&(t=this.sBrushes.getValue(sh.MediumPurple)),null==t&&(t=this.getBrush(sh.MediumPurple)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumSeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(sh.MediumSeaGreen)&&(t=this.sBrushes.getValue(sh.MediumSeaGreen)),null==t&&(t=this.getBrush(sh.MediumSeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumSlateBlue",{get:function(){var t=null;return this.sBrushes.containsKey(sh.MediumSlateBlue)&&(t=this.sBrushes.getValue(sh.MediumSlateBlue)),null==t&&(t=this.getBrush(sh.MediumSlateBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumSpringGreen",{get:function(){var t=null;return this.sBrushes.containsKey(sh.MediumSpringGreen)&&(t=this.sBrushes.getValue(sh.MediumSpringGreen)),null==t&&(t=this.getBrush(sh.MediumSpringGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumTurquoise",{get:function(){var t=null;return this.sBrushes.containsKey(sh.MediumTurquoise)&&(t=this.sBrushes.getValue(sh.MediumTurquoise)),null==t&&(t=this.getBrush(sh.MediumTurquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumVioletRed",{get:function(){var t=null;return this.sBrushes.containsKey(sh.MediumVioletRed)&&(t=this.sBrushes.getValue(sh.MediumVioletRed)),null==t&&(t=this.getBrush(sh.MediumVioletRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MidnightBlue",{get:function(){var t=null;return this.sBrushes.containsKey(sh.MidnightBlue)&&(t=this.sBrushes.getValue(sh.MidnightBlue)),null==t&&(t=this.getBrush(sh.MidnightBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MintCream",{get:function(){var t=null;return this.sBrushes.containsKey(sh.MintCream)&&(t=this.sBrushes.getValue(sh.MintCream)),null==t&&(t=this.getBrush(sh.MintCream)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MistyRose",{get:function(){var t=null;return this.sBrushes.containsKey(sh.MistyRose)&&(t=this.sBrushes.getValue(sh.MistyRose)),null==t&&(t=this.getBrush(sh.MistyRose)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Moccasin",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Moccasin)&&(t=this.sBrushes.getValue(sh.Moccasin)),null==t&&(t=this.getBrush(sh.Moccasin)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"NavajoWhite",{get:function(){var t=null;return this.sBrushes.containsKey(sh.NavajoWhite)&&(t=this.sBrushes.getValue(sh.NavajoWhite)),null==t&&(t=this.getBrush(sh.NavajoWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Navy",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Navy)&&(t=this.sBrushes.getValue(sh.Navy)),null==t&&(t=this.getBrush(sh.Navy)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OldLace",{get:function(){var t=null;return this.sBrushes.containsKey(sh.OldLace)&&(t=this.sBrushes.getValue(sh.OldLace)),null==t&&(t=this.getBrush(sh.OldLace)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Olive",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Olive)&&(t=this.sBrushes.getValue(sh.Olive)),null==t&&(t=this.getBrush(sh.Olive)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OliveDrab",{get:function(){var t=null;return this.sBrushes.containsKey(sh.OliveDrab)&&(t=this.sBrushes.getValue(sh.OliveDrab)),null==t&&(t=this.getBrush(sh.OliveDrab)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Orange",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Orange)&&(t=this.sBrushes.getValue(sh.Orange)),null==t&&(t=this.getBrush(sh.Orange)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OrangeRed",{get:function(){var t=null;return this.sBrushes.containsKey(sh.OrangeRed)&&(t=this.sBrushes.getValue(sh.OrangeRed)),null==t&&(t=this.getBrush(sh.OrangeRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Orchid",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Orchid)&&(t=this.sBrushes.getValue(sh.Orchid)),null==t&&(t=this.getBrush(sh.Orchid)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleGoldenrod",{get:function(){var t=null;return this.sBrushes.containsKey(sh.PaleGoldenrod)&&(t=this.sBrushes.getValue(sh.PaleGoldenrod)),null==t&&(t=this.getBrush(sh.PaleGoldenrod)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleGreen",{get:function(){var t=null;return this.sBrushes.containsKey(sh.PaleGreen)&&(t=this.sBrushes.getValue(sh.PaleGreen)),null==t&&(t=this.getBrush(sh.PaleGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleTurquoise",{get:function(){var t=null;return this.sBrushes.containsKey(sh.PaleTurquoise)&&(t=this.sBrushes.getValue(sh.PaleTurquoise)),null==t&&(t=this.getBrush(sh.PaleTurquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleVioletRed",{get:function(){var t=null;return this.sBrushes.containsKey(sh.PaleVioletRed)&&(t=this.sBrushes.getValue(sh.PaleVioletRed)),null==t&&(t=this.getBrush(sh.PaleVioletRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PapayaWhip",{get:function(){var t=null;return this.sBrushes.containsKey(sh.PapayaWhip)&&(t=this.sBrushes.getValue(sh.PapayaWhip)),null==t&&(t=this.getBrush(sh.PapayaWhip)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PeachPuff",{get:function(){var t=null;return this.sBrushes.containsKey(sh.PeachPuff)&&(t=this.sBrushes.getValue(sh.PeachPuff)),null==t&&(t=this.getBrush(sh.PeachPuff)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Peru",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Peru)&&(t=this.sBrushes.getValue(sh.Peru)),null==t&&(t=this.getBrush(sh.Peru)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Pink",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Pink)&&(t=this.sBrushes.getValue(sh.Pink)),null==t&&(t=this.getBrush(sh.Pink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Plum",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Plum)&&(t=this.sBrushes.getValue(sh.Plum)),null==t&&(t=this.getBrush(sh.Plum)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PowderBlue",{get:function(){var t=null;return this.sBrushes.containsKey(sh.PowderBlue)&&(t=this.sBrushes.getValue(sh.PowderBlue)),null==t&&(t=this.getBrush(sh.PowderBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Purple",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Purple)&&(t=this.sBrushes.getValue(sh.Purple)),null==t&&(t=this.getBrush(sh.Purple)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Red",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Red)&&(t=this.sBrushes.getValue(sh.Red)),null==t&&(t=this.getBrush(sh.Red)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"RosyBrown",{get:function(){var t=null;return this.sBrushes.containsKey(sh.RosyBrown)&&(t=this.sBrushes.getValue(sh.RosyBrown)),null==t&&(t=this.getBrush(sh.RosyBrown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"RoyalBlue",{get:function(){var t=null;return this.sBrushes.containsKey(sh.RoyalBlue)&&(t=this.sBrushes.getValue(sh.RoyalBlue)),null==t&&(t=this.getBrush(sh.RoyalBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SaddleBrown",{get:function(){var t=null;return this.sBrushes.containsKey(sh.SaddleBrown)&&(t=this.sBrushes.getValue(sh.SaddleBrown)),null==t&&(t=this.getBrush(sh.SaddleBrown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Salmon",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Salmon)&&(t=this.sBrushes.getValue(sh.Salmon)),null==t&&(t=this.getBrush(sh.Salmon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SandyBrown",{get:function(){var t=null;return this.sBrushes.containsKey(sh.SandyBrown)&&(t=this.sBrushes.getValue(sh.SandyBrown)),null==t&&(t=this.getBrush(sh.SandyBrown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(sh.SeaGreen)&&(t=this.sBrushes.getValue(sh.SeaGreen)),null==t&&(t=this.getBrush(sh.SeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SeaShell",{get:function(){var t=null;return this.sBrushes.containsKey(sh.SeaShell)&&(t=this.sBrushes.getValue(sh.SeaShell)),null==t&&(t=this.getBrush(sh.SeaShell)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Sienna",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Sienna)&&(t=this.sBrushes.getValue(sh.Sienna)),null==t&&(t=this.getBrush(sh.Sienna)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Silver",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Silver)&&(t=this.sBrushes.getValue(sh.Silver)),null==t&&(t=this.getBrush(sh.Silver)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SkyBlue",{get:function(){var t=null;return this.sBrushes.containsKey(sh.SkyBlue)&&(t=this.sBrushes.getValue(sh.SkyBlue)),null==t&&(t=this.getBrush(sh.SkyBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SlateBlue",{get:function(){var t=null;return this.sBrushes.containsKey(sh.SlateBlue)&&(t=this.sBrushes.getValue(sh.SlateBlue)),null==t&&(t=this.getBrush(sh.SlateBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SlateGray",{get:function(){var t=null;return this.sBrushes.containsKey(sh.SlateGray)&&(t=this.sBrushes.getValue(sh.SlateGray)),null==t&&(t=this.getBrush(sh.SlateGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Snow",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Snow)&&(t=this.sBrushes.getValue(sh.Snow)),null==t&&(t=this.getBrush(sh.Snow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SpringGreen",{get:function(){var t=null;return this.sBrushes.containsKey(sh.SpringGreen)&&(t=this.sBrushes.getValue(sh.SpringGreen)),null==t&&(t=this.getBrush(sh.SpringGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SteelBlue",{get:function(){var t=null;return this.sBrushes.containsKey(sh.SteelBlue)&&(t=this.sBrushes.getValue(sh.SteelBlue)),null==t&&(t=this.getBrush(sh.SteelBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Tan",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Tan)&&(t=this.sBrushes.getValue(sh.Tan)),null==t&&(t=this.getBrush(sh.Tan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Teal",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Teal)&&(t=this.sBrushes.getValue(sh.Teal)),null==t&&(t=this.getBrush(sh.Teal)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Thistle",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Thistle)&&(t=this.sBrushes.getValue(sh.Thistle)),null==t&&(t=this.getBrush(sh.Thistle)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Tomato",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Tomato)&&(t=this.sBrushes.getValue(sh.Tomato)),null==t&&(t=this.getBrush(sh.Tomato)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Transparent",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Transparent)&&(t=this.sBrushes.getValue(sh.Transparent)),null==t&&(t=this.getBrush(sh.Transparent)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Turquoise",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Turquoise)&&(t=this.sBrushes.getValue(sh.Turquoise)),null==t&&(t=this.getBrush(sh.Turquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Violet",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Violet)&&(t=this.sBrushes.getValue(sh.Violet)),null==t&&(t=this.getBrush(sh.Violet)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Wheat",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Wheat)&&(t=this.sBrushes.getValue(sh.Wheat)),null==t&&(t=this.getBrush(sh.Wheat)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"White",{get:function(){var t=null;return this.sBrushes.containsKey(sh.White)&&(t=this.sBrushes.getValue(sh.White)),null==t&&(t=this.getBrush(sh.White)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WhiteSmoke",{get:function(){var t=null;return this.sBrushes.containsKey(sh.WhiteSmoke)&&(t=this.sBrushes.getValue(sh.WhiteSmoke)),null==t&&(t=this.getBrush(sh.WhiteSmoke)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Yellow",{get:function(){var t=null;return this.sBrushes.containsKey(sh.Yellow)&&(t=this.sBrushes.getValue(sh.Yellow)),null==t&&(t=this.getBrush(sh.Yellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"YellowGreen",{get:function(){var t=null;return this.sBrushes.containsKey(sh.YellowGreen)&&(t=this.sBrushes.getValue(sh.YellowGreen)),null==t&&(t=this.getBrush(sh.YellowGreen)),t},enumerable:!0,configurable:!0}),t.getBrush=function(t){var e=this.getColorValue(t),i=new rs(e);return this.sBrushes.setValue(t,i),i},t.getColorValue=function(t){var e=new Jo;switch(t){case sh.Transparent:e=new Jo(0,255,255,255);break;case sh.AliceBlue:e=new Jo(255,240,248,255);break;case sh.AntiqueWhite:e=new Jo(255,250,235,215);break;case sh.Aqua:e=new Jo(255,0,255,255);break;case sh.Aquamarine:e=new Jo(255,127,255,212);break;case sh.Azure:e=new Jo(255,240,255,255);break;case sh.Beige:e=new Jo(255,245,245,220);break;case sh.Bisque:e=new Jo(255,255,228,196);break;case sh.Black:e=new Jo(255,0,0,0);break;case sh.BlanchedAlmond:e=new Jo(255,255,235,205);break;case sh.Blue:e=new Jo(255,0,0,255);break;case sh.BlueViolet:e=new Jo(255,138,43,226);break;case sh.Brown:e=new Jo(255,165,42,42);break;case sh.BurlyWood:e=new Jo(255,222,184,135);break;case sh.CadetBlue:e=new Jo(255,95,158,160);break;case sh.Chartreuse:e=new Jo(255,127,255,0);break;case sh.Chocolate:e=new Jo(255,210,105,30);break;case sh.Coral:e=new Jo(255,255,127,80);break;case sh.CornflowerBlue:e=new Jo(255,100,149,237);break;case sh.Cornsilk:e=new Jo(255,255,248,220);break;case sh.Crimson:e=new Jo(255,220,20,60);break;case sh.Cyan:e=new Jo(255,0,255,255);break;case sh.DarkBlue:e=new Jo(255,0,0,139);break;case sh.DarkCyan:e=new Jo(255,0,139,139);break;case sh.DarkGoldenrod:e=new Jo(255,184,134,11);break;case sh.DarkGray:e=new Jo(255,169,169,169);break;case sh.DarkGreen:e=new Jo(255,0,100,0);break;case sh.DarkKhaki:e=new Jo(255,189,183,107);break;case sh.DarkMagenta:e=new Jo(255,139,0,139);break;case sh.DarkOliveGreen:e=new Jo(255,85,107,47);break;case sh.DarkOrange:e=new Jo(255,255,140,0);break;case sh.DarkOrchid:e=new Jo(255,153,50,204);break;case sh.DarkRed:e=new Jo(255,139,0,0);break;case sh.DarkSalmon:e=new Jo(255,233,150,122);break;case sh.DarkSeaGreen:e=new Jo(255,143,188,139);break;case sh.DarkSlateBlue:e=new Jo(255,72,61,139);break;case sh.DarkSlateGray:e=new Jo(255,47,79,79);break;case sh.DarkTurquoise:e=new Jo(255,0,206,209);break;case sh.DarkViolet:e=new Jo(255,148,0,211);break;case sh.DeepPink:e=new Jo(255,255,20,147);break;case sh.DeepSkyBlue:e=new Jo(255,0,191,255);break;case sh.DimGray:e=new Jo(255,105,105,105);break;case sh.DodgerBlue:e=new Jo(255,30,144,255);break;case sh.Firebrick:e=new Jo(255,178,34,34);break;case sh.FloralWhite:e=new Jo(255,255,250,240);break;case sh.ForestGreen:e=new Jo(255,34,139,34);break;case sh.Fuchsia:e=new Jo(255,255,0,255);break;case sh.Gainsboro:e=new Jo(255,220,220,220);break;case sh.GhostWhite:e=new Jo(255,248,248,255);break;case sh.Gold:e=new Jo(255,255,215,0);break;case sh.Goldenrod:e=new Jo(255,218,165,32);break;case sh.Gray:e=new Jo(255,128,128,128);break;case sh.Green:e=new Jo(255,0,128,0);break;case sh.GreenYellow:e=new Jo(255,173,255,47);break;case sh.Honeydew:e=new Jo(255,240,255,240);break;case sh.HotPink:e=new Jo(255,255,105,180);break;case sh.IndianRed:e=new Jo(255,205,92,92);break;case sh.Indigo:e=new Jo(255,75,0,130);break;case sh.Ivory:e=new Jo(255,255,255,240);break;case sh.Khaki:e=new Jo(255,240,230,140);break;case sh.Lavender:e=new Jo(255,230,230,250);break;case sh.LavenderBlush:e=new Jo(255,255,240,245);break;case sh.LawnGreen:e=new Jo(255,124,252,0);break;case sh.LemonChiffon:e=new Jo(255,255,250,205);break;case sh.LightBlue:e=new Jo(255,173,216,230);break;case sh.LightCoral:e=new Jo(255,240,128,128);break;case sh.LightCyan:e=new Jo(255,224,255,255);break;case sh.LightGoldenrodYellow:e=new Jo(255,250,250,210);break;case sh.LightGreen:e=new Jo(255,144,238,144);break;case sh.LightGray:e=new Jo(255,211,211,211);break;case sh.LightPink:e=new Jo(255,255,182,193);break;case sh.LightSalmon:e=new Jo(255,255,160,122);break;case sh.LightSeaGreen:e=new Jo(255,32,178,170);break;case sh.LightSkyBlue:e=new Jo(255,135,206,250);break;case sh.LightSlateGray:e=new Jo(255,119,136,153);break;case sh.LightSteelBlue:e=new Jo(255,176,196,222);break;case sh.LightYellow:e=new Jo(255,255,255,224);break;case sh.Lime:e=new Jo(255,0,255,0);break;case sh.LimeGreen:e=new Jo(255,50,205,50);break;case sh.Linen:e=new Jo(255,250,240,230);break;case sh.Magenta:e=new Jo(255,255,0,255);break;case sh.Maroon:e=new Jo(255,128,0,0);break;case sh.MediumAquamarine:e=new Jo(255,102,205,170);break;case sh.MediumBlue:e=new Jo(255,0,0,205);break;case sh.MediumOrchid:e=new Jo(255,186,85,211);break;case sh.MediumPurple:e=new Jo(255,147,112,219);break;case sh.MediumSeaGreen:e=new Jo(255,60,179,113);break;case sh.MediumSlateBlue:e=new Jo(255,123,104,238);break;case sh.MediumSpringGreen:e=new Jo(255,0,250,154);break;case sh.MediumTurquoise:e=new Jo(255,72,209,204);break;case sh.MediumVioletRed:e=new Jo(255,199,21,133);break;case sh.MidnightBlue:e=new Jo(255,25,25,112);break;case sh.MintCream:e=new Jo(255,245,255,250);break;case sh.MistyRose:e=new Jo(255,255,228,225);break;case sh.Moccasin:e=new Jo(255,255,228,181);break;case sh.NavajoWhite:e=new Jo(255,255,222,173);break;case sh.Navy:e=new Jo(255,0,0,128);break;case sh.OldLace:e=new Jo(255,253,245,230);break;case sh.Olive:e=new Jo(255,128,128,0);break;case sh.OliveDrab:e=new Jo(255,107,142,35);break;case sh.Orange:e=new Jo(255,255,165,0);break;case sh.OrangeRed:e=new Jo(255,255,69,0);break;case sh.Orchid:e=new Jo(255,218,112,214);break;case sh.PaleGoldenrod:e=new Jo(255,238,232,170);break;case sh.PaleGreen:e=new Jo(255,152,251,152);break;case sh.PaleTurquoise:e=new Jo(255,175,238,238);break;case sh.PaleVioletRed:e=new Jo(255,219,112,147);break;case sh.PapayaWhip:e=new Jo(255,255,239,213);break;case sh.PeachPuff:e=new Jo(255,255,218,185);break;case sh.Peru:e=new Jo(255,205,133,63);break;case sh.Pink:e=new Jo(255,255,192,203);break;case sh.Plum:e=new Jo(255,221,160,221);break;case sh.PowderBlue:e=new Jo(255,176,224,230);break;case sh.Purple:e=new Jo(255,128,0,128);break;case sh.Red:e=new Jo(255,255,0,0);break;case sh.RosyBrown:e=new Jo(255,188,143,143);break;case sh.RoyalBlue:e=new Jo(255,65,105,225);break;case sh.SaddleBrown:e=new Jo(255,139,69,19);break;case sh.Salmon:e=new Jo(255,250,128,114);break;case sh.SandyBrown:e=new Jo(255,244,164,96);break;case sh.SeaGreen:e=new Jo(255,46,139,87);break;case sh.SeaShell:e=new Jo(255,255,245,238);break;case sh.Sienna:e=new Jo(255,160,82,45);break;case sh.Silver:e=new Jo(255,192,192,192);break;case sh.SkyBlue:e=new Jo(255,135,206,235);break;case sh.SlateBlue:e=new Jo(255,106,90,205);break;case sh.SlateGray:e=new Jo(255,112,128,144);break;case sh.Snow:e=new Jo(255,255,250,250);break;case sh.SpringGreen:e=new Jo(255,0,255,127);break;case sh.SteelBlue:e=new Jo(255,70,130,180);break;case sh.Tan:e=new Jo(255,210,180,140);break;case sh.Teal:e=new Jo(255,0,128,128);break;case sh.Thistle:e=new Jo(255,216,191,216);break;case sh.Tomato:e=new Jo(255,255,99,71);break;case sh.Turquoise:e=new Jo(255,64,224,208);break;case sh.Violet:e=new Jo(255,238,130,238);break;case sh.Wheat:e=new Jo(255,245,222,179);break;case sh.White:e=new Jo(255,255,255,255);break;case sh.WhiteSmoke:e=new Jo(255,245,245,245);break;case sh.Yellow:e=new Jo(255,255,255,0);break;case sh.YellowGreen:e=new Jo(255,154,205,50)}return e},t.sBrushes=new Xn}();var ah,lh=function(){function t(t){this.precision=1e3}return Object.defineProperty(t.prototype,"factors",{get:function(){return this.mFactors},set:function(t){if(null==t)throw new Error("ArgumentNullException : Factors");this.mFactors=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"positions",{get:function(){return this.mPositions},set:function(t){for(var e=t,i=0;i<e.length;i++)(e[i]<0||e[i]>1)&&(e[i]=0);this.mPositions=e,this.mPositions=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.mCount},enumerable:!0,configurable:!0}),t.prototype.generateColorBlend=function(t,e){if(null==t)throw new Error("ArgumentNullException : colours");null==this.positions&&(this.positions=[0]);var i=new uh(this.count),r=this.positions,n=null;if(1===r.length)(r=[3])[0]=0,r[1]=this.positions[0],r[2]=1,(n=new Array(3))[0]=t[0],n[1]=t[0],n[2]=t[1];else{var o=t[0],s=t[1];n=new Array(this.count);var a=0,l=this.count;for(a=0;a<l;++a)n[a]=this.interpolate(this.mFactors[a],o,s,e)}return i.positions=r,i.colors=n,i},t.prototype.clonePdfBlend=function(){return null!=this.mFactors&&(this.factors=this.mFactors),null!=this.positions&&(this.positions=this.positions),this},t.prototype.gcd=function(t,e){if("number"==typeof t&&"number"==typeof e&&void 0!==e){if(t<0||t>1)throw new Error("ArgumentOutOfRangeException : u");if(e<0||e>1)throw new Error("ArgumentOutOfRangeException : v");var i=Math.max(1,t*this.precision),r=Math.max(1,e*this.precision);return this.gcdInt(i,r)/this.precision}var n=t;if(null==n)throw new Error("ArgumentNullException : values");if(n.length<1)throw new Error("ArgumentException : Not enough values in the array. - values");var o=n[0];if(n.length>1)for(var s=n.length,a=1;a<s&&(o=this.gcd(n[a],o))!==1/this.precision;++a);return o},t.prototype.gcdInt=function(t,e){if(t<=0)throw new Error("ArgumentOutOfRangeException"+t+"The arguments cannot be less or equal to zero.");if(e<=0)throw new Error("ArgumentOutOfRangeException"+e+"The arguments cannot be less or equal to zero.");if(1===t||1===e)return 1;for(var i=0;this.isEven(t,e);)++i,t>>=1,e>>=1;for(;(1&t)<=0;)t>>=1;do{for(;(1&e)<=0;)e>>=1;if(t>e){var r=e;e=t,t=r}e-=t}while(0!==e);return t<<i},t.prototype.isEven=function(t,e){if("number"==typeof e&&void 0!==e){var i=!0;return i=i&&(1&t)<=0,i=i&&(1&e)<=0}return(1&t)<=0},t.prototype.interpolate=function(t,e,i,r){if(e instanceof Jo){var n=new Jo;switch(r){case Wo.Rgb:var o=this.interpolate(t,e.red,i.red),s=this.interpolate(t,e.green,i.green),a=this.interpolate(t,e.blue,i.blue);n=new Jo(o,s,a);break;case Wo.GrayScale:var l=this.interpolate(t,e.gray,i.gray);n=new Jo(l);break;case Wo.Cmyk:var h=this.interpolate(t,e.c,i.c),u=this.interpolate(t,e.m,i.m),c=this.interpolate(t,e.y,i.y),p=this.interpolate(t,e.k,i.k);n=new Jo(h,u,c,p)}return n}return 0===t?e:1===t?i:e+(i-e)/1*(t-0)},t}(),hh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),uh=function(t){function e(e){var i=t.call(this)||this;return"number"==typeof e&&(i=t.call(this,e)||this),i}return hh(e,t),Object.defineProperty(e.prototype,"colors",{get:function(){return this.mcolors},set:function(t){if(null==t)throw new Error("ArgumentNullException : Colors");this.mcolors=t},enumerable:!0,configurable:!0}),e.prototype.getFunction=function(t){var e=this.getColorComponentsCount(t),i=this.getMaxComponentValue(t),r=this.setRange(e,i),n=null;if(null==this.mbrush&&void 0===this.mbrush){var o=[1],s=void 0,a=1;if(2===this.positions.length)s=2;else{var l=this.positions,h=this.getIntervals(l),u=this.gcd(h);a=u,s=1/u+1}o[0]=s;var c=this.getSamplesValues(t,s,i,a);return n=new rh([0,1],r,o,c)}return n},e.prototype.cloneColorBlend=function(){return null!=this.mcolors&&void 0!==this.mcolors&&(this.colors=this.mcolors),null!=this.positions&&void 0!==this.positions&&(this.positions=this.positions),this},e.prototype.setRange=function(t,e){for(var i=[2*t],r=0;r<t;++r)i[2*r]=0,i[2*r+1]=1;return i},e.prototype.getColorComponentsCount=function(t){var e=0;switch(t){case Wo.Rgb:e=3;break;case Wo.Cmyk:e=4;break;case Wo.GrayScale:e=1;break;default:throw new Error("ArgumentException - Unsupported color space: "+t+" colorSpace")}return e},e.prototype.getSamplesValues=function(t,e,i,r){var n;switch(t){case Wo.GrayScale:n=this.getGrayscaleSamples(e,i,r);break;case Wo.Cmyk:n=this.getCmykSamples(e,i,r);break;case Wo.Rgb:n=this.getRgbSamples(e,i,r);break;default:throw new Error("ArgumentException - Unsupported color space: "+t+" colorSpace")}return n},e.prototype.getGrayscaleSamples=function(t,e,i){for(var r=[2*t],n=0;n<t;++n)this.getNextColor(n,i,Wo.GrayScale);return r},e.prototype.getRgbSamples=function(t,e,i){for(var r=[3*t],n=0;n<t;++n){var o=this.getNextColor(n,i,Wo.Rgb),s=3*n;r[s]=o.r,r[s+1]=o.g,r[s+2]=o.b}return r},e.prototype.getCmykSamples=function(t,e,i){for(var r=[4*t],n=0;n<t;n++){var o=this.getNextColor(n,i,Wo.Cmyk),s=4*n;r[s]=o.c*e,r[s+1]=o.m*e,r[s+2]=o.y*e,r[s+3]=o.k*e}return r},e.prototype.getNextColor=function(t,e,i){var r,n,o,s=e*t,a=this.getIndices(s,n,r);if((n=a.indexLow)===(r=a.indexHi))o=this.mcolors[n];else{var l=this.positions[n],h=this.positions[r],u=this.mcolors[n],c=this.mcolors[r],p=(s-l)/(h-l);o=this.interpolate(p,u,c,i)}return o},e.prototype.getIndices=function(t,e,i){var r=this.positions;e=0,i=0;for(var n=0;n<this.mcolors.length;++n){var o=r[n];if(o===t){i=n,e=n;break}if(o>t){i=n;break}e=n,i=n}return{indexLow:e,indexHi:i}},e.prototype.getMaxComponentValue=function(t){var e=0;switch(t){case Wo.Cmyk:case Wo.Rgb:e=255;break;case Wo.GrayScale:e=65535;break;default:throw new Error("ArgumentException - Unsupported color space: "+t+"colorSpace")}return e},e.prototype.getIntervals=function(t){for(var e=t.length,i=[e-1],r=t[0],n=1;n<e;++n){var o=t[n];i[n-1]=o-r,r=o}return i},e}(lh),ch=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ph=(function(t){function e(e,i,r,n){var o=t.call(this,new eo)||this;if(o.mDictionaryProperties=new to,e instanceof Xo&&i instanceof Xo&&r instanceof Jo&&n instanceof Jo)o.initialize(r,n),o.mPointStart=e,o.mPointEnd=i,o.setPoints(o.mPointStart,o.mPointEnd);else if(e instanceof ts)if(o.initialize(i,r),n===nh.BackwardDiagonal||n===nh.ForwardDiagonal||n===nh.Horizontal||n===nh.Vertical){switch(o.mBoundaries=e,n){case nh.BackwardDiagonal:o.mPointStart=new Xo(e.right,e.top),o.mPointEnd=new Xo(e.left,e.bottom);break;case nh.ForwardDiagonal:o.mPointStart=new Xo(e.left,e.top),o.mPointEnd=new Xo(e.right,e.bottom);break;case nh.Horizontal:o.mPointStart=new Xo(e.left,e.top),o.mPointEnd=new Xo(e.right,e.top);break;case nh.Vertical:o.mPointStart=new Xo(e.left,e.top),o.mPointEnd=new Xo(e.left,e.bottom);break;default:throw new Error("ArgumentException -- Unsupported linear gradient mode: "+n+" mode")}o.setPoints(o.mPointStart,o.mPointEnd)}else if("number"==typeof n&&void 0!==n){if(o.mBoundaries=e,0===(n%=360))o.mPointStart=new Xo(e.left,e.top),o.mPointEnd=new Xo(e.right,e.top);else if(90===n)o.mPointStart=new Xo(e.left,e.top),o.mPointEnd=new Xo(e.left,e.bottom);else if(180===n)o.mPointEnd=new Xo(e.left,e.top),o.mPointStart=new Xo(e.right,e.top);else if(270===n)o.mPointEnd=new Xo(e.left,e.top),o.mPointStart=new Xo(e.left,e.bottom);else{var s=n*(Math.PI/180),a=Math.tan(s),l=o.mBoundaries.left+(o.mBoundaries.right-o.mBoundaries.left)/2,h=o.mBoundaries.top+(o.mBoundaries.bottom-o.mBoundaries.top)/2,u=new Xo(l,h);h=a*(l=o.mBoundaries.width/(2*Math.cos(s))),l+=u.x,h+=u.y;var c=new Xo(l,h),p=o.subPoints(c,u),d=o.choosePoint(n),f=o.mulPoints(o.subPoints(d,u),p)/o.mulPoints(p,p);o.mPointEnd=o.addPoints(u,o.mulPoint(p,f)),o.mPointStart=o.addPoints(u,o.mulPoint(p,-1*f))}o.setPoints(o.mPointEnd,o.mPointStart)}return o}ch(e,t),e.prototype.initialize=function(t,e){this.mColours=[t,e],this.mColourBlend=new uh(2),this.mColourBlend.positions=[0,1],this.mColourBlend.colors=this.mColours,this.initShading()},Object.defineProperty(e.prototype,"blend",{get:function(){return this.mBlend},set:function(t){if(null==t)throw new Error("ArgumentNullException : Blend");if(null==this.mColours)throw new Error("NotSupportedException : There is no starting and ending colours specified.");this.mBlend=t,this.mColourBlend=this.mBlend.generateColorBlend(this.mColours,this.colorSpace),this.resetFunction()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"interpolationColors",{get:function(){return this.mColourBlend},set:function(t){if(null==t)throw new Error("ArgumentNullException : InterpolationColors");this.mBlend=null,this.mColours=null,this.mColourBlend=t,this.resetFunction()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"linearColors",{get:function(){return this.mColours},set:function(t){if(null==t)throw new Error("ArgumentNullException : LinearColors");if(t.length<2)throw new Error("ArgumentException : The array is too small - LinearColors");null==this.mColours&&void 0===this.mColours?this.mColours=[t[0],t[1]]:(this.mColours[0]=t[0],this.mColours[1]=t[1]),null==this.mBlend&&void 0===this.mBlend?(this.mColourBlend=new uh(2),this.mColourBlend.colors=this.mColours,this.mColourBlend.positions=[0,1]):this.mColourBlend=this.mBlend.generateColorBlend(this.mColours,this.colorSpace),this.resetFunction()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rectangle",{get:function(){return this.mBoundaries},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extend",{get:function(){var t=th.None,e=this.shading.items.getValue(this.mDictionaryProperties.extend);if(null!=e){var i=e.items(0),r=e.items(1);i.value&&(t|=th.Start),r.value&&(t|=th.End)}return t},set:function(t){var e,i,r=this.shading.items.getValue(this.mDictionaryProperties.extend);null==r?(e=new ia(!1),i=new ia(!1),(r=new ho).add(e),r.add(i),this.shading.items.setValue(this.mDictionaryProperties.extend,r)):(e=r.items(0),i=r.items(1))},enumerable:!0,configurable:!0}),e.prototype.addPoints=function(t,e){var i=t.x+e.x,r=t.y+e.y;return new Xo(i,r)},e.prototype.subPoints=function(t,e){var i=t.x-e.x,r=t.y-e.y;return new Xo(i,r)},e.prototype.mulPoints=function(t,e){return t.x*e.x+t.y*e.y},e.prototype.mulPoint=function(t,e){return t.x=t.x*e,t.y=t.y*e,t},e.prototype.choosePoint=function(t){var e=new Xo(0,0);if(t<90&&t>0)e=new Xo(this.mBoundaries.right,this.mBoundaries.bottom);else if(t<180&&t>90)e=new Xo(this.mBoundaries.left,this.mBoundaries.bottom);else if(t<270&&t>180)e=new Xo(this.mBoundaries.left,this.mBoundaries.top);else{if(!(t>270))throw new Error("PdfException - Internal error.");e=new Xo(this.mBoundaries.right,this.mBoundaries.top)}return e},e.prototype.setPoints=function(t,e){var i=new ho;i.add(new lo(t.x)),i.add(new lo(this.updateY(t.y))),i.add(new lo(e.x)),i.add(new lo(this.updateY(e.y))),this.shading.items.setValue(this.mDictionaryProperties.coords,i)},e.prototype.updateY=function(t){return 0!==t?-t:t},e.prototype.initShading=function(){this.colorSpace=Wo.Rgb,this.function=this.mColourBlend.getFunction(this.colorSpace),this.shading.items.setValue(this.mDictionaryProperties.shadingType,new lo(oh.Axial))},e.prototype.clone=function(){return this.resetPatternDictionary(new eo(this.patternDictionary)),this.shading=new eo,this.initShading(),this.setPoints(this.mPointStart,this.mPointEnd),null!==this&&this instanceof e&&null!=this.matrix&&void 0!==this.matrix&&(this.matrix=this.matrix.clone()),null!=this.mColours&&void 0!==this.mColours&&(this.mColours=this.mColours),null!=this.blend&&void 0!==this.blend?this.blend=this.blend.clonePdfBlend():null!=this.interpolationColors&&void 0!==this.interpolationColors&&(this.interpolationColors=this.interpolationColors.cloneColorBlend()),this.extend=this.extend,this.cloneBackgroundValue(this),this.cloneAntiAliasingValue(this),this},e.prototype.resetFunction=function(){this.function=this.mColourBlend.getFunction(this.colorSpace)}}(_a),function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}());!function(t){function e(e,i,r,n,o,s){var a=t.call(this,new eo)||this;if(a.mDictionaryProperties=new to,a.initialize(o,s),i<0)throw new Error("ArgumentOutOfRangeException : radiusStart - The radius cannot be less then zero.");if(n<0)throw new Error("ArgumentOutOfRangeException : radiusEnd - The radius cannpt be less then zero.");return a.mPointEnd=r,a.mPointStart=e,a.mRadiusStart=i,a.mRadiusEnd=n,a.setPoints(a.mPointStart,a.mPointEnd,a.mRadiusStart,a.mRadiusEnd),a}ph(e,t),e.prototype.initialize=function(t,e){this.mColour=[t,e],this.mColourBlends=new uh(2),this.mColourBlends.positions=[0,1],this.mColourBlends.colors=this.mColour,this.initShading()},Object.defineProperty(e.prototype,"blend",{get:function(){return this.mBlend},set:function(t){if(null==t)throw new Error("ArgumentNullException : Blend");if(null==this.mColour&&void 0===this.mColour)throw new Error("NotSupportedException : There is no starting and ending colours specified.");this.mBlend=t,this.mColourBlends=this.mBlend.generateColorBlend(this.mColour,this.colorSpace),this.resetFunction()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"interpolationColors",{get:function(){return this.mColourBlends},set:function(t){if(null==t)throw new Error("ArgumentNullException : InterpolationColors");this.mBlend=null,this.mColour=null,this.mColourBlends=t,this.resetFunction()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"linearColors",{get:function(){return this.mColour},set:function(t){if(null==t)throw new Error("ArgumentNullException : radial LinearColors");if(t.length<2)throw new Error("ArgumentException : The array is too small LinearColors");null==this.mColour&&void 0===this.mColour?this.mColour=[t[0],t[1]]:(this.mColour[0]=t[0],this.mColour[1]=t[1]),null==this.mBlend&&void 0===this.mBlend?(this.mColourBlends=new uh(2),this.mColourBlends.colors=this.mColour,this.mColourBlends.positions=[0,1]):this.mColourBlends=this.mBlend.generateColorBlend(this.mColour,this.colorSpace),this.resetFunction()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rectangle",{get:function(){return this.mBoundaries},set:function(t){this.mBoundaries=t,this.bBox=ho.fromRectangle(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extend",{get:function(){var t=th.None,e=this.shading.items.getValue(this.mDictionaryProperties.extend);if(null!==e&&void 0!==e){var i=e.items(0),r=e.items(1);i.value&&(t|=th.Start),r.value&&(t|=th.End)}return t},set:function(t){var e,i,r=this.shading.items.getValue(this.mDictionaryProperties.extend);null==r&&void 0===r?(e=new ia(!1),i=new ia(!1),(r=new ho).add(e),r.add(i),this.shading.items.setValue(this.mDictionaryProperties.extend,r)):(e=r.items(0),i=r.items(1))},enumerable:!0,configurable:!0}),e.prototype.setPoints=function(t,e,i,r){var n=new ho;n.add(new lo(t.x)),n.add(new lo(this.updateY(t.y))),n.add(new lo(i)),n.add(new lo(e.x)),n.add(new lo(this.updateY(e.y))),i!==r?n.add(new lo(r)):n.add(new lo(0)),this.shading.items.setValue(this.mDictionaryProperties.coords,n)},e.prototype.updateY=function(t){return 0!==t?-t:t},e.prototype.initShading=function(){this.colorSpace=Wo.Rgb,this.function=this.mColourBlends.getFunction(this.colorSpace),this.shading.items.setValue(this.mDictionaryProperties.shadingType,new lo(oh.Radial))},e.prototype.clone=function(){return this.resetPatternDictionary(new eo(this.patternDictionary)),this.shading=new eo,this.initShading(),this.setPoints(this.mPointStart,this.mPointEnd,this.mRadiusStart,this.mRadiusEnd),this instanceof e&&null!==this.matrix&&void 0!==this.matrix&&(this.matrix=this.matrix.clone()),null!==this.mColour&&void 0!==this.mColour&&(this.mColour=this.mColour),null!==this.blend&&void 0!==this.blend?this.blend=this.blend.clonePdfBlend():null!==this.interpolationColors&&void 0!==this.interpolationColors&&(this.interpolationColors=this.interpolationColors.cloneColorBlend()),this.extend=this.extend,this.cloneBackgroundValue(this),this.cloneAntiAliasingValue(this),this},e.prototype.resetFunction=function(){this.function=this.mColourBlends.getFunction(this.colorSpace)}}(_a);!function(t){t[t.Overlap=0]="Overlap",t[t.Inside=1]="Inside"}(ah||(ah={}));var dh,fh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),gh=function(){function t(){}return Object.defineProperty(t.prototype,"backgroundBrush",{get:function(){return this.gridBackgroundBrush},set:function(t){this.gridBackgroundBrush=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textBrush",{get:function(){return this.gridTextBrush},set:function(t){this.gridTextBrush=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textPen",{get:function(){return this.gridTextPen},set:function(t){this.gridTextPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"font",{get:function(){return this.gridFont},set:function(t){this.gridFont=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"backgroundImage",{get:function(){return this.gridBackgroundImage},set:function(t){this.gridBackgroundImage=t},enumerable:!0,configurable:!0}),t}(),mh=function(t){function e(){var e=t.call(this)||this;return e.gridBorderOverlapStyle=ah.Overlap,e.bAllowHorizontalOverflow=!1,e.gridHorizontalOverflowType=dh.LastPage,e}return fh(e,t),Object.defineProperty(e.prototype,"cellSpacing",{get:function(){return void 0===this.gridCellSpacing&&(this.gridCellSpacing=0),this.gridCellSpacing},set:function(t){this.gridCellSpacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"horizontalOverflowType",{get:function(){return this.gridHorizontalOverflowType},set:function(t){this.gridHorizontalOverflowType=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"allowHorizontalOverflow",{get:function(){return this.bAllowHorizontalOverflow},set:function(t){this.bAllowHorizontalOverflow=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cellPadding",{get:function(){return void 0===this.gridCellPadding&&(this.gridCellPadding=new jl),this.gridCellPadding},set:function(t){void 0===this.gridCellPadding?(this.gridCellPadding=new jl,this.gridCellPadding=t):this.gridCellPadding=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"borderOverlapStyle",{get:function(){return this.gridBorderOverlapStyle},set:function(t){this.gridBorderOverlapStyle=t},enumerable:!0,configurable:!0}),e}(gh),yh=function(t){function e(){var e=t.call(this)||this;return e.gridCellBorders=El.default,e}return fh(e,t),Object.defineProperty(e.prototype,"stringFormat",{get:function(){return this.format},set:function(t){this.format=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"borders",{get:function(){return this.gridCellBorders},set:function(t){this.gridCellBorders=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cellPadding",{get:function(){return this.gridCellPadding},set:function(t){null!=this.gridCellPadding&&void 0!==this.gridCellPadding||(this.gridCellPadding=new jl),this.gridCellPadding=t},enumerable:!0,configurable:!0}),e}(gh),bh=function(){function t(){}return Object.defineProperty(t.prototype,"backgroundBrush",{get:function(){return this.gridRowBackgroundBrush},enumerable:!0,configurable:!0}),t.prototype.setBackgroundBrush=function(t){if(this.gridRowBackgroundBrush=t,void 0!==this.parent)for(var e=0;e<this.parent.cells.count;e++)this.parent.cells.getCell(e).style.backgroundBrush=t},Object.defineProperty(t.prototype,"textBrush",{get:function(){return this.gridRowTextBrush},enumerable:!0,configurable:!0}),t.prototype.setTextBrush=function(t){if(this.gridRowTextBrush=t,void 0!==this.parent)for(var e=0;e<this.parent.cells.count;e++)this.parent.cells.getCell(e).style.textBrush=t},Object.defineProperty(t.prototype,"textPen",{get:function(){return this.gridRowTextPen},enumerable:!0,configurable:!0}),t.prototype.setTextPen=function(t){if(this.gridRowTextPen=t,void 0!==this.parent)for(var e=0;e<this.parent.cells.count;e++)this.parent.cells.getCell(e).style.textPen=t},Object.defineProperty(t.prototype,"font",{get:function(){return this.gridRowFont},enumerable:!0,configurable:!0}),t.prototype.setFont=function(t){if(this.gridRowFont=t,void 0!==this.parent)for(var e=0;e<this.parent.cells.count;e++)this.parent.cells.getCell(e).style.font=t},Object.defineProperty(t.prototype,"border",{get:function(){return void 0===this.gridRowBorder&&this.setBorder(new El),this.gridRowBorder},enumerable:!0,configurable:!0}),t.prototype.setBorder=function(t){if(this.gridRowBorder=t,void 0!==this.parent)for(var e=0;e<this.parent.cells.count;e++)this.parent.cells.getCell(e).style.borders=t},t.prototype.setParent=function(t){this.parent=t},Object.defineProperty(t.prototype,"backgroundImage",{get:function(){return this.gridRowBackgroundImage},enumerable:!0,configurable:!0}),t.prototype.setBackgroundImage=function(t){this.gridRowBackgroundImage=t},t}();!function(t){t[t.NextPage=0]="NextPage",t[t.LastPage=1]="LastPage"}(dh||(dh={}));var vh=function(){function t(t){this.cellWidth=0,this.cellHeight=0,this.tempval=0,this.fontSpilt=!1,this.finsh=!0,this.rowSpanRemainingHeight=0,this.hasRowSpan=!1,this.hasColSpan=!1,this.isFinish=!0,this.present=!1,this.gridRowSpan=1,this.colSpan=1,void 0!==t&&(this.gridRow=t)}return Object.defineProperty(t.prototype,"isCellMergeContinue",{get:function(){return this.internalIsCellMergeContinue},set:function(t){this.internalIsCellMergeContinue=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRowMergeContinue",{get:function(){return this.internalIsRowMergeContinue},set:function(t){this.internalIsRowMergeContinue=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCellMergeStart",{get:function(){return this.internalIsCellMergeStart},set:function(t){this.internalIsCellMergeStart=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRowMergeStart",{get:function(){return this.internalIsRowMergeStart},set:function(t){this.internalIsRowMergeStart=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"remainingString",{get:function(){return this.remaining},set:function(t){this.remaining=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"FinishedDrawingCell",{get:function(){return this.isFinish},set:function(t){this.isFinish=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stringFormat",{get:function(){return null==this.format&&(this.format=new ys),this.format},set:function(t){this.format=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.gridRow},set:function(t){this.gridRow=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.objectValue},set:function(t){if(this.objectValue=t,this.objectValue instanceof Lh){this.row.grid.isSingleGrid=!1;this.objectValue.ParentCell=this,this.objectValue.isChildGrid=!0;for(var e=this.row.grid.rows.count,i=0;i<e;i++)for(var r=this.row.grid.rows.getRow(i),n=r.cells.count,o=0;o<n;o++){r.cells.getCell(o).parent=this}}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowSpan",{get:function(){return this.gridRowSpan},set:function(t){if(t<1)throw new Error("ArgumentException : Invalid span specified, must be greater than or equal to 1");this.gridRowSpan=t,this.row.rowSpanExists=!0,this.row.grid.hasRowSpanSpan=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return null==this.cellStyle&&(this.cellStyle=new yh),this.cellStyle},set:function(t){this.cellStyle=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return 0===this.cellHeight&&(this.cellHeight=this.measureHeight()),this.cellHeight},set:function(t){this.cellHeight=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columnSpan",{get:function(){return this.colSpan},set:function(t){if(t<1)throw Error("Invalid span specified, must be greater than or equal to 1");this.colSpan=t,this.row.columnSpanExists=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return(0===this.cellWidth||this.row.grid.isComplete)&&(this.cellWidth=this.measureWidth()),Math.round(this.cellWidth)},set:function(t){this.cellWidth=t},enumerable:!0,configurable:!0}),t.prototype.measureWidth=function(){var t=0,e=new vs;if("string"==typeof this.objectValue){t+=e.layout(this.objectValue,this.getTextFont(),this.stringFormat,new Qo(Number.MAX_VALUE,Number.MAX_VALUE),!1,new Qo(0,0)).actualSize.width,t+=2*(this.style.borders.left.width+this.style.borders.right.width)}else if(this.objectValue instanceof Lh)t=this.objectValue.size.width;else if(this.objectValue instanceof sa||this.objectValue instanceof la)t+=this.objectValue.width;else if(this.objectValue instanceof Wl){var i=this.objectValue;t+=e.layout(i.text,i.font,i.stringFormat,new Qo(0,0),!1,new Qo(0,0)).actualSize.width,t+=2*(this.style.borders.left.width+this.style.borders.right.width)}return this.objectValue instanceof Lh?null!=this.style.cellPadding||void 0!==this.style.cellPadding?(void 0!==this.style.cellPadding.left&&this.style.cellPadding.hasLeftPad&&(t+=this.style.cellPadding.left),void 0!==this.style.cellPadding.right&&this.style.cellPadding.hasRightPad&&(t+=this.style.cellPadding.right)):(void 0!==this.row.grid.style.cellPadding.left&&this.row.grid.style.cellPadding.hasLeftPad&&(t+=this.row.grid.style.cellPadding.left),void 0!==this.row.grid.style.cellPadding.right&&this.row.grid.style.cellPadding.hasRightPad&&(t+=this.row.grid.style.cellPadding.right)):null!=this.style.cellPadding?t+=this.style.cellPadding.left+this.style.cellPadding.right:t+=this.row.grid.style.cellPadding.left+this.row.grid.style.cellPadding.right,t+=this.row.grid.style.cellSpacing},t.prototype.drawCellBackground=function(t,e){var i=this.getBackgroundBrush();if(null!=i&&(t.save(),t.drawRectangle(i,e.x,e.y,e.width,e.height),t.restore()),null!=this.style.backgroundImage){this.getBackgroundImage();t.drawImage(this.style.backgroundImage,e.x,e.y,e.width,e.height)}},t.prototype.adjustContentLayoutArea=function(t){var e=new Zo(t.x,t.y,t.width,t.height);return this.objectValue instanceof Lh?(null==this.style.cellPadding||void 0===this.style.cellPadding?(void 0!==this.gridRow.grid.style.cellPadding.left&&this.gridRow.grid.style.cellPadding.hasLeftPad&&(e.x+=this.gridRow.grid.style.cellPadding.left+this.cellStyle.borders.left.width,e.width-=this.gridRow.grid.style.cellPadding.left),void 0!==this.gridRow.grid.style.cellPadding.top&&this.gridRow.grid.style.cellPadding.hasTopPad&&(e.y+=this.gridRow.grid.style.cellPadding.top+this.cellStyle.borders.top.width,e.height-=this.gridRow.grid.style.cellPadding.top),void 0!==this.gridRow.grid.style.cellPadding.right&&this.gridRow.grid.style.cellPadding.hasRightPad&&(e.width-=this.gridRow.grid.style.cellPadding.right),void 0!==this.gridRow.grid.style.cellPadding.bottom&&this.gridRow.grid.style.cellPadding.hasBottomPad&&(e.height-=this.gridRow.grid.style.cellPadding.bottom)):(void 0!==this.style.cellPadding.left&&this.style.cellPadding.hasLeftPad&&(e.x+=this.style.cellPadding.left+this.cellStyle.borders.left.width,e.width-=this.style.cellPadding.left),void 0!==this.style.cellPadding.top&&this.style.cellPadding.hasTopPad&&(e.y+=this.style.cellPadding.top+this.cellStyle.borders.top.width,e.height-=this.style.cellPadding.top),void 0!==this.style.cellPadding.right&&this.style.cellPadding.hasRightPad&&(e.width-=this.style.cellPadding.right),void 0!==this.style.cellPadding.bottom&&this.style.cellPadding.hasBottomPad&&(e.height-=this.style.cellPadding.bottom)),e.width-=this.cellStyle.borders.left.width+this.cellStyle.borders.right.width,e.height-=this.cellStyle.borders.top.width+this.cellStyle.borders.bottom.width):void 0===this.style.cellPadding||null==this.style.cellPadding?(e.x+=this.gridRow.grid.style.cellPadding.left+this.cellStyle.borders.left.width,e.y+=this.gridRow.grid.style.cellPadding.top+this.cellStyle.borders.top.width,e.width-=this.gridRow.grid.style.cellPadding.right+this.gridRow.grid.style.cellPadding.left,e.height-=this.gridRow.grid.style.cellPadding.bottom+this.gridRow.grid.style.cellPadding.top,e.height-=this.cellStyle.borders.top.width+this.cellStyle.borders.bottom.width):(e.x+=this.style.cellPadding.left+this.cellStyle.borders.left.width,e.y+=this.style.cellPadding.top+this.cellStyle.borders.top.width,e.width-=this.style.cellPadding.right+this.style.cellPadding.left,e.width-=this.cellStyle.borders.left.width+this.cellStyle.borders.right.width,e.height-=this.style.cellPadding.bottom+this.style.cellPadding.top,e.height-=this.cellStyle.borders.top.width+this.cellStyle.borders.bottom.width,1===this.rowSpan&&(e.width-=this.style.borders.left.width)),e},t.prototype.draw=function(t,e,i){var r=null;if(this.internalIsCellMergeContinue||this.internalIsRowMergeContinue){if(!this.internalIsCellMergeContinue||!this.row.grid.style.allowHorizontalOverflow)return r;if(this.row.rowOverflowIndex>0&&this.row.cells.indexOf(this)!=this.row.rowOverflowIndex+1||0==this.row.rowOverflowIndex&&this.internalIsCellMergeContinue)return r}e=this.adjustOuterLayoutArea(e,t),this.drawCellBackground(t,e);var n=this.getTextPen(),o=this.getTextBrush();void 0===n&&void 0===o&&(o=new rs(new Jo(0,0,0)));var s=this.getTextFont(),a=this.getStringFormat(),l=e;if(l.height>=t.clientSize.height&&this.row.grid.allowRowBreakAcrossPages&&(l.height-=l.y),l=this.adjustContentLayoutArea(l),"string"==typeof this.objectValue||"string"==typeof this.remaining){var h=void 0,u=void 0;if(u=l.height<s.height?new Zo(l.x,l.y,l.width,s.height):l,l.height<s.height&&this.row.grid.isChildGrid&&null!=this.row.grid.ParentCell){var c=u.height-this.row.grid.ParentCell.row.grid.style.cellPadding.bottom-this.row.grid.style.cellPadding.bottom;-1!=this.row.grid.splitChildRowIndex&&(this.fontSpilt=!0,this.row.rowFontSplit=!0),c>0&&c<s.height&&(u.height=c)}0!=this.gridRow.grid.style.cellSpacing&&(u.width-=this.gridRow.grid.style.cellSpacing,e.width-=this.gridRow.grid.style.cellSpacing),this.isFinish?(h=""===this.remaining?this.remaining:this.objectValue,t.drawString(h,s,n,o,u.x,u.y,u.width,u.height,a),-1==this.row.grid.splitChildRowIndex||this.row.grid.isChildGrid||void 0!==this.remaining||(this.remaining="")):(void 0!==this.remaining&&null!==this.remaining||(this.remaining=""),this.row.repeatFlag&&t.drawString(this.remaining,s,n,o,u.x,u.y,u.width,u.height,a),this.isFinish=!0),r=t.stringLayoutResult}else if(this.objectValue instanceof Lh){var p=this.objectValue;p.isChildGrid=!0,p.ParentCell=this;var d=void 0;d=l,0!=this.gridRow.grid.style.cellSpacing&&(e.width-=this.gridRow.grid.style.cellSpacing);var f=new Mh(p),g=new kh;null!=this.row.grid.LayoutFormat?g=this.row.grid.LayoutFormat:g.layout=ra.Paginate;var m=new Dl;if(null!=t.layer){m.page=t.page,m.bounds=d,m.format=g,p.setSpan(),p.checkSpan();var y=f.Layouter(m);this.value=p,-1!==this.row.grid.splitChildRowIndex&&(this.height=this.row.rowBreakHeightValue),m.page!=y.page&&(y.bounds.height=this.row.rowBreakHeightValue,0==this.row.rowBreakHeight?this.row.NestedGridLayoutResult=y:this.row.rowBreakHeight=this.row.rowBreakHeightValue)}}else if(this.objectValue instanceof sa||this.objectValue instanceof la){var b=void 0;b=this.objectValue.width<=l.width?new Zo(l.x,l.y,this.objectValue.width,l.height):l,t.drawImage(this.objectValue,b.x,b.y,b.width,b.height)}else this.objectValue instanceof Wl?this.objectValue.draw(t.currentPage,l):void 0===this.objectValue&&(this.objectValue="",t.drawString(this.objectValue,s,n,o,l.x,l.y,l.width,l.height,a),null!=this.style.cellPadding&&0==this.style.cellPadding.bottom&&0==this.style.cellPadding.left&&0==this.style.cellPadding.right&&0==this.style.cellPadding.top&&(e.width-=this.style.borders.left.width+this.style.borders.right.width),0!=this.gridRow.grid.style.cellSpacing&&(e.width-=this.gridRow.grid.style.cellSpacing));return null!=this.style.borders&&(this.fontSpilt?-1!=this.row.grid.ParentCell.row.grid.splitChildRowIndex&&(this.row.rowFontSplit=!1,this.drawCellBorders(t,e)):this.drawCellBorders(t,e)),r},t.prototype.drawCellBorders=function(t,e){this.row.grid.style.borderOverlapStyle===ah.Inside&&(e.x+=this.style.borders.left.width,e.y+=this.style.borders.top.width,e.width-=this.style.borders.right.width,e.height-=this.style.borders.bottom.width);var i=new Xo(e.x,e.y+e.height),r=new Xo(e.x,e.y),n=this.cellStyle.borders.left;this.cellStyle.borders.left.dashStyle===_o.Solid&&(n.lineCap=Go.Square),0!==n.width&&t.drawLine(n,i,r),i=new Xo(e.x+e.width,e.y),r=new Xo(e.x+e.width,e.y+e.height),n=this.cellStyle.borders.right,e.x+e.width>t.clientSize.width-n.width/2&&(i=new Xo(t.clientSize.width-n.width/2,e.y),r=new Xo(t.clientSize.width-n.width/2,e.y+e.height)),this.cellStyle.borders.right.dashStyle===_o.Solid&&(n.lineCap=Go.Square),0!==n.width&&t.drawLine(n,i,r),i=new Xo(e.x,e.y),r=new Xo(e.x+e.width,e.y),n=this.cellStyle.borders.top,this.cellStyle.borders.top.dashStyle===_o.Solid&&(n.lineCap=Go.Square),0!==n.width&&t.drawLine(n,i,r),i=new Xo(e.x+e.width,e.y+e.height),r=new Xo(e.x,e.y+e.height),n=this.cellStyle.borders.bottom,e.y+e.height>t.clientSize.height-n.width/2&&(i=new Xo(e.x+e.width,t.clientSize.height-n.width/2),r=new Xo(e.x,t.clientSize.height-n.width/2)),this.cellStyle.borders.bottom.dashStyle===_o.Solid&&(n.lineCap=Go.Square),0!==n.width&&t.drawLine(n,i,r)},t.prototype.adjustOuterLayoutArea=function(t,e){var i=!1,r=this.row.grid.style.cellSpacing;r>0&&(t=new Zo(t.x+r,t.y+r,t.width-r,t.height-r));var n=this.row.cells.indexOf(this);if(this.columnSpan>1||this.row.rowOverflowIndex>0&&n==this.row.rowOverflowIndex+1&&this.isCellMergeContinue){if(1==(h=this.columnSpan)&&this.isCellMergeContinue)for(var o=n+1;o<this.row.grid.columns.count&&this.row.cells.getCell(o).isCellMergeContinue;o++)h++;for(var s=0,a=n;a<n+h;a++){if(this.row.grid.style.allowHorizontalOverflow){var l=this.row.grid.size.width<e.clientSize.width?this.row.grid.size.width:e.clientSize.width;if((this.row.grid.size.width>e.clientSize.width?t.x+s+this.row.grid.columns.getColumn(a).width:s+this.row.grid.columns.getColumn(a).width)>l)break}s+=this.row.grid.columns.getColumn(a).width}s-=this.row.grid.style.cellSpacing,t.width=s}if(this.rowSpan>1||this.row.rowSpanExists){var h=this.rowSpan,u=this.row.grid.rows.rowCollection.indexOf(this.row);-1==u&&-1!=(u=this.row.grid.headers.indexOf(this.row))&&(i=!0);var c=0;for(a=u;a<u+h;a++){c+=i?this.row.grid.headers.getHeader(a).height:this.row.grid.rows.getRow(a).height;var p=this.row.grid.rows.getRow(a);this.row.grid.rows.rowCollection.indexOf(p)}this.row.cells.indexOf(this);c-=this.row.grid.style.cellSpacing,t.height=c,this.row.rowMergeComplete||(t.height=c)}return t},t.prototype.getTextFont=function(){return void 0!==this.style.font&&null!=this.style.font?this.style.font:void 0!==this.row.style.font&&null!=this.row.style.font?this.row.style.font:void 0!==this.row.grid.style.font&&null!=this.row.grid.style.font?this.row.grid.style.font:bl.defaultFont},t.prototype.getTextBrush=function(){return void 0!==this.style.textBrush&&null!=this.style.textBrush?this.style.textBrush:void 0!==this.row.style.textBrush&&null!=this.row.style.textBrush?this.row.style.textBrush:this.row.grid.style.textBrush},t.prototype.getTextPen=function(){return void 0!==this.style.textPen&&null!=this.style.textPen?this.style.textPen:void 0!==this.row.style.textPen&&null!=this.row.style.textPen?this.row.style.textPen:this.row.grid.style.textPen},t.prototype.getBackgroundBrush=function(){return void 0!==this.style.backgroundBrush&&null!=this.style.backgroundBrush?this.style.backgroundBrush:void 0!==this.row.style.backgroundBrush&&null!=this.row.style.backgroundBrush?this.row.style.backgroundBrush:this.row.grid.style.backgroundBrush},t.prototype.getBackgroundImage=function(){return void 0!==this.style.backgroundImage&&null!=this.style.backgroundImage?this.style.backgroundImage:void 0!==this.row.style.backgroundImage&&null!=this.row.style.backgroundImage?this.row.style.backgroundImage:this.row.grid.style.backgroundImage},t.prototype.getStringFormat=function(){return void 0!==this.style.stringFormat&&null!=this.style.stringFormat?this.style.stringFormat:this.stringFormat},t.prototype.measureHeight=function(){var t=this.calculateWidth();null==this.style.cellPadding||void 0===this.style.cellPadding?t-=this.gridRow.grid.style.cellPadding.right+this.gridRow.grid.style.cellPadding.left:(t-=this.style.cellPadding.right+this.style.cellPadding.left,t-=this.style.borders.left.width+this.style.borders.right.width);var e=0,i=new vs;if("string"==typeof this.objectValue||"string"==typeof this.remaining){var r=this.objectValue;this.isFinish||(r=null!==this.remaining&&""!==this.remaining&&void 0!==this.remaining?this.remaining:this.objectValue);var n=this.row.cells.indexOf(this);0!=this.gridRow.grid.style.cellSpacing&&(t-=2*this.gridRow.grid.style.cellSpacing),this.row.cells.getCell(n).hasColSpan||this.row.cells.getCell(n).hasRowSpan||(this.gridRow.grid.isChildGrid?(t<0?(this.tempval=t,null==this.style.cellPadding||void 0===this.style.cellPadding?this.tempval+=this.gridRow.grid.style.cellPadding.right+this.gridRow.grid.style.cellPadding.left:(this.tempval+=this.style.cellPadding.right+this.style.cellPadding.left,this.tempval+=this.style.borders.left.width+this.style.borders.right.width)):this.tempval=t,e+=i.layout(r,this.getTextFont(),this.stringFormat,new Qo(this.tempval,0),!1,new Qo(0,0)).actualSize.height):e+=i.layout(r,this.getTextFont(),this.stringFormat,new Qo(t,0),!1,new Qo(0,0)).actualSize.height),e+=2*(this.style.borders.top.width+this.style.borders.bottom.width)}else if(this.objectValue instanceof Lh){n=this.row.cells.indexOf(this);var o=0;null!=this.style.cellPadding||void 0!==this.style.cellPadding?(o=this.calculateWidth(),void 0!==this.style.cellPadding.left&&this.style.cellPadding.hasLeftPad&&(o-=this.style.cellPadding.left),void 0!==this.style.cellPadding.right&&this.style.cellPadding.hasRightPad&&(o-=this.style.cellPadding.right)):null!=this.row.grid.style.cellPadding||void 0!==this.row.grid.style.cellPadding?(o=this.calculateWidth(),void 0!==this.row.grid.style.cellPadding.left&&this.row.grid.style.cellPadding.hasLeftPad&&(o-=this.row.grid.style.cellPadding.left),void 0!==this.row.grid.style.cellPadding.right&&this.row.grid.style.cellPadding.hasRightPad&&(o-=this.row.grid.style.cellPadding.right)):o=this.calculateWidth(),this.objectValue.tempWidth=o,this.row.cells.getCell(n).hasColSpan||this.row.cells.getCell(n).hasRowSpan?e+=2*(this.style.borders.top.width+this.style.borders.bottom.width):e=this.objectValue.size.height,0!==this.gridRow.grid.style.cellSpacing&&(t-=2*this.gridRow.grid.style.cellSpacing),null==this.style.cellPadding&&void 0===this.style.cellPadding||(void 0!==this.row.grid.style.cellPadding.top&&this.row.grid.style.cellPadding.hasTopPad&&(e+=this.row.grid.style.cellPadding.top),this.row.grid.style.cellPadding.hasBottomPad&&void 0!==this.row.grid.style.cellPadding.bottom&&(e+=this.row.grid.style.cellPadding.bottom)),e+=this.objectValue.style.cellSpacing}else if(this.objectValue instanceof sa||this.objectValue instanceof la)e+=this.objectValue.height;else if(this.objectValue instanceof Wl){var s=this.objectValue;e+=i.layout(s.text,s.font,s.stringFormat,new Qo(t,0),!1,new Qo(0,0)).actualSize.height,e+=2*(this.style.borders.top.width+this.style.borders.bottom.width)}else void 0===this.objectValue&&(null==this.style.cellPadding||void 0===this.style.cellPadding?t-=this.gridRow.grid.style.cellPadding.right+this.gridRow.grid.style.cellPadding.left:(t-=this.style.cellPadding.right+this.style.cellPadding.left,t-=this.style.borders.left.width+this.style.borders.right.width),e+=2*(this.style.borders.top.width+this.style.borders.bottom.width));return this.objectValue instanceof Lh?null==this.style.cellPadding||void 0===this.style.cellPadding?(void 0!==this.row.grid.style.cellPadding.top&&this.row.grid.style.cellPadding.hasTopPad&&(e+=this.row.grid.style.cellPadding.top),void 0!==this.row.grid.style.cellPadding.bottom&&this.row.grid.style.cellPadding.hasBottomPad&&(e+=this.row.grid.style.cellPadding.bottom)):(void 0!==this.style.cellPadding.top&&this.style.cellPadding.hasTopPad&&(e+=this.style.cellPadding.top),void 0!==this.style.cellPadding.bottom&&this.style.cellPadding.hasBottomPad&&(e+=this.style.cellPadding.bottom)):null==this.style.cellPadding||void 0===this.style.cellPadding?e+=this.row.grid.style.cellPadding.top+this.row.grid.style.cellPadding.bottom:e+=this.style.cellPadding.top+this.style.cellPadding.bottom,e+=this.row.grid.style.cellSpacing},t.prototype.calculateWidth=function(){var t=this.row.cells.indexOf(this),e=(this.row.grid.rows.rowCollection.indexOf(this.row),this.columnSpan),i=0;if(1===e)for(var r=0;r<e;r++)i+=this.row.grid.columns.getColumn(t+r).width;else if(e>1)for(r=0;r<e;r++)i+=this.row.grid.columns.getColumn(t+r).width,r+1<e&&(this.row.cells.getCell(t+r+1).hasColSpan=!0);if(null!=this.parent&&this.parent.row.width>0&&this.row.grid.isChildGrid&&null!=this.parent&&this.row.width>this.parent.row.width){i=0;for(var n=0;n<this.parent.columnSpan;n++)i+=this.parent.row.grid.columns.getColumn(n).width;i/=this.row.cells.count}return i},t}(),wh=function(){function t(t){this.cells=[],this.gridRow=t}return t.prototype.getCell=function(t){if(t<0||t>=this.count)throw new Error("IndexOutOfRangeException");return this.cells[t]},Object.defineProperty(t.prototype,"count",{get:function(){return this.cells.length},enumerable:!0,configurable:!0}),t.prototype.add=function(t){if(void 0===t){var e=new vh;return this.add(e),t}t.row=this.gridRow,this.cells.push(t)},t.prototype.indexOf=function(t){return this.cells.indexOf(t)},t}(),Sh=function(){function t(t){this.columnWidth=0,this.grid=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this.columnWidth},set:function(t){this.isCustomWidth=!0,this.columnWidth=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"format",{get:function(){return null==this.stringFormat&&(this.stringFormat=new ys),this.stringFormat},set:function(t){this.stringFormat=t},enumerable:!0,configurable:!0}),t}(),Ph=function(){function t(t){this.internalColumns=[],this.columnWidth=0,this.grid=t,this.internalColumns=[]}return t.prototype.add=function(t){for(var e=0;e<t;e++){this.internalColumns.push(new Sh(this.grid));for(var i=0;i<this.grid.rows.count;i++){var r=this.grid.rows.getRow(i),n=new vh;n.value="",r.cells.add(n)}}},Object.defineProperty(t.prototype,"count",{get:function(){return this.internalColumns.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return 0===this.columnWidth&&(this.columnWidth=this.measureColumnsWidth()),0===this.grid.initialWidth||this.columnWidth===this.grid.initialWidth||this.grid.style.allowHorizontalOverflow||(this.columnWidth=this.grid.initialWidth,this.grid.isPageWidth=!0),this.columnWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columns",{get:function(){return this.internalColumns},enumerable:!0,configurable:!0}),t.prototype.getColumn=function(t){if(t>=0&&t<=this.columns.length)return this.columns[t];throw Error("can not get the column from the index: "+t)},t.prototype.measureColumnsWidth=function(){var t=0;this.grid.measureColumnsWidth();for(var e=0,i=this.internalColumns.length;e<i;e++)t+=this.internalColumns[e].width;return t},t.prototype.getDefaultWidths=function(t){for(var e=[],i=this.count,r=0;r<this.count;r++)this.grid.isPageWidth&&t>=0&&!this.internalColumns[r].isCustomWidth?this.internalColumns[r].width=0:(e[r]=this.internalColumns[r].width,this.internalColumns[r].width>0&&this.internalColumns[r].isCustomWidth?(t-=this.internalColumns[r].width,i--):e[r]=0);for(r=0;r<this.count;r++){var n=t/i;e[r]<=0&&(e[r]=n)}return e},t}(),Ch=function(){function t(t){this.gridRowOverflowIndex=0,this.rowHeight=0,this.rowWidth=0,this.isrowFinish=!1,this.isRowSpanRowHeightSet=!1,this.noOfPageCount=0,this.isRowHeightSet=!1,this.isPageBreakRowSpanApplied=!1,this.isRowMergeComplete=!0,this.repeatFlag=!1,this.rowFontSplit=!1,this.isHeaderRow=!1,this.pdfGrid=t}return Object.defineProperty(t.prototype,"rowSpanExists",{get:function(){return this.bRowSpanExists},set:function(t){this.bRowSpanExists=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cells",{get:function(){return null==this.gridCells&&(this.gridCells=new wh(this)),this.gridCells},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"grid",{get:function(){return this.pdfGrid},set:function(t){this.pdfGrid=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return void 0===this.rowStyle&&(this.rowStyle=new bh,this.rowStyle.setParent(this)),this.rowStyle},set:function(t){this.rowStyle=t;for(var e=0;e<this.cells.count;e++)this.cells.getCell(e).style.borders=t.border,void 0!==t.font&&(this.cells.getCell(e).style.font=t.font),void 0!==t.backgroundBrush&&(this.cells.getCell(e).style.backgroundBrush=t.backgroundBrush),void 0!==t.backgroundImage&&(this.cells.getCell(e).style.backgroundImage=t.backgroundImage),void 0!==t.textBrush&&(this.cells.getCell(e).style.textBrush=t.textBrush),void 0!==t.textPen&&(this.cells.getCell(e).style.textPen=t.textPen)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowBreakHeight",{get:function(){return void 0===this.gridRowBreakHeight&&(this.gridRowBreakHeight=0),this.gridRowBreakHeight},set:function(t){this.gridRowBreakHeight=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowOverflowIndex",{get:function(){return this.gridRowOverflowIndex},set:function(t){this.gridRowOverflowIndex=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.isRowHeightSet||(this.rowHeight=this.measureHeight()),this.rowHeight},set:function(t){this.rowHeight=t,this.isRowHeightSet=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return 0!==this.rowWidth&&void 0!==this.rowWidth||(this.rowWidth=this.measureWidth()),this.rowWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"NestedGridLayoutResult",{get:function(){return this.gridResult},set:function(t){this.gridResult=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columnSpanExists",{get:function(){return this.bColumnSpanExists},set:function(t){this.bColumnSpanExists=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowMergeComplete",{get:function(){return this.isRowMergeComplete},set:function(t){this.isRowMergeComplete=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowIndex",{get:function(){return this.grid.rows.rowCollection.indexOf(this)},enumerable:!0,configurable:!0}),t.prototype.measureHeight=function(){var t,e=0,i=0;t=this.cells.getCell(0).rowSpan>1?0:this.cells.getCell(0).height;for(var r=0;r<this.cells.count;r++){var n=this.cells.getCell(r);if(n.rowSpanRemainingHeight>e&&(e=n.rowSpanRemainingHeight),this.rowMergeComplete=!1,n.rowSpan>1){for(var o=r,s=this.isHeaderRow?this.grid.headers.indexOf(this):this.grid.rows.rowCollection.indexOf(this),a=0;a<n.rowSpan;a++)a+1<n.rowSpan&&((this.isHeaderRow?this.grid.headers.getHeader(s+a+1):this.grid.rows.getRow(s+a+1)).cells.getCell(o).hasRowSpan=!0);i<n.height&&(i=n.height)}else t=Math.max(t,n.height)}return i>t&&(t=i),0===t?t=i:e>0&&(t+=e),t},t.prototype.measureWidth=function(){for(var t=0,e=0;e<this.grid.columns.count;e++){t+=this.grid.columns.getColumn(e).width}return t},t}(),xh=function(){function t(t){this.rows=[],this.grid=t}return Object.defineProperty(t.prototype,"count",{get:function(){return this.rows.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowCollection",{get:function(){return this.rows},enumerable:!0,configurable:!0}),t.prototype.addRow=function(t){if(void 0===t){var e=new Ch(this.grid);return this.addRow(e),e}if(t.style.setBackgroundBrush(this.grid.style.backgroundBrush),t.style.setFont(this.grid.style.font),t.style.setTextBrush(this.grid.style.textBrush),t.style.setTextPen(this.grid.style.textPen),0===t.cells.count)for(var i=0;i<this.grid.columns.count;i++)t.cells.add(new vh);this.rows.push(t)},t.prototype.getRow=function(t){return this.rows[t]},t}(),Oh=function(){function t(t){this.rows=[],this.grid=t,this.rows=[]}return t.prototype.getHeader=function(t){return this.rows[t]},Object.defineProperty(t.prototype,"count",{get:function(){return this.rows.length},enumerable:!0,configurable:!0}),t.prototype.add=function(t){if("number"==typeof t){for(var e=void 0,i=0;i<t;i++){(e=new Ch(this.grid)).isHeaderRow=!0;for(var r=0;r<this.grid.columns.count;r++)e.cells.add(new vh);this.rows.push(e)}return this.rows}this.rows.push(t)},t.prototype.indexOf=function(t){return this.rows.indexOf(t)},t}(),Bh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Lh=function(t){function e(){var e=t.call(this)||this;return e.gridSize=new Qo(0,0),e.isGridSplit=!1,e.isRearranged=!1,e.pageBounds=new Zo,e.listOfNavigatePages=[],e.parentCellIndex=0,e.tempWidth=0,e.breakRow=!0,e.splitChildRowIndex=-1,e.hasRowSpanSpan=!1,e.hasColumnSpan=!1,e.isSingleGrid=!0,e}return Bh(e,t),Object.defineProperty(e.prototype,"raiseBeginCellDraw",{get:function(){return void 0!==this.beginCellDraw&&null!==typeof this.beginCellDraw},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"raiseEndCellDraw",{get:function(){return void 0!==this.endCellDraw&&null!==typeof this.endCellDraw},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"repeatHeader",{get:function(){return null!=this.bRepeatHeader&&void 0!==this.bRepeatHeader||(this.bRepeatHeader=!1),this.bRepeatHeader},set:function(t){this.bRepeatHeader=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"allowRowBreakAcrossPages",{get:function(){return this.breakRow},set:function(t){this.breakRow=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columns",{get:function(){return null!=this.gridColumns&&void 0!==this.gridColumns||(this.gridColumns=new Ph(this)),this.gridColumns},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return null==this.gridRows&&(this.gridRows=new xh(this)),this.gridRows},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"headers",{get:function(){return null!=this.gridHeaders&&void 0!==this.gridHeaders||(this.gridHeaders=new Oh(this)),this.gridHeaders},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"initialWidth",{get:function(){return this.gridInitialWidth},set:function(t){this.gridInitialWidth=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return null==this.gridStyle&&(this.gridStyle=new mh),this.gridStyle},set:function(t){null==this.gridStyle&&(this.gridStyle=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isPageWidth",{get:function(){return this.ispageWidth},set:function(t){this.ispageWidth=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isChildGrid",{get:function(){return this.ischildGrid},set:function(t){this.ischildGrid=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return 0!==this.gridSize.width&&void 0!==this.gridSize.width||0!==this.gridSize.height||(this.gridSize=this.measure()),this.gridSize},set:function(t){this.gridSize=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ParentCell",{get:function(){return this.parentCell},set:function(t){this.parentCell=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"LayoutFormat",{get:function(){return this.layoutFormat},enumerable:!0,configurable:!0}),e.prototype.draw=function(t,e,i,r){if(e instanceof Xo&&void 0===e.width&&void 0===i)return this.drawHelper(t,e.x,e.y);if("number"==typeof e&&"number"==typeof i&&void 0===r)return this.drawHelper(t,e,i,null);if(e instanceof Zo&&void 0!==e.width&&void 0===i)return this.drawHelper(t,e,null);if(e instanceof Xo&&void 0===e.width&&i instanceof Ml)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&"number"==typeof i&&(r instanceof Ml||null==r)){var n=t.graphics.clientSize.width-e,o=new Zo(e,i,n,0);return this.drawHelper(t,o,r)}return e instanceof Zo&&void 0!==e.width&&"boolean"==typeof i?this.drawHelper(t,e,null):this.drawHelper(t,e,i)},e.prototype.measure=function(){for(var t=0,e=this.columns.width,i=0;i<this.headers.count;i++){t+=this.headers.getHeader(i).height}for(i=0;i<this.rows.count;i++){t+=this.rows.getRow(i).height}return new Qo(e,t)},e.prototype.onBeginCellDraw=function(t){this.raiseBeginCellDraw&&this.beginCellDraw(this,t)},e.prototype.onEndCellDraw=function(t){this.raiseEndCellDraw&&this.endCellDraw(this,t)},e.prototype.layout=function(t){var e=t.bounds.width,i=t.bounds.height,r=!1;if(void 0!==t.bounds.width&&0!==t.bounds.width||(e=t.page.getClientSize().width-t.bounds.x,r=!0),void 0!==t.bounds.height&&0!==t.bounds.height||(i=t.page.getClientSize().height-t.bounds.y,r=!0),r&&(t.bounds=new Zo(t.bounds.x,t.bounds.y,e,i)),0!==this.rows.count){var n=this.rows.getRow(0).cells.getCell(0).style;if(null!=n.borders&&(null!=n.borders.left&&1!==n.borders.left.width||null!=n.borders.top&&1!==n.borders.top.width)){var o=n.borders.left.width/2,s=n.borders.top.width/2;if(t.bounds.x===El.default.right.width/2&&t.bounds.y===El.default.right.width/2){var a=new Zo(o,s,this.gridSize.width,this.gridSize.height);t.bounds=a}}}this.setSpan(),this.checkSpan(),this.layoutFormat=t.format,this.gridLocation=t.bounds;return new Mh(this).Layouter(t)},e.prototype.setSpan=function(){for(var t=1,e=1,i=0,r=0,n=0,o=this.headers.count,s=0;s<o;s++){var a=this.headers.getHeader(s);n=0;for(var l=a.cells.count,h=0;h<l;h++){var u=a.cells.getCell(h);if(n=Math.max(n,u.rowSpan),!u.isCellMergeContinue&&!u.isRowMergeContinue&&(u.columnSpan>1||u.rowSpan>1)){if(u.columnSpan+h>a.cells.count)throw new Error("Invalid span specified at row "+h.toString()+" column "+s.toString());if(u.rowSpan+s>this.headers.count)throw new Error("Invalid span specified at Header "+h.toString()+" column "+s.toString());if(u.columnSpan>1&&u.rowSpan>1){for(t=u.columnSpan,e=u.rowSpan,i=h,r=s,u.isCellMergeStart=!0,u.isRowMergeStart=!0;t>1;)i++,a.cells.getCell(i).isCellMergeContinue=!0,a.cells.getCell(i).isRowMergeContinue=!0,a.cells.getCell(i).rowSpan=e,t--;for(i=h,t=u.columnSpan;e>1;){for(r++,this.headers.getHeader(r).cells.getCell(h).isRowMergeContinue=!0,this.headers.getHeader(r).cells.getCell(i).isRowMergeContinue=!0,e--;t>1;)i++,this.headers.getHeader(r).cells.getCell(i).isCellMergeContinue=!0,this.headers.getHeader(r).cells.getCell(i).isRowMergeContinue=!0,t--;t=u.columnSpan,i=h}}else if(u.columnSpan>1&&1===u.rowSpan)for(t=u.columnSpan,i=h,u.isCellMergeStart=!0;t>1;)i++,a.cells.getCell(i).isCellMergeContinue=!0,t--;else if(1===u.columnSpan&&u.rowSpan>1)for(e=u.rowSpan,r=s;e>1;)r++,this.headers.getHeader(r).cells.getCell(h).isRowMergeContinue=!0,e--}}a.maximumRowSpan=n}},e.prototype.checkSpan=function(){var t,e,i=1,r=0,n=0;if(t=i=1,e=n=0,this.hasRowSpanSpan||this.hasColumnSpan)for(var o=this.rows.count,s=0;s<o;s++){var a=this.rows.getRow(s);r=0;for(var l=a.cells.count,h=0;h<l;h++){var u=a.cells.getCell(h);if(r=Math.max(r,u.rowSpan),!u.isCellMergeContinue&&!u.isRowMergeContinue&&(u.columnSpan>1||u.rowSpan>1)){if(u.columnSpan+h>a.cells.count)throw new Error("Invalid span specified at row "+h.toString()+" column "+s.toString());if(u.rowSpan+s>this.rows.count)throw new Error("Invalid span specified at row "+h.toString()+" column "+s.toString());if(u.columnSpan>1&&u.rowSpan>1){for(t=u.columnSpan,i=u.rowSpan,e=h,n=s,u.isCellMergeStart=!0,u.isRowMergeStart=!0;t>1;)e++,a.cells.getCell(e).isCellMergeContinue=!0,a.cells.getCell(e).isRowMergeContinue=!0,t--;for(e=h,t=u.columnSpan;i>1;){for(n++,this.rows.getRow(n).cells.getCell(h).isRowMergeContinue=!0,this.rows.getRow(n).cells.getCell(e).isRowMergeContinue=!0,i--;t>1;)e++,this.rows.getRow(n).cells.getCell(e).isCellMergeContinue=!0,this.rows.getRow(n).cells.getCell(e).isRowMergeContinue=!0,t--;t=u.columnSpan,e=h}}else if(u.columnSpan>1&&1===u.rowSpan)for(t=u.columnSpan,e=h,u.isCellMergeStart=!0;t>1;)e++,a.cells.getCell(e).isCellMergeContinue=!0,t--;else if(1===u.columnSpan&&u.rowSpan>1)for(i=u.rowSpan,n=s;i>1;)n++,this.rows.getRow(n).cells.getCell(h).isRowMergeContinue=!0,i--}}a.maximumRowSpan=r}},e.prototype.measureColumnsWidth=function(t){if(void 0!==t){this.isPageWidth=!1;for(var e=this.columns.getDefaultWidths(t.width-t.x),i=0,r=this.columns.count;i<r;i++)this.columns.getColumn(i).columnWidth=e[i],this.tempWidth=e[i];if(null!=this.ParentCell&&0==this.style.allowHorizontalOverflow&&0==this.ParentCell.row.grid.style.allowHorizontalOverflow){var n=0,o=0,s=this.columns.count,a=0;null==this.ParentCell.style.cellPadding&&void 0===this.ParentCell.style.cellPadding||(void 0!==this.ParentCell.style.cellPadding.left&&this.ParentCell.style.cellPadding.hasLeftPad&&(n+=this.ParentCell.style.cellPadding.left),void 0!==this.ParentCell.style.cellPadding.right&&this.ParentCell.style.cellPadding.hasRightPad&&(n+=this.ParentCell.style.cellPadding.right));for(i=0;i<this.ParentCell.columnSpan;i++)o+=this.ParentCell.row.grid.columns.getColumn(this.parentCellIndex+i).width;for(var l=0;l<this.columns.count;l++)this.gridColumns.getColumn(l).width>0&&this.gridColumns.getColumn(l).isCustomWidth&&(o-=this.gridColumns.getColumn(l).width,s--);if(null==this.ParentCell.row.grid.style.cellPadding&&void 0===this.ParentCell.row.grid.style.cellPadding||(void 0!==this.ParentCell.row.grid.style.cellPadding.top&&this.ParentCell.row.grid.style.cellPadding.hasTopPad&&(n+=this.ParentCell.row.grid.style.cellPadding.top),void 0!==this.ParentCell.row.grid.style.cellPadding.bottom&&this.ParentCell.row.grid.style.cellPadding.hasBottomPad&&(n+=this.ParentCell.row.grid.style.cellPadding.bottom)),0!=this.ParentCell.row.grid.style.cellSpacing&&(o-=2*this.ParentCell.row.grid.style.cellSpacing),o>n&&(a=(o-n)/s,this.tempWidth=a,null!=this.ParentCell))for(l=0;l<this.columns.count;l++)this.columns.getColumn(l).isCustomWidth||(this.columns.getColumn(l).columnWidth=a)}}else{e=[this.columns.count];for(var h=0;h<this.columns.count;h++)e[h]=0;var u=0;if((void 0===this.isChildGrid&&void 0!==this.gridLocation||null===this.isChildGrid&&void 0!==this.gridLocation)&&(this.initialWidth=this.gridLocation.width),this.headers.count>0){var c=this.headers.getHeader(0).cells.count,p=this.headers.count;for(i=0;i<c;i++){u=0;for(l=0;l<p;l++){var d=Math.min(this.initialWidth,this.headers.getHeader(l).cells.getCell(i).width);u=Math.max(u,d)}e[i]=u}}u=0;i=0;for(var f=this.columns.count;i<f;i++){for(l=0,p=this.rows.count;l<p;l++)if(1==this.rows.getRow(l).cells.getCell(i).columnSpan&&!this.rows.getRow(l).cells.getCell(i).isCellMergeContinue||null!=this.rows.getRow(l).cells.getCell(i).value){if(null!=this.rows.getRow(l).cells.getCell(i).value&&!this.rows.getRow(l).grid.style.allowHorizontalOverflow)this.rows.getRow(l).grid.style.cellPadding.right,this.rows.getRow(l).grid.style.cellPadding.left,this.rows.getRow(l).cells.getCell(i).style.borders.left.width;d=0;d=this.initialWidth>0?Math.min(this.initialWidth,this.rows.getRow(l).cells.getCell(i).width):this.rows.getRow(l).cells.getCell(i).width,u=Math.max(e[i],Math.max(u,d)),u=Math.max(this.columns.getColumn(i).width,u)}0!=this.rows.count&&(e[i]=u),u=0}i=0;for(var g=this.rows.count;i<g;i++){l=0;for(var m=this.columns.count;l<m;l++)if(this.rows.getRow(i).cells.getCell(l).columnSpan>1){e[l];for(var y=1;y<this.rows.getRow(i).cells.getCell(l).columnSpan;y++)e[l+y]}}for(i=0,r=this.columns.count;i<r;i++)this.columns.getColumn(i).width<=0?this.columns.getColumn(i).columnWidth=e[i]:this.columns.getColumn(i).width>0&&!this.columns.getColumn(i).isCustomWidth&&(this.columns.getColumn(i).columnWidth=e[i]);n=0;var b=0,v=this.columns.count,w=0;b=this.tempWidth;for(l=0;l<this.columns.count;l++)this.gridColumns.getColumn(l).width>0&&this.gridColumns.getColumn(l).isCustomWidth&&(b-=this.gridColumns.getColumn(l).width,v--);if(b>0&&0!=this.ParentCell.row.grid.style.cellSpacing&&(b-=2*this.ParentCell.row.grid.style.cellSpacing),b>n&&(w=b/v,null!=this.ParentCell))for(l=0;l<this.columns.count;l++)this.columns.getColumn(l).isCustomWidth||(this.columns.getColumn(l).columnWidth=w)}},e}(Il),Th=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Mh=function(t){function e(e){var i=t.call(this,e)||this;return i.gridInitialWidth=0,i.gridSize=new Qo(0,0),i.parentCellIndex=0,i.tempWidth=0,i.childheight=0,i.isChildGrid=!1,i.hasRowSpanSpan=!1,i.isRearranged=!1,i.pageBounds=new Zo,i.listOfNavigatePages=[],i.flag=!0,i.columnRanges=[],i.currentLocation=new Xo(0,0),i.breakRow=!0,i.slr=null,i.remainderText=null,i.isPaginate=!1,i.isOverloadWithPosition=!1,i}return Th(e,t),Object.defineProperty(e.prototype,"Grid",{get:function(){return this.elements},enumerable:!0,configurable:!0}),e.prototype.getFormat=function(t){return t},e.prototype.layoutInternal=function(t){var e=this.getFormat(t.format);if(this.gridLayoutFormat=this.getFormat(t.format),this.currentPage=t.page,null===this.currentPage)throw Error("Can not set page as null");this.currentPage.getClientSize().height,this.currentPage.getClientSize().width;this.currentPageBounds=this.currentPage.getClientSize(),this.currentGraphics=this.currentPage.graphics;var i=0;if(i=this.currentGraphics.page.section.indexOf(this.currentGraphics.page),this.listOfNavigatePages.push(i),null!=e&&e.break===Fa.FitColumnsToPage?this.currentBounds=new Zo(new Xo(t.bounds.x,t.bounds.y),new Qo(this.Grid.columns.width,this.currentGraphics.clientSize.height)):this.currentBounds=new Zo(new Xo(t.bounds.x,t.bounds.y),this.currentGraphics.clientSize),0!==this.Grid.rows.count)this.currentBounds.width=t.bounds.width>0?t.bounds.width:this.currentBounds.width-this.Grid.rows.getRow(0).cells.getCell(0).style.borders.left.width/2;else{if(0===this.Grid.headers.count)throw Error("Please add row or header into grid");this.currentBounds.width=t.bounds.width}if(this.startLocation=new Xo(t.bounds.x,t.bounds.y),t.bounds.height>0&&!this.Grid.isChildGrid&&(this.currentBounds.height=t.bounds.height),this.Grid.isChildGrid||(this.hType=this.Grid.style.horizontalOverflowType),this.Grid.style.allowHorizontalOverflow?(this.Grid.measureColumnsWidth(),this.determineColumnDrawRanges()):(this.columnRanges=[],void 0!==this.Grid.isChildGrid&&(this.Grid.isChildGrid,1)?this.Grid.measureColumnsWidth(this.currentBounds):this.Grid.measureColumnsWidth(new Zo(this.currentBounds.x,this.currentBounds.y,this.currentBounds.x+this.currentBounds.width,this.currentBounds.height)),this.columnRanges.push([0,this.Grid.columns.count-1])),this.Grid.hasRowSpanSpan)for(var r=0;r<this.Grid.rows.count;r++)-1===this.Grid.rows.getRow(r).height||this.Grid.rows.getRow(r).isRowHeightSet||(this.Grid.rows.getRow(r).isRowHeightSet=!0);return this.layoutOnPage(t)},e.prototype.determineColumnDrawRanges=function(){for(var t=0,e=0,i=0,r=this.currentGraphics.clientSize.width-this.currentBounds.x,n=0;n<this.Grid.columns.count;n++)if((i+=this.Grid.columns.getColumn(n).width)>=r){for(var o=0,s=t;s<=n&&!((o+=this.Grid.columns.getColumn(s).width)>r);s++)e=s;this.columnRanges.push([t,e]),i=(e=t=e+1)<=n?this.Grid.columns.getColumn(n).width:0}this.columnRanges.push([t,this.Grid.columns.count-1])},e.prototype.layoutOnPage=function(t){this.pageBounds.x=t.bounds.x,this.pageBounds.y=t.bounds.y,this.pageBounds.height=t.bounds.height;for(var i=this.getFormat(t.format),r=null,n=new Ys,o=t.page,s=[],a=0;a<this.columnRanges.length;a++){var l=this.columnRanges[a];this.cellStartIndex=l[0],this.cellEndIndex=l[1];var h=this.raiseBeforePageLayout(this.currentPage,this.currentBounds,this.currentRowIndex);this.currentBounds=h.currentBounds,this.currentRowIndex=h.currentRowIndex;for(var u=void 0,c=0;c<this.Grid.headers.count;c++){var p=this.Grid.headers.getHeader(c),d=this.currentBounds.y;if(this.isHeader=!0,o!=this.currentPage)for(var f=this.cellStartIndex;f<=this.cellEndIndex;f++)p.cells.getCell(f).isCellMergeContinue&&(p.cells.getCell(f).isCellMergeContinue=!1,p.cells.getCell(f).value="");var g=this.drawRow(p);d===this.currentBounds.y?(u=!0,-1===e.repeatRowIndex&&(e.repeatRowIndex=c)):u=!1,!g.isFinish&&null!==o&&i.layout!==ra.OnePage&&u&&(this.startLocation.x=this.currentBounds.x,this.currentPage=this.getNextPageformat(i),this.startLocation.y=this.currentBounds.y,void 0!==i.paginateBounds&&0===i.paginateBounds.x&&0===i.paginateBounds.y&&0===i.paginateBounds.width&&0===i.paginateBounds.height&&(this.currentBounds.x+=this.startLocation.x),this.drawRow(p)),this.isHeader=!1}var m=0,y=(this.Grid.rows.count,void 0),b=!0;s=[];for(var v=0;v<this.Grid.rows.count;v++){p=this.Grid.rows.getRow(v);m++,this.currentRowIndex=m-1;var w=this.currentBounds.y;o=this.currentPage,e.repeatRowIndex=-1,b&&p.grid.isChildGrid&&(b=!1);var S=null;if(-1==this.Grid.splitChildRowIndex)S=this.drawRow(p),p.isrowFinish=!0;else{if(!(p.grid.ParentCell.row.grid.isGridSplit&&this.Grid.splitChildRowIndex<=p.rowIndex)){if(p.isrowFinish)continue;break}S=this.drawRow(p),p.isrowFinish=!0}for(s.push(S.bounds.width),w===this.currentBounds.y?(y=!0,e.repeatRowIndex=this.Grid.rows.rowCollection.indexOf(p)):(y=!1,e.repeatRowIndex=-1);!S.isFinish&&null!=o;){var P=this.getLayoutResult();if(this.raisePageLayouted(P).cancel||y)break;if(this.Grid.allowRowBreakAcrossPages){this.currentPage=this.getNextPageformat(i),w=this.currentBounds.y;var C=new Xo(El.default.right.width/2,El.default.top.width/2);if(0===i.paginateBounds.x&&0===i.paginateBounds.y&&0===i.paginateBounds.width&&0===i.paginateBounds.height&&this.startLocation.x===C.x&&this.startLocation.y===C.y&&(this.currentBounds.x+=this.startLocation.x,this.currentBounds.y+=this.startLocation.y),this.isPaginate&&(this.startLocation.y=this.currentBounds.y,this.isPaginate=!1),this.Grid.isChildGrid&&null!=p.grid.ParentCell&&null!=this.Grid.ParentCell.row.grid.style.cellPadding&&p.rowBreakHeight+this.Grid.ParentCell.row.grid.style.cellPadding.top<this.currentBounds.height&&(this.currentBounds.y=this.Grid.ParentCell.row.grid.style.cellPadding.top),null!=p.grid.ParentCell){p.grid.ParentCell.row.isRowBreaksNextPage=!0,p.grid.ParentCell.row.rowBreakHeightValue=p.rowBreakHeight+this.Grid.ParentCell.row.grid.style.cellPadding.top+this.Grid.ParentCell.row.grid.style.cellPadding.bottom;for(var x=p.rowIndex+1;x<p.grid.rows.count;x++)p.grid.ParentCell.row.rowBreakHeightValue+=p.grid.rows.getRow(x).height}if(p.grid.isChildGrid){p.isrowFinish=!1,p.grid.splitChildRowIndex=p.rowIndex,p.grid.ParentCell.row.grid.splitChildRowIndex=p.grid.ParentCell.row.rowIndex,p.grid.ParentCell.row.grid.isGridSplit&&(p.grid.ParentCell.row.noOfPageCount+=1,p.grid.ParentCell.row.grid.isGridSplit=!1);break}if(p.noOfPageCount<1){if(-1!=p.grid.splitChildRowIndex&&(p.grid.isGridSplit=!0),null!=p.style.border&&(null!=p.style.border.left&&1!==p.style.border.left.width||null!=p.style.border.top&&1!==p.style.border.top.width)){var O=p.style.border.left.width/2,B=p.style.border.top.width/2;if(this.currentBounds.x===El.default.right.width/2&&this.currentBounds.y===El.default.right.width/2){var L=new Zo(O,B,this.currentBounds.width,this.currentBounds.height);this.currentBounds=L}}if(this.Grid.repeatHeader)for(var T=0;T<this.Grid.headers.count;T++){var M=this.Grid.headers.getHeader(T);this.drawRow(M)}if(S=this.drawRow(p),p.noOfPageCount>=1){p.rowBreakHeightValue;for(var D=0;D<p.noOfPageCount;D++){var k=this.getLayoutResult();if(this.raisePageLayouted(k),this.currentPage=this.getNextPageformat(i),w=this.currentBounds.y,-1!=p.grid.splitChildRowIndex&&(p.grid.isGridSplit=!0),this.currentBounds.y=.5,this.Grid.repeatHeader)for(var E=0;E<this.Grid.headers.count;E++){var j=this.Grid.headers.getHeader(E);this.drawRow(j)}this.drawRow(p)}}p.grid.splitChildRowIndex=-1,p.grid.isGridSplit=!1,S.isFinish=this.checkIsFisished(p);for(var I=0;I<p.cells.count;I++)p.cells.getCell(I).value instanceof Lh&&(p.cells.getCell(I).value.splitChildRowIndex=-1)}}}if(!S.isFinish&&null!==o&&i.layout!==ra.OnePage&&y){if(this.startLocation.x=this.currentBounds.x,this.currentPage=this.getNextPageformat(i),this.raiseBeforePageLayout(this.currentPage,this.currentBounds,this.currentRowIndex).returnValue)break;if(null!==t.format&&!t.format.usePaginateBounds&&null!==t.bounds&&t.bounds.height>0&&!this.Grid.isChildGrid&&(this.currentBounds.height=t.bounds.height),void 0===t.format||null==t.format||void 0===t.format.usePaginateBounds||t.format.usePaginateBounds||0===t.format.paginateBounds.x&&0===t.format.paginateBounds.y&&0===t.format.paginateBounds.width&&0===t.format.paginateBounds.height||0!==t.format.paginateBounds.y?(this.currentBounds.y=null==i?0:i.paginateBounds.y,null==i||0===i.paginateBounds.x&&0===i.paginateBounds.y&&0===i.paginateBounds.height&&0===i.paginateBounds.width||(this.currentBounds.x=i.paginateBounds.x,this.currentBounds.width=i.paginateBounds.width,this.currentBounds.height=i.paginateBounds.height)):this.currentBounds.y=El.default.top.width/2,void 0!==t.format&&null!==t.format&&void 0!==t.format.usePaginateBounds&&!t.format.usePaginateBounds&&null!==t.bounds&&t.bounds.y>0&&!this.Grid.isChildGrid&&(this.currentBounds.y=t.bounds.y),this.startLocation.y=this.currentBounds.y,i.paginateBounds.x===i.paginateBounds.y&&i.paginateBounds.y===i.paginateBounds.height&&i.paginateBounds.height===i.paginateBounds.width&&0===i.paginateBounds.width&&(this.currentBounds.x+=this.startLocation.x),this.currentBounds.x===El.default.left.width/2&&(this.currentBounds.y+=this.startLocation.x),this.Grid.repeatHeader)for(var R=0;R<this.Grid.headers.count;R++){j=this.Grid.headers.getHeader(R);this.drawRow(j)}this.drawRow(p),null===this.currentPage||n.containsKey(this.currentPage)||n.add(this.currentPage,l)}if(null!=p.NestedGridLayoutResult){this.currentPage=p.NestedGridLayoutResult.page,this.currentGraphics=this.currentPage.graphics,this.startLocation=new Xo(p.NestedGridLayoutResult.bounds.x,p.NestedGridLayoutResult.bounds.y);var A=this.ReCalculateHeight(p,p.NestedGridLayoutResult.bounds.height);if(this.currentBounds.y=A,o!=this.currentPage){for(var N=this.currentPage.section,F=N.indexOf(o)+1,V=N.indexOf(this.currentPage),z=F;z<V+1;z++){var G=this.currentPage.graphics,_=new Xo(i.paginateBounds.x,i.paginateBounds.y),H=z==V?p.NestedGridLayoutResult.bounds.height-t.bounds.y:this.currentBounds.height-_.y;H<=G.clientSize.height&&(H+=t.bounds.y),_.y=null==i?.5:i.paginateBounds.y;for(var W=0;W<p.cells.count;W++){var U=p.cells.getCell(W),q=0,K=0;if(U.value instanceof Lh)for(var Y=0;Y<U.value.columns.count;Y++)K+=U.value.columns.getColumn(Y).columnWidth;else K=U.width;q=Math.max(K,p.grid.columns.getColumn(W).width),U.drawCellBorders(G,new Zo(_,new Qo(q,H))),_.x+=q,W+=U.columnSpan-1}}o=this.currentPage}}}var $=!1,J=0;s.length>0&&(J=s[0]);var X=[[1,2]];for(W=0;W<this.Grid.rows.count;W++)if(-1!=this.cellEndIndex&&this.Grid.rows.getRow(W).cells.getCell(this.cellEndIndex).value instanceof Lh){var Q=this.Grid.rows.getRow(W).cells.getCell(this.cellEndIndex).value;this.rowLayoutBoundsWidth=Q.rowLayoutBoundsWidth,$=!0}if(!$&&s.length>0){for(W=0;W<m-1;W++)J<s[W]&&(J=s[W]);this.rowLayoutBoundsWidth=J}else this.rowLayoutBoundsWidth=X[0][1];if(this.columnRanges.indexOf(l)<this.columnRanges.length-1&&null!=o&&i.layout!=ra.OnePage)if(this.Grid.isChildGrid,0!=X[0][0]){this.currentPage.section.indexOf(this.currentPage);this.currentGraphics=this.currentPage.graphics,this.currentBounds=new Zo(new Xo(0,0),this.currentPage.getClientSize());this.currentGraphics.page.section.indexOf(this.currentGraphics.page)}else this.currentPage=this.getNextPageformat(i);this.columnRanges.length-1!==a&&this.columnRanges.length>1&&i.layout!==ra.OnePage&&(this.currentPage=this.getNextPageformat(i),i.paginateBounds.x===i.paginateBounds.y&&i.paginateBounds.y===i.paginateBounds.height&&i.paginateBounds.height===i.paginateBounds.width&&0===i.paginateBounds.width&&(this.currentBounds.x+=this.startLocation.x,this.currentBounds.y+=this.startLocation.y))}return r=this.getLayoutResult(),this.Grid.style.allowHorizontalOverflow&&this.Grid.style.horizontalOverflowType==dh.NextPage&&this.reArrangePages(n),this.raisePageLayouted(r),r},e.prototype.checkIsFisished=function(t){for(var e=!0,i=0;i<t.cells.count;i++)t.cells.getCell(i).FinishedDrawingCell||(e=!1);return e},e.prototype.getNextPageformat=function(t){var e=this.currentPage.section,i=null,r=e.indexOf(this.currentPage);this.flag=!1,i=r===e.count-1?e.add():e.getPages()[r+1],this.currentGraphics=i.graphics;var n=this.currentGraphics.page.section.indexOf(this.currentGraphics.page);return-1===this.listOfNavigatePages.indexOf(n)&&this.listOfNavigatePages.push(n),this.currentBounds=new Zo(new Xo(0,0),i.getClientSize()),void 0!==t&&null!=t&&t.usePaginateBounds&&void 0!==t.paginateBounds&&null!=t.paginateBounds&&t.paginateBounds.x!==t.paginateBounds.y&&t.paginateBounds.y!==t.paginateBounds.height&&t.paginateBounds.height!==t.paginateBounds.width&&0!==t.paginateBounds.width&&(this.currentBounds.x=t.paginateBounds.x,this.currentBounds.y=t.paginateBounds.y,this.currentBounds.height=t.paginateBounds.height),i},e.prototype.CheckIfDefaultFormat=function(t){var e=new ys;return t.alignment===e.alignment&&t.characterSpacing===e.characterSpacing&&t.clipPath===e.clipPath&&t.firstLineIndent===e.firstLineIndent&&t.horizontalScalingFactor===e.horizontalScalingFactor&&t.lineAlignment===e.lineAlignment&&t.lineLimit===e.lineLimit&&t.lineSpacing===e.lineSpacing&&t.measureTrailingSpaces===e.measureTrailingSpaces&&t.noClip===e.noClip&&t.paragraphIndent===e.paragraphIndent&&t.rightToLeft===e.rightToLeft&&t.subSuperScript===e.subSuperScript&&t.wordSpacing===e.wordSpacing&&t.wordWrap===e.wordWrap},e.prototype.RaiseBeforeCellDraw=function(t,e,i,r,n,o){var s=null;return this.Grid.raiseBeginCellDraw&&(s=new jh(t,e,i,r,n,o),this.Grid.onBeginCellDraw(s),o=s.style),o},e.prototype.raiseAfterCellDraw=function(t,e,i,r,n,o){var s=null;this.Grid.raiseEndCellDraw&&(s=new Ih(t,e,i,r,n,o),this.Grid.onEndCellDraw(s))},e.prototype.reArrangePages=function(t){for(var e=this.currentPage.document,i=[],r=t.keys(),n=(t.values(),0);n<r.length;n++){(a=r[n]).section=null,i.push(a),e.pages.remove(a)}for(n=0;n<t.size();n++)for(var o=n,s=t.size()/this.columnRanges.length;o<t.size();o+=s){var a;void 0!==(a=i[o])&&-1===e.pages.indexOf(a)&&e.pages.add(a)}},e.prototype.getLayoutResult=function(){if(this.Grid.isChildGrid&&this.Grid.allowRowBreakAcrossPages)for(var t=0;t<this.Grid.rows.count;t++){var e=this.Grid.rows.getRow(t);e.rowBreakHeight>0&&e.repeatFlag&&(this.startLocation.y=this.currentPage.origin.y)}var i;return this.isChanged||(i=new Zo(this.startLocation,new Qo(this.currentBounds.width,this.currentBounds.y-this.startLocation.y))),new Dh(this.currentPage,i)},e.prototype.ReCalculateHeight=function(t,e){for(var i=0,r=this.cellStartIndex;r<=this.cellEndIndex;r++)null!==t.cells.getCell(r).remainingString&&""!==t.cells.getCell(r).remainingString&&void 0!==t.cells.getCell(r).remainingString&&(i=Math.max(i,t.cells.getCell(r).measureHeight()));return Math.max(e,i)},e.prototype.raiseBeforePageLayout=function(t,e,i){var r=!1;if(this.Grid.raiseBeginPageLayout){var n=new Fh(e,t,i);this.Grid.onBeginPageLayout(n),r=void 0!==n.cancel&&n.cancel,e=n.bounds,i=n.startRowIndex}return{returnValue:r,currentBounds:e,currentRowIndex:i}},e.prototype.raisePageLayouted=function(t){var e=new Vh(t);return this.Grid.raiseEndPageLayout&&this.Grid.onEndPageLayout(e),e},e.prototype.drawRow=function(t,i,r){if(void 0===i){var n=new zh,o=0,s=new Qo(0,0),a=!1;if(t.rowSpanExists){var l=0,h=this.Grid.rows.rowCollection.indexOf(t);-1===h&&-1!==(h=this.Grid.headers.indexOf(t))&&(a=!0);for(var u=0;u<t.cells.count;u++){var c=t.cells.getCell(u);l=Math.max(l,c.rowSpan)}for(u=h;u<h+l;u++)o+=a?this.Grid.headers.getHeader(u).height:this.Grid.rows.getRow(u).height}var p=t.rowBreakHeight>0?t.rowBreakHeight:t.height;if(void 0!==this.Grid.isChildGrid&&this.Grid.isChildGrid&&void 0!==this.Grid.ParentCell&&null!=this.Grid.ParentCell)this.currentBounds.y+this.Grid.ParentCell.row.grid.style.cellPadding.bottom+p>this.currentPageBounds.height||this.currentBounds.y+this.Grid.ParentCell.row.grid.style.cellPadding.bottom+p>this.currentBounds.height||this.currentBounds.y+this.Grid.ParentCell.row.grid.style.cellPadding.bottom+o>this.currentPageBounds.height?(void 0!==this.Grid.ParentCell.row.grid.LayoutFormat&&this.Grid.ParentCell.row.grid.LayoutFormat.break===Fa.FitPage&&(e.repeatRowIndex=this.Grid.rows.rowCollection.indexOf(t),this.Grid.splitChildRowIndex=this.Grid.rows.rowCollection.indexOf(t)),e.repeatRowIndex>-1&&e.repeatRowIndex===t.rowIndex&&this.Grid.allowRowBreakAcrossPages&&(n.isFinish=!0,n.bounds=this.currentBounds,this.drawRowWithBreak(n,t,p),t.repeatFlag=!0,t.repeatRowNumber=e.repeatRowIndex)):(n.isFinish=!0,t.grid.ParentCell.row.rowBreakHeightValue>0?t.repeatFlag=!0:(t.repeatFlag=!1,p=t.height),this.Grid.isChildGrid&&t.rowBreakHeight>0&&null!=this.Grid.ParentCell.row.grid.style.cellPadding&&(p+=this.Grid.ParentCell.row.grid.style.cellPadding.bottom),this.drawRow(t,n,p));else if(p>this.currentPageBounds.height)this.Grid.allowRowBreakAcrossPages&&(n.isFinish=!0,this.drawRowWithBreak(n,t,p),t.isrowFinish=!0,t.repeatFlag=!0,-1!==t.grid.splitChildRowIndex&&(n.isFinish=!1));else if(this.currentBounds.y+p>this.currentPageBounds.height||this.currentBounds.y+p>this.currentBounds.height+this.startLocation.y||this.currentBounds.y+o>this.currentPageBounds.height){var d=!1;!this.Grid.allowRowBreakAcrossPages||this.Grid.repeatHeader||t.isRowHeightSet||t.rowMergeComplete?this.Grid.allowRowBreakAcrossPages&&null!=this.Grid.LayoutFormat&&this.Grid.LayoutFormat.layout==ra.Paginate&&this.Grid.LayoutFormat.break!=Fa.FitElement&&t.isRowHeightSet&&this.currentBounds.y+r>this.currentPageBounds.height&&((d=this.isFitToCell(this.currentPageBounds.height-this.currentBounds.y,this.Grid,t))||(d=!(null!==this.slr&&0==this.slr.actualSize.height&&null!=this.slr.remainder&&this.slr.remainder.length>0&&this.remainderText==this.slr.remainder)),d&&null!=this.slr&&this.slr.lineCount>1&&(d=!1),this.remainderText=null):(d=null!==this.Grid.LayoutFormat&&this.Grid.LayoutFormat.paginateBounds.height>0?this.isFitToCell(this.currentBounds.height+this.startLocation.y-this.currentBounds.y,this.Grid,t):this.isFitToCell(this.currentPageBounds.height-this.currentBounds.y,this.Grid,t))&&(this.isPaginate=!0),e.repeatRowIndex>-1&&e.repeatRowIndex===t.rowIndex||d?this.Grid.allowRowBreakAcrossPages?(n.isFinish=!0,this.drawRowWithBreak(n,t,p),t.repeatFlag=!0,t.repeatRowNumber=e.repeatRowIndex,-1!==t.grid.splitChildRowIndex&&(n.isFinish=!1)):(n.isFinish=!1,this.drawRow(t,n,p)):n.isFinish=!1}else n.isFinish=!0,this.drawRow(t,n,p),t.repeatFlag=!1;return n}var f=new Xo(this.currentBounds.x,this.currentBounds.y);i.bounds=new Zo(f,new Qo(0,0)),r=this.ReCalculateHeight(t,r);for(u=this.cellStartIndex;u<=this.cellEndIndex;u++){var g=u>this.cellEndIndex+1&&t.cells.getCell(u).columnSpan>1;if(!g)for(var m=1;m<t.cells.getCell(u).columnSpan;m++)t.cells.getCell(u+m).isCellMergeContinue=!0;s=new Qo(this.Grid.columns.getColumn(u).width,r);!this.CheckIfDefaultFormat(this.Grid.columns.getColumn(u).format)&&this.CheckIfDefaultFormat(t.cells.getCell(u).stringFormat)&&(t.cells.getCell(u).stringFormat=this.Grid.columns.getColumn(u).format);var y=t.cells.getCell(u).style,b="string"==typeof t.cells.getCell(u).value&&null!==t.cells.getCell(u).value?t.cells.getCell(u).value:"";if(t.cells.getCell(u).style=this.RaiseBeforeCellDraw(this.currentGraphics,this.currentRowIndex,u,new Zo(f,s),b,y),t.cells.getCell(u).value instanceof Lh){(w=t.cells.getCell(u).value).parentCellIndex=u}var v=t.cells.getCell(u).draw(this.currentGraphics,new Zo(f,s),g);if(t.grid.style.allowHorizontalOverflow&&(t.cells.getCell(u).columnSpan>this.cellEndIndex||u+t.cells.getCell(u).columnSpan>this.cellEndIndex+1)&&this.cellEndIndex<t.cells.count-1&&(t.rowOverflowIndex=this.cellEndIndex),t.grid.style.allowHorizontalOverflow&&t.rowOverflowIndex>0&&(t.cells.getCell(u).columnSpan>this.cellEndIndex||u+t.cells.getCell(u).columnSpan>this.cellEndIndex+1)&&t.cells.getCell(u).columnSpan-this.cellEndIndex+u-1>0&&(t.cells.getCell(t.rowOverflowIndex+1).value=null!==v&&void 0!==v.remainder?v.remainder:"",t.cells.getCell(t.rowOverflowIndex+1).stringFormat=t.cells.getCell(u).stringFormat,t.cells.getCell(t.rowOverflowIndex+1).style=t.cells.getCell(u).style,t.cells.getCell(t.rowOverflowIndex+1).columnSpan=t.cells.getCell(u).columnSpan-this.cellEndIndex+u-1),b="string"==typeof t.cells.getCell(u).value&&null!==t.cells.getCell(u).value?t.cells.getCell(u).value:"",g||this.raiseAfterCellDraw(this.currentGraphics,this.currentRowIndex,u,new Zo(f,s),b,t.cells.getCell(u).style),t.cells.getCell(u).value instanceof Lh){var w=t.cells.getCell(u).value;this.Grid.columns.getColumn(u).width>=this.currentGraphics.clientSize.width?(f.x=w.rowLayoutBoundsWidth,f.x+=w.style.cellSpacing):f.x+=this.Grid.columns.getColumn(u).width}else f.x+=this.Grid.columns.getColumn(u).width}t.rowMergeComplete&&!t.isRowHeightSet||(this.currentBounds.y+=r),i.bounds=new Zo(new Xo(i.bounds.x,i.bounds.y),new Qo(f.x,f.y))},e.prototype.isFitToCell=function(t,e,i){for(var r=!1,n=new vs,o=0;o<i.cells.count;o++){var s=i.cells.getCell(o);if(void 0!==s.value&&null!==s.value&&"string"==typeof s.value){var a=null;a=void 0!==s.style.font&&null!=s.style.font?s.style.font:void 0!==s.row.style.font&&null!=s.row.style.font?s.row.style.font:void 0!==s.row.grid.style.font&&null!=s.row.grid.style.font?s.row.grid.style.font:bl.defaultFont,this.remainderText=i.cells.getCell(o).value;var l=i.cells.getCell(o).width;e.columns.getColumn(o).isCustomWidth&&i.cells.getCell(o).width>e.columns.getColumn(o).width&&(l=e.columns.getColumn(o).width),this.slr=n.layout(i.cells.getCell(o).value,a,i.cells.getCell(o).stringFormat,new Qo(l,t),!1,this.currentPageBounds);var h=this.slr.actualSize.height;if(0==h){r=!1;break}if(null!=i.cells.getCell(o).style&&null!=i.cells.getCell(o).style.borders&&null!=i.cells.getCell(o).style.borders.top&&null!=i.cells.getCell(o).style.borders.bottom&&(h+=2*(i.cells.getCell(o).style.borders.top.width+i.cells.getCell(o).style.borders.bottom.width)),this.slr.lineCount>1&&null!=i.cells.getCell(o).stringFormat&&0!=i.cells.getCell(o).stringFormat.lineSpacing&&(h+=(this.slr.lineCount-1)*i.cells.getCell(o).style.stringFormat.lineSpacing),i.cells.getCell(o).style.cellPadding,h+=e.style.cellPadding.top+e.style.cellPadding.bottom,h+=e.style.cellSpacing,t>h||void 0!==this.slr.remainder&&null!==this.slr.remainder){r=!0;break}}}return r},e.prototype.drawRowWithBreak=function(t,e,i){var r=new Xo(this.currentBounds.x,this.currentBounds.y);e.grid.isChildGrid&&e.grid.allowRowBreakAcrossPages&&this.startLocation.x!==this.currentBounds.x&&(r.x=this.startLocation.x),t.bounds=new Zo(r,new Qo(0,0)),this.gridHeight=e.rowBreakHeight>0?this.currentPageBounds.height:0,e.grid.style.cellPadding.top+this.currentBounds.y+e.grid.style.cellPadding.bottom<this.currentPageBounds.height&&(e.rowBreakHeight=this.currentBounds.y+i-this.currentPageBounds.height);for(var n=0;n<e.cells.count;n++){var o=e.cells.getCell(n);o.measureHeight()===i&&o.value instanceof Lh&&(e.rowBreakHeight=0)}for(n=this.cellStartIndex;n<=this.cellEndIndex;n++){var s=e.cells.getCell(n).columnSpan+n>this.cellEndIndex+1&&e.cells.getCell(n).columnSpan>1,a=new Qo(this.Grid.columns.getColumn(n).width,this.gridHeight>0?this.gridHeight:this.currentPageBounds.height),l=e.cells.getCell(n).style;e.cells.getCell(n).style=l;var h=null;if(h=e.cells.getCell(n).draw(this.currentGraphics,new Zo(r,a),s),e.rowBreakHeight>0&&null!=h&&void 0!==h.remainder&&(e.cells.getCell(n).FinishedDrawingCell=!1,e.cells.getCell(n).remainingString=null==h.remainder?" ":h.remainder,e.rowBreakHeight=i-h.actualSize.height),t.isFinish=t.isFinish?e.cells.getCell(n).FinishedDrawingCell:t.isFinish,e.cells.getCell(n).value instanceof Lh){var u=e.cells.getCell(n).value;this.rowBreakPageHeightCellIndex=n,this.Grid.columns.getColumn(n).width>=this.currentGraphics.clientSize.width?(r.x=this.rowLayoutBoundsWidth,r.x+=u.style.cellSpacing):r.x+=this.Grid.columns.getColumn(n).width}else r.x+=this.Grid.columns.getColumn(n).width}this.currentBounds.y+=this.gridHeight>0?this.gridHeight:i,t.bounds=new Zo(new Xo(t.bounds.x,t.bounds.y),new Qo(r.x,r.y))},e.repeatRowIndex=-1,e}(Tl),Dh=function(t){function e(e,i){return t.call(this,e,i)||this}return Th(e,t),e}(kl),kh=function(t){function e(e){return t.call(this,e)||this}return Th(e,t),e}(Ml),Eh=function(){function t(t,e,i,r,n){this.gridRowIndex=e,this.gridCellIndex=i,this.internalValue=n,this.gridBounds=r,this.pdfGraphics=t}return Object.defineProperty(t.prototype,"rowIndex",{get:function(){return this.gridRowIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cellIndex",{get:function(){return this.gridCellIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.internalValue},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return this.gridBounds},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphics",{get:function(){return this.pdfGraphics},enumerable:!0,configurable:!0}),t}(),jh=function(t){function e(e,i,r,n,o,s){var a=t.call(this,e,i,r,n,o)||this;return a.style=s,a}return Th(e,t),Object.defineProperty(e.prototype,"skip",{get:function(){return this.bSkip},set:function(t){this.bSkip=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this.cellStyle},set:function(t){this.cellStyle=t},enumerable:!0,configurable:!0}),e}(Eh),Ih=function(t){function e(e,i,r,n,o,s){var a=t.call(this,e,i,r,n,o)||this;return a.cellStyle=s,a}return Th(e,t),Object.defineProperty(e.prototype,"style",{get:function(){return this.cellStyle},enumerable:!0,configurable:!0}),e}(Eh),Rh=function(){function t(){}return Object.defineProperty(t.prototype,"cancel",{get:function(){return this.isCancel},set:function(t){this.isCancel=t},enumerable:!0,configurable:!0}),t}(),Ah=function(t){function e(e,i){var r=t.call(this)||this;return r.bounds=e,r.pdfPage=i,r}return Th(e,t),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.cellBounds},set:function(t){this.cellBounds=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){return this.pdfPage},enumerable:!0,configurable:!0}),e}(Rh),Nh=function(t){function e(e){var i=t.call(this)||this;return i.layoutResult=e,i}return Th(e,t),Object.defineProperty(e.prototype,"result",{get:function(){return this.layoutResult},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nextPage",{get:function(){return this.nextPdfPage},set:function(t){this.nextPdfPage=t},enumerable:!0,configurable:!0}),e}(Rh),Fh=function(t){function e(e,i,r){var n=t.call(this,e,i)||this;return n.startRow=r,n}return Th(e,t),Object.defineProperty(e.prototype,"startRowIndex",{get:function(){return this.startRow},enumerable:!0,configurable:!0}),e}(Ah),Vh=function(t){function e(e){return t.call(this,e)||this}return Th(e,t),e}(Nh),zh=function(){function t(){this.layoutedBounds=new Zo(0,0,0,0)}return Object.defineProperty(t.prototype,"isFinish",{get:function(){return this.bIsFinished},set:function(t){this.bIsFinished=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return this.layoutedBounds},set:function(t){this.layoutedBounds=t},enumerable:!0,configurable:!0}),t}(),Gh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),_h=function(t){function e(e){var i=t.call(this,e)||this;return i.olderPdfForm=0,i.shapeBounds=new Zo,i.totalPageSize=0,i}return Gh(e,t),Object.defineProperty(e.prototype,"element",{get:function(){return this.elements},enumerable:!0,configurable:!0}),e.prototype.layoutInternal=function(t){var e=t.page,i=t.bounds,r=this.element.getBounds();r.x=0,r.y=0;var n=this.shapeBounds.x===this.shapeBounds.y&&this.shapeBounds.y===this.shapeBounds.width&&this.shapeBounds.width===this.shapeBounds.height&&0===this.shapeBounds.height;this.isPdfGrid&&!n&&(r=this.shapeBounds);var o=null,s=new Hh;for(s.page=e;;){var a=this.raiseBeforePageLayout(e,i);i=a.currentBounds;var l=null;if(a.cancel||(s=this.layoutOnPage(e,i,r,t),l=this.raiseEndPageLayout(s),a.cancel=null!==l&&l.cancel),s.end||a.cancel){o=this.getLayoutResult(s);break}if(i=this.getPaginateBounds(t),r=this.getNextShapeBounds(r,s),e=null===l||null===l.nextPage?this.getNextPage(e):l.nextPage,this.isPdfGrid){o=this.getLayoutResult(s);break}}return o},e.prototype.raiseBeforePageLayout=function(t,e){var i=!1;if(this.element.raiseBeginPageLayout){var r=new Ah(e,t);this.element.onBeginPageLayout(r),i=r.cancel,e=r.bounds}return{currentBounds:e,cancel:i}},e.prototype.raiseEndPageLayout=function(t){var e=null;if(this.element.raiseEndPageLayout){var i=this.getLayoutResult(t);e=new Nh(i),this.element.onEndPageLayout(e)}return e},e.prototype.getLayoutResult=function(t){return new kl(t.page,t.bounds)},e.prototype.getNextShapeBounds=function(t,e){var i=e.bounds;return t.y=t.y+i.height,t.height=t.height-i.height,t},e.prototype.layoutOnPage=function(t,e,i,r){var n=new Hh;e=this.checkCorrectCurrentBounds(t,e,r);var o=this.fitsToBounds(e,i),s=!1;if(!(r.format.break===Fa.FitElement&&!o&&t===r.page)){var a=this.getDrawBounds(e,i);this.drawShape(t.graphics,e,a),n.bounds=this.getPageResultBounds(e,i),s=e.height>=i.height}return n.end=s||r.format.layout===ra.OnePage,n.page=t,n},e.prototype.getDrawBounds=function(t,e){var i=t;return i.y=i.y-e.y,i.height=i.height+e.y,i},e.prototype.drawShape=function(t,e,i){var r=t.save();try{t.setClip(e),this.element.drawGraphicsHelper(t,new Xo(i.x,i.y))}finally{t.restore(r)}},e.prototype.checkCorrectCurrentBounds=function(t,e,i){var r=t.graphics.clientSize;return e.width=e.width>0?e.width:r.width-e.x,e.height=e.height>0?e.height:r.height-e.y,this.isPdfGrid&&(e.height=e.height-this.bottomCellPadding),e},e.prototype.getPageResultBounds=function(t,e){var i=t;return i.height=Math.min(i.height,e.height),i},e.prototype.fitsToBounds=function(t,e){return e.height<=t.height},e.index=0,e.splitDiff=0,e.last=!1,e.borderWidth=0,e}(Tl),Hh=function(){return function(){}}(),Wh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Uh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Wh(e,t),e.prototype.getBounds=function(){return this.getBoundsInternal()},e.prototype.drawGraphicsHelper=function(t,e){if(null==t)throw new Error("ArgumentNullException :graphics");this.drawShapeHelper(t,e.x,e.y)},e.prototype.drawShapeHelper=function(t,e,i){var r=.5!==e||.5!==i,n=null;r&&(n=t.save(),t.translateTransform(e,i)),this.drawInternal(t),r&&t.restore(n)},e.prototype.layout=function(t){return new _h(this).layout(t)},e}(Il),qh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Kh=function(t){function e(e){var i=t.call(this)||this;return void 0!==e&&(i.mpen=e),i}return qh(e,t),Object.defineProperty(e.prototype,"pen",{get:function(){return this.mpen},set:function(t){this.mpen=t},enumerable:!0,configurable:!0}),e}(Uh),Yh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),$h=function(t){function e(e,i){var r=t.call(this)||this;return r.mbrush=null,void 0===e||(e instanceof Ws?r=t.call(this,e)||this:r.mbrush=i),r}return Yh(e,t),Object.defineProperty(e.prototype,"brush",{get:function(){return this.mbrush},set:function(t){this.mbrush=t},enumerable:!0,configurable:!0}),e.prototype.obtainPen=function(){return null==this.mbrush&&null==this.pen?new Ws(new Jo(0,0,0)):this.pen},e}(Kh),Jh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Xh=(function(t){function e(e,i,r,n){var o=t.call(this)||this;return o.mpoints=null,o.mpathTypes=null,o.mStartFigure=!0,o.mfillMode=Ho.Alternate,o.isBeziers3=!1,o.isXps=!1,void 0===e||(e instanceof Ws?(o=t.call(this,e)||this,i instanceof es?(o=t.call(this,e,i)||this).fillMode=r:null!==i&&void 0!==i&&null!==r&&void 0!==r&&o.addPath(i,r)):e instanceof es?(o=t.call(this,e)||this,null!==i&&void 0!==i&&(o.fillMode=i),null!==r&&void 0!==r&&null!==n&&void 0!==n&&o.addPath(r,n)):o.addPath(e,i)),o}Jh(e,t),Object.defineProperty(e.prototype,"fillMode",{get:function(){return this.mfillMode},set:function(t){this.mfillMode=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pathPoints",{get:function(){return this.points},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pathTypes",{get:function(){return this.types},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pointCount",{get:function(){var t=0;return null!=this.mpoints&&(t=this.mpoints.length),t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastPoint",{get:function(){return this.getLastPoint()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"points",{get:function(){return null==this.mpoints&&(this.mpoints=[]),this.mpoints},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"types",{get:function(){return null==this.mpathTypes&&(this.mpathTypes=[]),this.mpathTypes},enumerable:!0,configurable:!0}),e.prototype.draw=function(t,e,i,r){if(e instanceof Xo&&void 0===e.width&&void 0===i)return this.drawHelper(t,e.x,e.y);if(e instanceof Zo&&void 0!==e.width&&void 0===i)return this.drawHelper(t,e,null);if("number"==typeof e&&"number"==typeof i&&void 0===r)return this.drawHelper(t,e,i,null);if(e instanceof Xo&&i instanceof Ml)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&(r instanceof Ml||null==r)&&"number"==typeof i){var n=t.graphics.clientSize.width-e,o=new Zo(e,i,n,0);return this.drawHelper(t,o,r)}return this.drawHelper(t,e,i)},e.prototype.addArc=function(t,e,i,r,n,o){if(t instanceof Zo)this.addArc(t.x,t.y,t.width,t.height,e,i);else for(var s=this.getBezierArcPoints(t,e,e+i,e+r,n,o),a=0;a<s.length;a+=8){var l=[s[a],s[a+1],s[a+2],s[a+3],s[a+4],s[a+5],s[a+6],s[a+7]];this.addPoints(l,Va.Bezier3)}},e.prototype.addBezier=function(t,e,i,r,n,o,s,a){if(t instanceof Xo&&e instanceof Xo&&i instanceof Xo&&r instanceof Xo)this.addBezier(t.x,t.y,e.x,e.y,i.x,i.y,r.x,r.y);else{var l=[];l.push(t),l.push(e),l.push(i),l.push(r),l.push(n),l.push(o),l.push(s),l.push(a),this.addPoints(l,Va.Bezier3)}},e.prototype.addEllipse=function(t,e,i,r){t instanceof Zo?this.addEllipse(t.x,t.y,t.width,t.height):(this.startFigure(),this.addArc(t,e,i,r,0,360),this.closeFigure())},e.prototype.addLine=function(t,e,i,r){if(t instanceof Xo&&e instanceof Xo)this.addLine(t.x,t.y,e.x,e.y);else{var n=[];n.push(t),n.push(e),n.push(i),n.push(r),this.addPoints(n,Va.Line)}},e.prototype.addPath=function(t,i){if(t instanceof e)this.addPath(t.pathPoints,t.pathTypes);else{if(null==t)throw new Error("ArgumentNullException:pathPoints");if(null==i)throw new Error("ArgumentNullException:pathTypes");if(t.length!==i.length)throw new Error("The argument arrays should be of equal length.")}},e.prototype.addPie=function(t,e,i,r,n,o){t instanceof Zo?this.addPie(t.x,t.y,t.width,t.height,e,i):(this.startFigure(),this.addArc(t,e,i,r,n,o),this.addPoint(new Xo(t+i/2,e+r/2),Va.Line),this.closeFigure())},e.prototype.addPolygon=function(t){t.length;var e=[];this.startFigure();for(var i=0;i<t.length;i++)e.push(t[i].x),e.push(t[i].y);this.addPoints(e,Va.Line),this.closeFigure()},e.prototype.addRectangle=function(t,e,i,r){if(t instanceof Zo)this.addRectangle(t.x,t.y,t.width,t.height);else{var n=[];this.startFigure(),n.push(t),n.push(e),n.push(t+i),n.push(e),n.push(t+i),n.push(e+r),n.push(t),n.push(e+r),this.addPoints(n,Va.Line),this.closeFigure()}},e.prototype.startFigure=function(){this.mStartFigure=!0},e.prototype.closeAllFigures=function(){for(var t=this.pathPoints[0],e=0;e<this.mpathTypes.length;e++){var i=this.types[e],r=!1;0!==e&&i===Va.Start?(this.closeFigure(e-1),r=!0):e===this.mpathTypes.length-1&&!r&&this.isXps&&t.x===this.pathPoints[e].y&&this.closeFigure(e)}},e.prototype.getLastPoint=function(){var t=new Xo(0,0),e=this.pointCount;return e>0&&null!=this.mpoints&&(t.x=this.mpoints[e-1].x,t.y=this.mpoints[e-1].y),t},e.prototype.getBezierArcPoints=function(t,e,i,r,n,o){if(t>i){var s=void 0;s=t,t=i,i=s}if(r>e){s=void 0;s=e,e=r,r=s}var a,l;Math.abs(o)<=90?(a=o,l=1):a=o/(l=Math.ceil(Math.abs(o)/90));for(var h=(t+i)/2,u=(e+r)/2,c=(i-t)/2,p=(r-e)/2,d=a*(Math.PI/360),f=Math.abs(4/3*(1-Math.cos(d))/Math.sin(d)),g=[],m=0;m<l;m++){var y=(n+m*a)*(Math.PI/180),b=(n+(m+1)*a)*(Math.PI/180),v=Math.cos(y),w=Math.cos(b),S=Math.sin(y),P=Math.sin(b);a>0?g.push(h+c*v,u-p*S,h+c*(v-f*S),u-p*(S+f*v),h+c*(w+f*P),u-p*(P-f*w),h+c*w,u-p*P):g.push(h+c*v,u-p*S,h+c*(v+f*S),u-p*(S-f*v),h+c*(w-f*P),u-p*(P+f*w),h+c*w,u-p*P)}return g},e.prototype.getBoundsInternal=function(){var t=this.pathPoints,e=new Zo(0,0,0,0);if(t.length>0){for(var i=t[0].x,r=t[0].x,n=t[0].y,o=t[0].y,s=1;s<t.length;s++){var a=t[s];i=Math.min(a.x,i),r=Math.max(a.x,r),n=Math.min(a.y,n),o=Math.max(a.y,o)}e=new Zo(i,n,r-i,o-n)}return e},e.prototype.drawInternal=function(t){if(null==t)throw new Error("ArgumentNullException :graphics");t.drawPath(this.obtainPen(),this.brush,this)},e.prototype.addPoints=function(t,e,i,r){if(void 0===i&&void 0===r)this.addPoints(t,e,0,t.length);else for(var n=i;n<r;n++){var o=new Xo(t[n],t[n+1]);n===i?this.pointCount<=0||this.mStartFigure?(this.addPoint(o,Va.Start),this.mStartFigure=!1):o.x===this.lastPoint.x||o.y===this.lastPoint.y||this.isBeziers3?o.x!==this.lastPoint.x&&o.y!==this.lastPoint.y&&this.addPoint(o,Va.Bezier3):this.addPoint(o,Va.Line):this.addPoint(o,e),n++}},e.prototype.addPoint=function(t,e){this.points.push(t),this.types.push(e)},e.prototype.closeFigure=function(t){if(void 0===t)this.pointCount>0&&this.closeFigure(this.pointCount-1),this.startFigure();else{if(t<0)throw new Error("IndexOutOfRangeException()");var e=this.types[t];e|=Va.CloseSubpath,this.types[t]=e}}}($h),function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),Qh=function(t){function e(e,i,r,n,o,s){var a=t.call(this)||this;return a.bounds=new Zo(0,0,0,0),void 0===e||(e instanceof Ws?(a=t.call(this,e,i)||this).bounds=r instanceof Zo?r:new Zo(r,n,o,s):a.bounds=e instanceof Zo?e:new Zo(e,i,r,n)),a}return Xh(e,t),Object.defineProperty(e.prototype,"x",{get:function(){return this.bounds.x},set:function(t){this.bounds.x=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.bounds.y},set:function(t){this.bounds.y=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.bounds.width},set:function(t){this.bounds.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.bounds.height},set:function(t){this.bounds.height=t},enumerable:!0,configurable:!0}),e.prototype.getBoundsInternal=function(){return this.bounds},e}($h),Zh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),tu=function(t){function e(e,i,r,n,o,s,a,l){var h=t.call(this)||this;return h.startAngle=0,h.sweepAngle=0,void 0===e||(e instanceof Zo&&void 0!==i&&void 0!==r?((h=t.call(this,e)||this).startAngle=i,h.sweepAngle=r):e instanceof Ws?r instanceof Zo?((h=t.call(this,e,i,r)||this).startAngle=n,h.sweepAngle=o):((h=t.call(this,e,i,r,n,o,s)||this).startAngle=a,h.sweepAngle=l):((h=t.call(this,e,i,r,n)||this).startAngle=o,h.sweepAngle=s)),h}return Zh(e,t),e}(Qh),eu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),iu=(function(t){function e(e,i,r,n,o,s,a){var l=this;return void 0===e?l=t.call(this)||this:e instanceof Zo?l=t.call(this,e,i,r)||this:e instanceof Ws?i instanceof Zo?l=t.call(this,e,null,i,r,n)||this:void 0===s&&void 0===a?l=t.call(this,e,null,0,0,i,r,n,o)||this:void 0!==s&&void 0!==a&&(l=t.call(this,e,null,i,r,n,o,s,a)||this):void 0!==e&&void 0===o&&void 0===s?l=t.call(this,0,0,e,i,r,n)||this:void 0!==e&&void 0!==o&&void 0!==s&&(l=t.call(this,e,i,r,n,o,s)||this),l}eu(e,t),e.prototype.draw=function(t,e,i,r){if(e instanceof Xo&&void 0===e.width&&void 0===i)return this.drawHelper(t,e.x,e.y);if(e instanceof Zo&&void 0!==e.width&&void 0===i)return this.drawHelper(t,e,null);if("number"==typeof e&&"number"==typeof i&&void 0===r)return this.drawHelper(t,e,i,null);if(e instanceof Xo&&i instanceof Ml)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&(r instanceof Ml||null==r)&&"number"==typeof i){var n=t.graphics.clientSize.width-e,o=new Zo(e,i,n,0);return this.drawHelper(t,o,r)}return this.drawHelper(t,e,i)},e.prototype.drawInternal=function(t){if(null==t)throw new Error("ArgumentNullException : graphics");t.drawArc(this.obtainPen(),this.bounds,this.startAngle,this.sweepAngle)}}(tu),function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),ru=(function(t){function e(e,i,r){var n=t.call(this,i)||this;return n.isEmbedFont=!1,n.isUnicode=!0,void 0!==r?n.createFontInternal(e,r):n.createFontInternal(e,$o.Regular),n}iu(e,t),e.prototype.equalsToFont=function(t){return!1},e.prototype.getLineWidth=function(t,e){var i=0;if(null!==e&&void 0!==e&&e.textDirection!==Yo.None){i=this.getUnicodeLineWidth(t,i,e).width}else i=this.fontInternal.getLineWidth(t);var r=this.metrics.getSize(e);return i*=Cs.charSizeMultiplier*r,i=this.applyFormatSettings(t,e,i)},e.prototype.getCharWidth=function(t,e){var i=this.fontInternal.getCharWidth(t);return i*=.001*this.metrics.getSize(e)},e.prototype.createFontInternal=function(t,e){this.fontInternal=new Ea(t,this.size),this.calculateStyle(e),this.initializeInternals()},e.prototype.calculateStyle=function(t){var e=this.fontInternal.ttfMetrics.macStyle;0!=(t&$o.Underline)&&(e|=$o.Underline),0!=(t&$o.Strikeout)&&(e|=$o.Strikeout),this.setStyle(e)},e.prototype.initializeInternals=function(){var t=null;bl.enableCache&&(t=bl.cache.search(this));var e=null;if(null!==t&&void 0!==t){e=t.getInternals();var i=t.metrics;(i=i.clone()).size=this.size,this.metrics=i,this.fontInternal=t.fontInternal}else null==t&&(this.fontInternal instanceof Ea&&(this.fontInternal.isEmbed=this.isEmbedFont),this.fontInternal.createInternals(),e=this.fontInternal.getInternals(),this.metrics=this.fontInternal.metrics);this.metrics.isUnicodeFont=!0,this.setInternals(e)},e.prototype.setSymbols=function(t){var e=this.fontInternal;null!=e&&e.setSymbols(t)},Object.defineProperty(e.prototype,"Unicode",{get:function(){return this.isUnicode},enumerable:!0,configurable:!0}),e.prototype.getUnicodeLineWidth=function(t,e,i){e=0;var r=null,n=(new Na).getGlyphIndex(t,this,i.textDirection===Yo.RightToLeft,r,!0),o=n.success;if(r=n.glyphs,o&&null!==r)for(var s=this.fontInternal.ttfReader,a=0,l=r.length;a<l;a++){var h=r[a],u=s.getGlyph(h);null!==u&&void 0!==u&&(e+=u.width)}return{success:o,width:e}}}(Cs),function(){function t(t,e,i,r,n){t instanceof Zo&&void 0===e?this.InitiateBounds(t.x,t.y,t.width,t.height,null):t instanceof Zo&&e instanceof sl&&void 0===i?this.InitiateBounds(t.x,t.y,t.width,t.height,e):t instanceof Xo&&e instanceof Qo&&void 0===i?this.InitiateBounds(t.x,t.y,e.width,e.height,null):t instanceof Xo&&e instanceof Qo&&i instanceof sl&&void 0===r?this.InitiateBounds(t.x,t.y,e.width,e.height,i):t instanceof Qo&&void 0===e?this.InitiateBounds(0,0,t.width,t.height,null):"number"==typeof t&&"number"==typeof e&&void 0===i?this.InitiateBounds(0,0,t,e,null):"number"==typeof t&&"number"==typeof e&&i instanceof sl&&void 0===r?this.InitiateBounds(0,0,t,e,i):this.InitiateBounds(t,e,i,r,null)}Object.defineProperty(t.prototype,"dock",{get:function(){return this.dockStyle},set:function(t){this.dockStyle=t,this.resetAlignment()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"alignment",{get:function(){return this.alignmentStyle},set:function(t){this.setAlignment(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"foreground",{get:function(){return this.isForeground},set:function(t){this.isForeground=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"background",{get:function(){return!this.isForeground},set:function(t){this.isForeground=!t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this.currentLocation},set:function(t){this.type===Vs.None&&(this.currentLocation=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return void 0!==this.currentLocation?this.currentLocation.x:0},set:function(t){this.type===Vs.None&&(this.currentLocation.x=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return void 0!==this.currentLocation?this.currentLocation.y:0},set:function(t){this.type===Vs.None&&(this.currentLocation.y=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.template.size},set:function(t){this.type===Vs.None&&this.template.reset(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.template.width},set:function(t){if(this.template.width!==t&&this.type===Vs.None){var e=this.template.size;e.width=t,this.template.reset(e)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.template.height},set:function(t){if(this.template.height!==t&&this.type===Vs.None){var e=this.template.size;e.height=t,this.template.reset(e)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphics",{get:function(){return this.template.graphics},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"template",{get:function(){return this.pdfTemplate},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this.templateType},set:function(t){this.updateDocking(t),this.templateType=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return new Zo(new Xo(this.x,this.y),this.size)},set:function(t){this.type===Vs.None&&(this.location=new Xo(t.x,t.y),this.size=new Qo(t.width,t.height))},enumerable:!0,configurable:!0}),t.prototype.InitiateBounds=function(t,e,i,r,n){this.x=t,this.y=e,this.pdfTemplate=new Ha(i,r)},t.prototype.updateDocking=function(t){if(t!==Vs.None){switch(t){case Vs.Top:this.dock=Ns.Top;break;case Vs.Bottom:this.dock=Ns.Bottom;break;case Vs.Left:this.dock=Ns.Left;break;case Vs.Right:this.dock=Ns.Right}this.resetAlignment()}},t.prototype.resetAlignment=function(){this.alignment=Fs.None},t.prototype.setAlignment=function(t){if(this.dock===Ns.None)this.alignmentStyle=t;else{var e=!1;switch(this.dock){case Ns.Left:e=t===Fs.TopLeft||t===Fs.MiddleLeft||t===Fs.BottomLeft||t===Fs.None;break;case Ns.Top:e=t===Fs.TopLeft||t===Fs.TopCenter||t===Fs.TopRight||t===Fs.None;break;case Ns.Right:e=t===Fs.TopRight||t===Fs.MiddleRight||t===Fs.BottomRight||t===Fs.None;break;case Ns.Bottom:e=t===Fs.BottomLeft||t===Fs.BottomCenter||t===Fs.BottomRight||t===Fs.None;break;case Ns.Fill:e=t===Fs.MiddleCenter||t===Fs.None}e&&(this.alignmentStyle=t)}},t.prototype.draw=function(t,e){var i=t.page,r=this.calculateBounds(i,e);-0===r.x&&(r.x=0),t.graphics.drawPdfTemplate(this.template,new Xo(r.x,r.y),new Qo(r.width,r.height))},t.prototype.calculateBounds=function(t,e){var i=this.bounds;return this.alignmentStyle!==Fs.None?i=this.getAlignmentBounds(t,e):this.dockStyle!==Ns.None&&(i=this.getDockBounds(t,e)),i},t.prototype.getAlignmentBounds=function(t,e){this.bounds;return this.type===Vs.None?this.getSimpleAlignmentBounds(t,e):this.getTemplateAlignmentBounds(t,e)},t.prototype.getSimpleAlignmentBounds=function(t,e){var i=this.bounds,r=t.section.getActualBounds(e,t,!1),n=this.x,o=this.y;switch(this.alignmentStyle){case Fs.TopLeft:n=0,o=0;break;case Fs.TopCenter:n=(r.width-this.width)/2,o=0;break;case Fs.TopRight:n=r.width-this.width,o=0;break;case Fs.MiddleLeft:n=0,o=(r.height-this.height)/2;break;case Fs.MiddleCenter:n=(r.width-this.width)/2,o=(r.height-this.height)/2;break;case Fs.MiddleRight:n=r.width-this.width,o=(r.height-this.height)/2;break;case Fs.BottomLeft:n=0,o=r.height-this.height;break;case Fs.BottomCenter:n=(r.width-this.width)/2,o=r.height-this.height;break;case Fs.BottomRight:n=r.width-this.width,o=r.height-this.height}return i.x=n,i.y=o,i},t.prototype.getTemplateAlignmentBounds=function(t,e){var i=this.bounds,r=t.section,n=r.getActualBounds(e,t,!1),o=this.x,s=this.y;switch(this.alignmentStyle){case Fs.TopLeft:this.type===Vs.Left?(o=-n.x,s=0):this.type===Vs.Top&&(o=-n.x,s=-n.y);break;case Fs.TopCenter:o=(n.width-this.width)/2,s=-n.y;break;case Fs.TopRight:this.type===Vs.Right?(o=n.width+r.getRightIndentWidth(e,t,!1)-this.width,s=0):this.type===Vs.Top&&(o=n.width+r.getRightIndentWidth(e,t,!1)-this.width,s=-n.y);break;case Fs.MiddleLeft:o=-n.x,s=(n.height-this.height)/2;break;case Fs.MiddleCenter:o=(n.width-this.width)/2,s=(n.height-this.height)/2;break;case Fs.MiddleRight:o=n.width+r.getRightIndentWidth(e,t,!1)-this.width,s=(n.height-this.height)/2;break;case Fs.BottomLeft:this.type===Vs.Left?(o=-n.x,s=n.height-this.height):this.type===Vs.Bottom&&(o=-n.x,s=n.height+r.getBottomIndentHeight(e,t,!1)-this.height);break;case Fs.BottomCenter:o=(n.width-this.width)/2,s=n.height+r.getBottomIndentHeight(e,t,!1)-this.height;break;case Fs.BottomRight:this.type===Vs.Right?(o=n.width+r.getRightIndentWidth(e,t,!1)-this.width,s=n.height-this.height):this.type===Vs.Bottom&&(o=n.width+r.getRightIndentWidth(e,t,!1)-this.width,s=n.height+r.getBottomIndentHeight(e,t,!1)-this.height)}return i.x=o,i.y=s,i},t.prototype.getDockBounds=function(t,e){this.bounds;return this.type===Vs.None?this.getSimpleDockBounds(t,e):this.getTemplateDockBounds(t,e)},t.prototype.getSimpleDockBounds=function(t,e){this.bounds;var i=t.section.getActualBounds(e,t,!1),r=this.x,n=this.y,o=this.width,s=this.height;switch(this.dockStyle){case Ns.Left:r=0,n=0,o=this.width,s=i.height;break;case Ns.Top:r=0,n=0,o=i.width,s=this.height;break;case Ns.Right:r=i.width-this.width,n=0,o=this.width,s=i.height;break;case Ns.Bottom:r=0,n=i.height-this.height,o=i.width,s=this.height;break;case Ns.Fill:r=0,r=0,o=i.width,s=i.height}return new Zo(r,n,o,s)},t.prototype.getTemplateDockBounds=function(t,e){this.bounds;var i=t.section,r=i.getActualBounds(e,t,!1),n=i.pageSettings.getActualSize(),o=this.x,s=this.y,a=this.width,l=this.height;switch(this.dockStyle){case Ns.Left:o=-r.x,s=0,a=this.width,l=r.height;break;case Ns.Top:o=-r.x,s=-r.y,a=n.width,l=this.height,r.height<0&&(s=-r.y+n.height);break;case Ns.Right:o=r.width+i.getRightIndentWidth(e,t,!1)-this.width,s=0,a=this.width,l=r.height;break;case Ns.Bottom:o=-r.x,s=r.height+i.getBottomIndentHeight(e,t,!1)-this.height,a=n.width,l=this.height,r.height<0&&(s-=n.height);break;case Ns.Fill:o=0,o=0,a=r.width,l=r.height}return new Zo(o,s,a,l)}}(),function(){function t(t){this.control=t}return t.prototype.export=function(t,e,i,r){var n=this;return new Promise(function(t,o){var s=w("canvas",{id:"ej2-canvas",attrs:{width:n.control.availableSize.width.toString(),height:n.control.availableSize.height.toString()}});wi.userAgent.toString().indexOf("HeadlessChrome");i=c(i)?Ms.Landscape:i;var a=n.control.svgObject.cloneNode(!0),l=a.childNodes[0];if(!c(l)){var h=l.getAttribute("fill");"Tailwind"!==n.control.theme&&"TailwindDark"!==n.control.theme&&"Bootstrap5"!==n.control.theme&&"Bootstrap5Dark"!==n.control.theme&&"Fluent"!==n.control.theme&&"FluentDark"!==n.control.theme||"rgba(255,255,255, 0.0)"!==h&&"transparent"!==h||a.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)")}var u=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(a)],{type:"image/svg+xml"})),p=new Image,d=s.getContext("2d");p.onload=function(){d.drawImage(p,0,0),window.URL.revokeObjectURL(u);var o=new bl,a=s.toDataURL("image/jpeg").replace("image/jpeg","image/octet-stream");o.pageSettings.orientation=i,a=a.slice(a.indexOf(",")+1),o.pages.add().graphics.drawImage(new la(a),0,0,n.control.availableSize.width-60,n.control.availableSize.height),r?(o.save(e+".pdf"),o.destroy()):t(null)},p.src=u})},t.prototype.getModuleName=function(){return"PdfExport"},t.prototype.destroy=function(t){},t}()),nu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ou=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},su=function(t){function e(e,i){var r=t.call(this,e,i)||this;return r.isResize=!1,r.orientation="Horizontal",r.drilledItems=[],r.isHierarchicalData=!1,r.levelSelection=[],r.legendId=[],r}return nu(e,t),e.prototype.preRender=function(){var t=this;this.trigger("load",{treemap:this},function(){t.initPrivateVariable(),t.unWireEVents(),t.createSvg(),t.wireEVents(),t.setCulture()})},e.prototype.render=function(){this.renderElements()},e.prototype.renderElements=function(){au.levelsData=null,au.defaultLevelsData=null,au.hierarchyData=null,this.createSecondaryElement(),this.addTabIndex(),this.themeStyle=ve(this.theme),this.renderBorder(),this.renderTitle(this.titleSettings,"title",null,null),c(au.levelsData)||(au.defaultLevelsData=au.levelsData),this.processDataManager()},e.prototype.processDataManager=function(){var t,e,i,r,n=this;if(this.dataSource instanceof qn){t=this.dataSource,e=this.query instanceof jn?this.query:new jn;t.executeQuery(e).then(function(t){n.dataSource=t.result,n.renderTreeMapElements()})}else this.dataSource instanceof kn?(r=this.dataSource,(i=new hi(r.dataOptions,r.type,r.async,r.contentType)).onSuccess=function(t){n.dataSource=JSON.parse("["+t+"]")[0],n.renderTreeMapElements()},i.send(r.sendData)):this.renderTreeMapElements()},e.prototype.renderTreeMapElements=function(){this.processingData(),this.treeMapLegendModule&&this.legendSettings.visible&&this.treeMapLegendModule.renderLegend(),this.layout.processLayoutPanel(),this.element.appendChild(this.svgObject),this.elementChange(),this.trigger("loaded",{treemap:this,isResized:this.isResize}),this.isResize=!1,this.renderComplete()},e.prototype.createSvg=function(){if(this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&L(this.svgObject)}this.clearTemplate();var t=this.element.clientWidth,e=this.element.clientHeight;this.availableSize=new xn(vt(this.width,t)||t||600,vt(this.height,e)||e||450),this.svgObject=this.renderer.createSvg({id:this.element.id+"_svg",width:this.availableSize.width,height:this.availableSize.height})},e.prototype.initPrivateVariable=function(){if(""===this.element.id){var t=document.getElementsByClassName("e-treemap").length;this.element.id="treemap_control_"+t}this.renderer=new Ir(this.element.id),this.layout=new En(this)},e.prototype.createSecondaryElement=function(){var t=document.getElementById(this.element.id+"_Secondary_Element");if(t&&t.childElementCount>0&&t.parentNode.removeChild(t),c(document.getElementById(this.element.id+"_Secondary_Element"))){var e=w("div",{id:this.element.id+"_Secondary_Element",styles:"position: absolute;z-index:1;"});this.element.appendChild(e)}},e.prototype.elementChange=function(){this.treeMapLegendModule&&this.legendSettings.visible&&this.treeMapLegendModule.legendGroup&&this.layout.layoutGroup&&!c(this.svgObject)&&this.svgObject.insertBefore(this.layout.layoutGroup,this.treeMapLegendModule.legendGroup)},e.prototype.renderBorder=function(){var t=this.border.width,e=this.svgObject.querySelector("#"+this.element.id+"_TreeMap_Border");if((this.border.width>0||this.background||this.themeStyle.backgroundColor)&&c(e)){var i=new Bn(this.element.id+"_TreeMap_Border",this.background||this.themeStyle.backgroundColor,this.border,1,new On(t/2,t/2,this.availableSize.width-t,this.availableSize.height-t));this.svgObject.appendChild(this.renderer.drawRectangle(i))}else e&&e.setAttribute("fill",this.background||this.themeStyle.backgroundColor)},e.prototype.renderTitle=function(t,e,i,r){var n,o=t.textStyle,s=this.availableSize.width-this.margin.right-this.margin.left;if(t.textStyle.fontFamily=this.themeStyle.fontFamily||t.textStyle.fontFamily,t.textStyle.size=this.themeStyle.fontSize||t.textStyle.size,t.text){c(r)&&(r=this.renderer.createGroup({id:this.element.id+"_Title_Group"}));var a=St(s,t.text,o),l=wt(a,o),h=Pt(c(i)?new On(this.margin.left,this.margin.top,this.availableSize.width,this.availableSize.height):i,t.alignment,l,e),u=new Tn(this.element.id+"_TreeMap_"+e,h.x,h.y,"start",a),p=new On(h.x,h.y,l.width,l.height),d=xt(u,o,o.color||("title"===e?this.themeStyle.titleFontColor:this.themeStyle.subTitleFontColor),r);d.setAttribute("aria-label",t.description||t.text),d.setAttribute("tabindex",(this.tabIndex+("title"===e?1:2)).toString()),("title"===e&&!t.subtitleSettings.text||"subtitle"===e)&&(n=this.availableSize.height-p.y-10-this.margin.bottom,this.areaRect=new On(this.margin.left,p.y+10,s,n)),"subtitle"!==e&&t.subtitleSettings.text?this.renderTitle(t.subtitleSettings,"subtitle",p,r):this.svgObject.appendChild(r)}else n=this.availableSize.height-this.margin.top-this.margin.bottom,this.areaRect=new On(this.margin.left,this.margin.top,s,n)},e.prototype.processingData=function(){var t,e=this;if(this.dataSource=this.dataSource,!c(this.dataSource)&&this.dataSource.length>0&&this.weightValuePath){if(au.levelsData=[],this.dataSource.map(function(t){t[e.weightValuePath]=t[e.weightValuePath]?t[e.weightValuePath].toString():t[e.weightValuePath]}),this.leafItemSettings.labelPath=this.leafItemSettings.labelPath||this.weightValuePath,this.checkIsHierarchicalData(),0===this.levels.length){var i={};i.level=0,t=this.leafItemSettings.labelPath,i[t]=[];for(var r=0;r<this.dataSource.length;r++){var n=Mt(this.dataSource[r]).values;this.isHierarchicalData&&n&&n.length>0?n.forEach(function(r,n){r[t]&&i[t].push({groupIndex:0,name:r[t],levelOrderName:r[t].toString(),data:r,weight:r[e.weightValuePath]})}):this.dataSource[r][t]&&i[t].push({groupIndex:0,name:this.dataSource[r][t],levelOrderName:this.dataSource[r][t].toString(),data:this.dataSource[r],weight:this.dataSource[r][this.weightValuePath]})}au.levelsData.push(i)}else{if(this.isHierarchicalData){au.hierarchyData=[],au.hierarchyData=u([],this.dataSource,au.hierarchyData,!0);for(r=0;r<au.hierarchyData.length;r++)this.processHierarchicalData(au.hierarchyData[r],r);au.levelsData=au.hierarchyData}else this.processFlatJsonData(),au.levelsData.length>1&&this.reOrderLevelData(au.levelsData.length-1);t=this.levels[0].groupPath}this.isHierarchicalData||this.findTotalWeight(au.levelsData[0][t],"Parent")}},e.prototype.checkIsHierarchicalData=function(){var t;this.dataSource=this.dataSource;for(var e=0;e<this.dataSource.length;e++){if((t=Mt(this.dataSource[e]).values)&&t.length){this.isHierarchicalData=!0;break}e===this.dataSource.length-1&&(this.isHierarchicalData=!1)}},e.prototype.processHierarchicalData=function(t,e){var i,r,n,o=this,s={},a=this.leafItemSettings.labelPath?this.leafItemSettings.labelPath:this.weightValuePath;if(s=Mt(t),(i=s?s.values:null)&&i.length>0){n=s.key;for(var l=0;l<this.levels.length;l++)n===this.levels[l].groupPath&&(this.levels[l],r=l);for(var h=0;h<i.length;h++){i[h].name=i[h][a],i[h].levelOrderName=(0===r?i[h].name:t.levelOrderName+"#"+i[h].name)+"";var u=i[h].levelOrderName,p=void 0;u.search("#")>0&&(p=u.split("#").length-1),i[h].groupIndex=c(r)?p===this.levels.length?this.levels.length:p:r,0!==r&&(i[h].parent=t),i[h].groupName=n,i[h].data=i[h],i[h].isDrilled=!1,i[h].weight=i[h][this.weightValuePath]}i.forEach(function(t){o.processHierarchicalData(t,e)})}if(e===au.hierarchyData.length-1){for(var d=au.hierarchyData[0][this.levels[0].groupPath],f=0;f<au.hierarchyData.length;f++)i=Mt(au.hierarchyData[f]).values,0!==f&&i&&(i.forEach(function(t){d.push(t)}),au.hierarchyData.splice(f,1),f-=1);d=au.hierarchyData[0][this.levels[0].groupPath];for(var g=0;g<d.length;g++)s[this.levels[0].groupPath]=d,d[g].parent=s}},e.prototype.print=function(t){this.allowPrint&&this.printModule&&this.printModule.print(t)},e.prototype.export=function(t,e,i,r){var n=this;return c(r)&&(r=!0),"PDF"===t&&this.allowPdfExport&&this.pdfExportModule?new Promise(function(o,s){o(n.pdfExportModule.export(t,e,i,r))}):this.allowImageExport&&"PDF"!==t&&this.imageExportModule?new Promise(function(i,o){i(n.imageExportModule.export(t,e,r))}):null},e.prototype.processFlatJsonData=function(){this.dataSource=this.dataSource;for(var t,e=[],i=0;i<this.levels.length+1;i++){t=this.levels[i]?this.levels[i].groupPath:this.leafItemSettings.labelPath;var r={};r.level=i,r[t]=[],au.levelsData.push(r);for(var n=0;n<this.dataSource.length;n++){var o={},s="";if(!c(t)){var a=this.dataSource[n][t];if(0!==i)for(var l=0;l<=i;l++){var h=this.levels[l]?this.levels[l].groupPath:t;s+=this.dataSource[n][h]+(l===i?"":"#")}e.length>0&&-1!==e.indexOf(s||a)||(o.name=a,o.levelOrderName=(s||a)+"",o.groupIndex=i,o.isDrilled=!1,o.groupName=t,o.data=this.dataSource[n],au.levelsData[au.levelsData.length-1][t].push(o),e.push(s||a))}}}},e.prototype.reOrderLevelData=function(t){for(var e,i=this.levels[t]?this.levels[t].groupPath:this.leafItemSettings.labelPath,r=this.levels[t-1].groupPath,n=au.levelsData[t][i],o=au.levelsData[t-1][r],s=0;s<n.length;s++){e=n[s].levelOrderName;for(var a=0;a<o.length;a++)if(o[a][i]=c(o[a][i])?[]:o[a][i],this.IsChildHierarchy(e.split("#"),o[a].levelOrderName.split("#"))){c(n[s].parent)&&(n[s].parent=o[a]),o[a][i].push(n[s]);break}}this.findTotalWeight(au.levelsData[au.levelsData.length-1][i],"Child"),au.levelsData.splice(t,1),t-1>0&&this.reOrderLevelData(t-1)},e.prototype.IsChildHierarchy=function(t,e){for(var i=!1,r=0;r<e.length;r++){if(t.length<r||e[r]!==t[r])return!1;i=!0}return i},e.prototype.findTotalWeight=function(t,e){for(var i,r,n,o=this,s={},a=function(a){i=0,n=t[a].groupName,r=t[a].levelOrderName.split("#"),l.dataSource.forEach(function(e){Tt(r,t[a].levelOrderName,e,o)&&(i+=parseFloat(e[o.weightValuePath]))}),"Parent"===e&&(s[n]=t,t[a].parent=s),t[a].weight=i},l=this,h=0;h<t.length;h++)a(h)},e.prototype.unWireEVents=function(){Si.remove(this.element,"click",this.clickOnTreeMap),Si.remove(this.element,"dblclick",this.doubleClickOnTreeMap),Si.remove(this.element,"contextmenu",this.rightClickOnTreeMap),Si.remove(this.element,wi.touchStartEvent,this.mouseDownOnTreeMap),Si.remove(this.element,wi.touchMoveEvent,this.mouseMoveOnTreeMap),Si.remove(this.element,wi.touchEndEvent,this.mouseEndOnTreeMap),Si.remove(this.element,"pointerleave mouseleave",this.mouseLeaveOnTreeMap),window.removeEventListener("resize",this.resizeOnTreeMap)},e.prototype.wireEVents=function(){Si.add(this.element,"click",this.clickOnTreeMap,this),Si.add(this.element,"dblclick",this.doubleClickOnTreeMap,this),Si.add(this.element,"contextmenu",this.rightClickOnTreeMap,this),Si.add(this.element,wi.touchStartEvent,this.mouseDownOnTreeMap,this),Si.add(this.element,wi.touchMoveEvent,this.mouseMoveOnTreeMap,this),Si.add(this.element,wi.touchEndEvent,this.mouseEndOnTreeMap,this),Si.add(this.element,"pointerleave mouseleave",this.mouseLeaveOnTreeMap,this),window.addEventListener("resize",this.resizeOnTreeMap.bind(this))},e.prototype.setCulture=function(){this.intl=new oi},e.prototype.addTabIndex=function(){this.element.setAttribute("aria-label",this.description||"TreeMap Element"),this.element.setAttribute("tabindex",this.tabIndex.toString())},e.prototype.resizeOnTreeMap=function(t){var e=this;this.isResize=!0;var i={name:"resize",cancel:!1,previousSize:this.availableSize,currentSize:new xn(0,0),treemap:this};this.resizeTo&&clearTimeout(this.resizeTo),!c(this.element)&&this.element.classList.contains("e-treemap")&&(this.resizeTo=setTimeout(function(){e.unWireEVents(),e.createSvg(),e.refreshing=!0,e.wireEVents(),i.currentSize=e.availableSize,e.trigger("resize",i,function(t){e.render()})},500))},e.prototype.clickOnTreeMap=function(t){var e,i,r=this,n=t.target,o=n.id,s=n.innerHTML,a={cancel:!1,name:"click",treemap:this,mouseEvent:t};this.trigger("click",a),o.indexOf("_Item_Index")>-1&&(t.preventDefault(),i=parseFloat(o.split("_Item_Index_")[1]),e={cancel:!1,name:"itemClick",treemap:this,item:this.layout.renderItems[i],mouseEvent:t,groupIndex:this.layout.renderItems[i].groupIndex,groupName:this.layout.renderItems[i].name,text:s,contentItemTemplate:s},this.trigger("itemClick",e,function(t){t.text===s&&t.contentItemTemplate===s||(c(r.leafItemSettings.labelTemplate)?(t.text=ie(t.text,t.item.data,t.treemap),n.innerHTML=t.text):Ot(o,n,t.contentItemTemplate))}));var l,h=(new Date).getMilliseconds();c(this.doubleClick)||(!c(l)&&h-l<500&&this.doubleClickOnTreeMap(t),l=h)},e.prototype.doubleClickOnTreeMap=function(t){var e={cancel:!1,name:rn,treemap:this,mouseEvent:t};this.trigger(rn,e)},e.prototype.rightClickOnTreeMap=function(t){var e={cancel:!1,name:nn,treemap:this,mouseEvent:t};this.trigger(nn,e)},e.prototype.mouseDownOnTreeMap=function(t){t.target.id.indexOf("_Item_Index")>-1&&(this.mouseDown=!0),this.notify(wi.touchStartEvent,t)},e.prototype.mouseMoveOnTreeMap=function(t){var e,i,r=t.target.id,n={cancel:!1,name:"mouseMove",treemap:this,mouseEvent:t};this.trigger("mouseMove",n);var o;r.indexOf("_Item_Index")>-1&&(o=Mt(i=this.layout.renderItems[parseFloat(r.split("_Item_Index_")[1])]).values,this.element.style.cursor=!i.isLeafItem&&o&&o.length>0&&this.enableDrillDown?"pointer":"auto",e={cancel:!1,name:"itemMove",treemap:this,item:i,mouseEvent:t},this.trigger("itemMove",e)),this.notify(wi.touchMoveEvent,t)},e.prototype.calculateSelectedTextLevels=function(t,e){for(var i,r,n,o=e.levelOrderName.split("#"),s=0,a=Object.keys(o);s<a.length;s++)o[r=a[s]]===t&&(i=parseInt(r,10),n=t);return{drillLevel:i,currentLevelLabel:n,levelText:o}},e.prototype.calculatePreviousLevelChildItems=function(t,e,i,r){for(var n,o,s,a=0,l=this.layout.renderItems[0].levelOrderName.split("#").length,h=0;h<l;h++)s=0===h?e.levelText[h]:s+"#"+e.levelText[h];a=l>1?l:a;for(var u=0,p=Object.values(this.layout.renderItems);u<p.length;u++){(o=p[u]).levelOrderName.split("#")[0]===e.levelText[0]&&(n=0===a?c(s)?s:e.levelText[a]:r?s:s+"#"+e.levelText[a])===o.levelOrderName&&(this.drilledItems.push({name:o.levelOrderName,data:o}),r=!0,++a<=i.groupIndex&&(s=n=n+"#"+e.levelText[a]))}return r},e.prototype.compareSelectedLabelWithDrillDownItems=function(t,e,i){var r,n={};return t.drillLevel+1===this.drilledItems[i].data.groupIndex?((r=this.drilledItems[i].data.parent).isDrilled=!0,n[r[this.drilledItems[i].data.groupName]]=[r],this.drilledItems.splice(i,this.drilledItems.length)):t.drillLevel!==this.drilledItems.length-1&&t.drillLevel!==e.groupIndex||(n[e.groupName]=[e]),n},e.prototype.mouseEndOnTreeMap=function(t){var e,i,r,n,o,s,a,l=this,h=t.target,p=h.id,d=!1,f={},g=this.element.id+"_TreeMap_"+this.layoutType+"_Layout",m=this.element.id+"_Label_Template_Group";if(p.indexOf("_Item_Index")>-1&&this.enableDrillDown&&!this.drillMouseMove){t.cancelable&&t.preventDefault(),n=parseFloat(p.split("_Item_Index_")[1]),o=this.layout.renderItems[n];var y=h.innerHTML;if(this.enableBreadcrumb&&(a=this.calculateSelectedTextLevels(y,o),s=a.drillLevel,this.drillDownView||-1===y.search("[+]")||(d=this.calculatePreviousLevelChildItems(y,a,o,d))),0!==this.levels.length&&!o.isLeafItem&&Mt(o).values&&Mt(o).values.length>0){if(this.drilledItems.length>0){o=d?this.drilledItems[this.drilledItems.length-1].data:o;for(var b=0;b<this.drilledItems.length;b++){if(!c(s)){var v=this.drilledItems.length;if(f=this.compareSelectedLabelWithDrillDownItems(a,o,b),v!==this.drilledItems.length){b-=1;break}}if(o.levelOrderName===this.drilledItems[b].name&&!d&&c(s)){0===o.groupIndex&&o.parent[o.groupName]instanceof Array?(o.isDrilled=!o.isDrilled,o.isDrilled?f[o.groupName]=[o]:f=o.parent):(o.isDrilled=!1,o.parent.isDrilled=!0,o=o.parent,f[o.groupName]=[o]),this.drilledItems.splice(b,1),b-=1;break}b===this.drilledItems.length-1&&c(s)&&(o.isDrilled=!0,f[o.groupName]=[o])}}else o.isDrilled=!0,f[o.groupName]=[o];i={cancel:!1,name:Qr,treemap:this,element:h,groupIndex:this.enableBreadcrumb&&0!==this.drilledItems.length&&!c(s)?this.drilledItems[this.drilledItems.length-1].data.groupIndex:o.groupIndex,groupName:this.enableBreadcrumb&&0!==this.drilledItems.length&&!c(s)?this.drilledItems[this.drilledItems.length-1].data.name:o.name,rightClick:3===t.which,childItems:null,item:f},this.trigger(Qr,i,function(t){if(l.currentLevel=o.isDrilled&&c(s)?o.groupIndex:!c(s)&&l.enableBreadcrumb&&o.isDrilled?s:null,!t.cancel){if(document.getElementById(g)){var i=document.getElementById(g);i.parentNode.removeChild(i)}if(e=u({},l.areaRect,e,!0),l.legendSettings.visible&&!c(l.treeMapLegendModule)&&(c(f)||(l.treeMapLegendModule.legendGroup.textContent="",l.treeMapLegendModule.legendGroup=null,l.treeMapLegendModule.widthIncrement=0,l.treeMapLegendModule.heightIncrement=0,l.enableBreadcrumb&&!c(s)?l.drilledLegendItems={name:l.drilledItems[l.drilledItems.length-1].data.levelOrderName,data:l.drilledItems[l.drilledItems.length-1].data}:l.drilledLegendItems={name:o.levelOrderName,data:o},l.treeMapLegendModule.renderLegend()),e=c(l.totalRect)?e:l.totalRect),document.getElementById(m)){var r=document.getElementById(m);r.parentNode.removeChild(r)}c(t.childItems)||t.cancel?(l.layout.calculateLayoutItems(f,e),l.layout.renderLayoutItems(f)):l.layout.onDemandProcess(t.childItems)}}),r={cancel:!1,name:"drillEnd",treemap:this,renderItems:this.layout.renderItems},this.trigger("drillEnd",r),!d&&c(s)&&this.drilledItems.push({name:o.levelOrderName,data:o})}}this.mouseDown=!1,this.notify(wi.touchEndEvent,t)},e.prototype.mouseLeaveOnTreeMap=function(t){this.treeMapTooltipModule&&this.treeMapTooltipModule.removeTooltip(),this.treeMapLegendModule&&this.treeMapLegendModule.removeInteractivePointer(),te(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",this),this.treeMapHighlightModule&&(ce(this.treeMapHighlightModule.shapeHighlightCollection),this.treeMapHighlightModule.highLightId="")},e.prototype.selectItem=function(t,e){c(e)&&(e=!0);for(var i="",r=0;r<t.length;r++)r!==t.length-1?i+=t[r]+"#":i+=t[r];this.treeMapSelectionModule&&this.selectionSettings.enable&&this.treeMapSelectionModule.selectTreemapItem(i,e)},e.prototype.requiredModules=function(){var t=[];return this.tooltipSettings.visible&&t.push({member:"treeMapTooltip",args:[this]}),this.highlightSettings.enable&&t.push({member:"treeMapHighlight",args:[this]}),this.selectionSettings.enable&&t.push({member:"treeMapSelection",args:[this]}),this.legendSettings.visible&&t.push({member:"treeMapLegend",args:[this]}),this.allowPrint&&t.push({member:"Print",args:[this,$n]}),this.allowImageExport&&t.push({member:"ImageExport",args:[this,Jn]}),this.allowPdfExport&&t.push({member:"PdfExport",args:[this,ru]}),t},e.prototype.onPropertyChanged=function(t,e){for(var i=!1,r=0,n=Object.keys(t);r<n.length;r++){switch(n[r]){case"background":this.renderBorder();break;case"height":case"width":case"layoutType":case"levels":case"drillDownView":case"renderDirection":case"leafItemSettings":case"legendSettings":case"dataSource":i=!0}}i&&(this.createSvg(),this.renderElements())},e.prototype.getModuleName=function(){return"treemap"},e.prototype.destroy=function(){this.unWireEVents(),this.drilledItems=[],this.levelSelection=[],this.legendId=[],this.removeSvg(),t.prototype.destroy.call(this)},e.prototype.removeSvg=function(){if(be(this.element.id+"_Secondary_Element"),this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&L(this.svgObject)}},e.prototype.getPersistData=function(){return""},ou([G(!1)],e.prototype,"allowPrint",void 0),ou([G(!1)],e.prototype,"allowImageExport",void 0),ou([G(!1)],e.prototype,"allowPdfExport",void 0),ou([G(null)],e.prototype,"width",void 0),ou([G(null)],e.prototype,"height",void 0),ou([_({},un)],e.prototype,"border",void 0),ou([_({},cn)],e.prototype,"margin",void 0),ou([G(null)],e.prototype,"background",void 0),ou([G("Material")],e.prototype,"theme",void 0),ou([_({},gn)],e.prototype,"titleSettings",void 0),ou([G("Squarified")],e.prototype,"layoutType",void 0),ou([G(null)],e.prototype,"dataSource",void 0),ou([G(null)],e.prototype,"query",void 0),ou([G(null)],e.prototype,"weightValuePath",void 0),ou([G("")],e.prototype,"rangeColorValuePath",void 0),ou([G("")],e.prototype,"equalColorValuePath",void 0),ou([G(null)],e.prototype,"colorValuePath",void 0),ou([G([])],e.prototype,"palette",void 0),ou([G("TopLeftBottomRight")],e.prototype,"renderDirection",void 0),ou([G(!1)],e.prototype,"enableDrillDown",void 0),ou([G(!1)],e.prototype,"enableBreadcrumb",void 0),ou([G(" - ")],e.prototype,"breadcrumbConnector",void 0),ou([G(!1)],e.prototype,"drillDownView",void 0),ou([_({},bn)],e.prototype,"initialDrillDown",void 0),ou([_({},vn)],e.prototype,"leafItemSettings",void 0),ou([H([],Cn)],e.prototype,"levels",void 0),ou([_({},Pn)],e.prototype,"highlightSettings",void 0),ou([_({},Sn)],e.prototype,"selectionSettings",void 0),ou([_({},wn)],e.prototype,"tooltipSettings",void 0),ou([_({},yn)],e.prototype,"legendSettings",void 0),ou([G(!1)],e.prototype,"useGroupingSeparator",void 0),ou([G(null)],e.prototype,"description",void 0),ou([G(1)],e.prototype,"tabIndex",void 0),ou([G(null)],e.prototype,"format",void 0),ou([W()],e.prototype,"load",void 0),ou([W()],e.prototype,"beforePrint",void 0),ou([W()],e.prototype,"loaded",void 0),ou([W()],e.prototype,"itemRendering",void 0),ou([W()],e.prototype,"drillStart",void 0),ou([W()],e.prototype,"drillEnd",void 0),ou([W()],e.prototype,"itemSelected",void 0),ou([W()],e.prototype,"itemHighlight",void 0),ou([W()],e.prototype,"tooltipRendering",void 0),ou([W()],e.prototype,"itemClick",void 0),ou([W()],e.prototype,"itemMove",void 0),ou([W()],e.prototype,"click",void 0),ou([W()],e.prototype,"doubleClick",void 0),ou([W()],e.prototype,"rightClick",void 0),ou([W()],e.prototype,"mouseMove",void 0),ou([W()],e.prototype,"resize",void 0),ou([W()],e.prototype,"legendItemRendering",void 0),ou([W()],e.prototype,"legendRendering",void 0),e=ou([U],e)}(zi),au=function(){return function(){}}(),lu=function(){function t(t){this.page=0,this.legendBorderRect=new On(0,0,0,0),this.currentPage=0,this.heightIncrement=0,this.widthIncrement=0,this.textMaxWidth=0,this.legendInteractiveGradient=[],this.legendItemRect=new On(0,0,0,0),this.treemap=t,this.addEventListener()}return t.prototype.renderLegend=function(){var t=this;this.legendRenderingCollections=[],this.legendCollections=[],this.legendNames=[],this.totalPages=[],this.gradientCount=1,this.widthIncrement=0,this.heightIncrement=0,this.defsElement=this.treemap.renderer.createDefs(),this.treemap.svgObject.appendChild(this.defsElement);var e;e={cancel:!1,name:sn,treemap:this.treemap,_changePosition:this.treemap.legendSettings.position,position:this.treemap.legendSettings.position},this.treemap.trigger(sn,e,function(e){e.cancel||e._changePosition===t.treemap.legendSettings.position||(t.treemap.legendSettings.position=e._changePosition),t.calculateLegendBounds(),t.legendCollections.length>0&&t.drawLegend()})},t.prototype.calculateLegendBounds=function(){var t=this,e=this.treemap,i=e.legendSettings;if(this.findColorMappingLegendItems(au.levelsData[0]),(this.treemap.palette.length>0||!c(this.treemap.colorValuePath))&&0===this.legendCollections.length&&this.findPaletteLegendItems(au.levelsData[0],"Parent"),this.legendCollections.length>0){var r=i.position,n=i.title.text,o=i.titleStyle,s=i.mode,a=0,l=0,h=0,u=0,p=i.shapeHeight,d=i.shapeWidth,f=[],g=[],m="None"===i.orientation?"Top"===r||"Bottom"===r||"Auto"===r&&e.availableSize.width<=e.availableSize.height?"Horizontal":"Vertical":i.orientation,y=i.width.length>1?i.width.indexOf("%")>-1?e.availableSize.width/100*parseFloat(i.width):parseFloat(i.width):null,b=i.height.length>1?i.height.indexOf("%")>-1?e.availableSize.height/100*parseFloat(i.height):parseFloat(i.height):null;o.fontFamily=e.themeStyle.fontFamily||o.fontFamily,o.size=e.themeStyle.legendFontSize||o.size;var v=wt(n,o),w=0,S=0,P=i.shapePadding;i.textStyle,this.legendCollections.length;if(i.textStyle.size=e.themeStyle.legendFontSize||i.textStyle.size,i.textStyle.fontFamily=e.themeStyle.fontFamily||i.textStyle.fontFamily,"Default"===s){y=c(y)?e.areaRect.width:y,b=c(b)?e.areaRect.height:b;for(var C=0,x=0;x<this.legendCollections.length;x++){var O=this.legendCollections[x];c(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]});var B=wt(O.legendName,i.textStyle);if(this.textMaxWidth=Math.max(this.textMaxWidth,B.width),0===x)w=a=10+d/2,S=l=10+v.height+(p>B.height?p/2:B.height/4);else{var L=B.height>p?B.height:p;if("Horizontal"===m){var T=g[C-1].x+g[C-1].width+10+d;if(T+P+B.width>y){var M=(g[C-1].y>f[C-1].y+p/2?g[C-1].y:f[C-1].y+p/2)+10;M+L>b?(this.getPageChanged(),C=0,f=[],g=[],a=w,l=S):(a=f[0].x,l=M+L/2)}else a=T-d/2,l=f[C-1].y}else{var D=g[C-1].y>f[C-1].y+p/2?g[C-1].y:f[C-1].y+p/2;if(D+10+L>b){var k=g[C-1].x+this.textMaxWidth+10;k+P+B.width>y?(a=w,l=S,g=[],f=[],this.getPageChanged(),C=0):(a=k+d/2,l=f[0].y)}else a=f[C-1].x,l=D+10+p/2}}h=a+d/2+P,u=l+B.height/4,f.push({x:a,y:l}),g.push({x:h,y:u,width:B.width,height:B.height/2}),this.totalPages[this.page].Collection.push({DisplayText:O.legendName,element:O.gradientElement,Shape:{x:a,y:l},Text:{x:h,y:u},Fill:O.legendFill,Data:O.legendData,Rect:{x:f[C].x-d/2,y:f[C].y-p/2<u-B.height?f[C].y-p/2:u-B.height,width:Math.abs(f[C].x-d/2-(h+B.width)),height:p>B.height?p:B.height}}),C++}var E=this.totalPages[0].Collection;E.forEach(function(e,i){var r=new On(e.Rect.x,e.Rect.y,e.Rect.width,e.Rect.height);0===i&&(w=r.x,S=r.y),t.widthIncrement=Math.max(t.widthIncrement,Math.abs(w-(r.x+r.width))),t.heightIncrement=Math.max(t.heightIncrement,Math.abs(S-(r.y+r.height)))}),y=this.widthIncrement<y?this.widthIncrement:y,b=this.heightIncrement<b?this.heightIncrement:b,this.legendItemRect={x:E[0].Rect.x,y:E[0].Rect.y,width:y,height:b}}else{var j=i.textStyle,I=this.legendCollections.length,R="Horizontal"===m?c(y)?e.areaRect.width/I:y/I:c(y)?25:y,A="Horizontal"===m?c(b)?25:b:c(b)?e.areaRect.height/I:b/I;w=0,S=v.height+10;var N=i.labelPosition,F=0,V=0,z=i.labelDisplayMode,G=0,_=0;for(x=0;x<this.legendCollections.length;x++){w="Horizontal"===m?w+R:w,S="Horizontal"===m?S:S+A;var H=this.legendCollections[x].legendName,W=new xn(0,0);"None"===z?W=wt(H,j):"Trim"===z?W=wt(H=St("Horizontal"===m?R:A,H,j),j):H="",G=Math.max(G,W.height),_=Math.max(_,W.width),W.width>0&&W.height>0&&("Horizontal"===m?(h=w+R/2,u="After"===N?S+A+W.height/2+10:S-10):(h="After"===N?w-W.width/2-10:w+R+W.width/2+10,u=S+A/2+W.height/4)),0===x&&(F="Horizontal"===m?w:"After"===N?h-W.width/2:w,V="Horizontal"===m?"After"===N?S:u-W.height/2:S),x===I-1&&(y="Horizontal"===m?Math.abs(w+R-F):R+_+10,b="Horizontal"===m?A+G/2+10:Math.abs(S+A-V)),this.legendRenderingCollections.push({fill:this.legendCollections[x].legendFill,x:w,y:S,width:R,height:A,element:this.legendCollections[x].gradientElement,text:H,textX:h,textY:u,textWidth:W.width,textHeight:W.height,data:this.legendCollections[x].legendData})}this.legendItemRect={x:F,y:V,width:y,height:b}}}},t.prototype.getPageChanged=function(){this.page++,c(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]})},t.prototype.findColorMappingLegendItems=function(t){var e=Mt(t).values;if(e&&e.length>0&&(this.calculateLegendItems(e),this.treemap.levels.length>0))for(var i=0;i<e.length;i++)this.findColorMappingLegendItems(e[i])},t.prototype.findPaletteLegendItems=function(t,e){var i,r;if(!c(this.treemap.drilledItems)&&0===this.treemap.drilledItems.length&&!c(this.treemap.initialDrillDown.groupName)&&c(this.treemap.drilledLegendItems))for(var n=Mt(t).values,o=0;o<n.length;o++)if(n[o].Name===this.treemap.initialDrillDown.groupName){n[o].isDrilled=!n[o].isDrilled,t=n[o],this.treemap.currentLevel=this.treemap.initialDrillDown.groupIndex,r=this.treemap.palette.length>0?this.treemap.palette[o%this.treemap.palette.length]:n[o].data[this.treemap.colorValuePath];break}if(this.treemap.enableDrillDown&&!c(this.treemap.drilledLegendItems)){var s=this.treemap.drilledLegendItems;if(r=s.data.options.fill,s.data.isDrilled)i=Mt(s.data).values;else{i=Mt(s.data.parent).values}}else i=Mt(t).values;var a;if(i&&i.length>0){for(var l=0;l<i.length;l++)(c(i[l].data[this.treemap.legendSettings.showLegendPath])||i[l].data[this.treemap.legendSettings.showLegendPath])&&(a=i[l].data[this.treemap.legendSettings.valuePath]?i[l].data[this.treemap.legendSettings.valuePath]:i[l].name,!!this.treemap.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollections,a)||this.legendCollections.push({legendName:a,legendFill:this.treemap.palette.length>0?c(this.treemap.currentLevel)?this.treemap.palette[l%this.treemap.palette.length]:r:i[l].data[this.treemap.colorValuePath],legendData:[],itemArea:i[l].weight}));if(this.legendCollections.sort(Xt),this.treemap.palette.length>0)for(var h=0;h<this.legendCollections.length;h++)this.legendCollections[h].legendFill=c(this.treemap.currentLevel)?this.treemap.palette[h%this.treemap.palette.length]:r}},t.prototype.calculateLegendItems=function(t){var e,i,r,n,o,s,a,l,h,u,p,d,f,g,m,y,b,v=!1,w=this.treemap.leafItemSettings,S=this.treemap.levels,P=this.treemap.legendSettings.position,C=!1,x=0;this.outOfRangeLegend=null;for(var O=0;O<t.length;O++){i="",f=!1,g=!1,C=!1,n=t[O].data,s=t[O].groupIndex;for(var B=0,L=0===this.treemap.levels.length||s===this.treemap.levels.length?w.colorMapping:S[s].colorMapping;B<L.length;B++){var T=L[B];if(l=null,r=Number(n[this.treemap.rangeColorValuePath]),a=n[this.treemap.equalColorValuePath],T.value=c(T.value)?T.value:T.value.toString(),!c(T.from)&&!c(T.to)&&r>=T.from&&r<=T.to&&T.showLegend?(v=!0,g=!0,p=T.from+" - "+T.to,o=c(T.label)?T.from+" - "+T.to:T.label,i=c(T.color)?i:T.color,e=this.isAddNewLegendData(p)):!c(T.value)&&a===T.value&&T.showLegend&&(v=!0,f=!0,p=T.value.toString(),o=c(T.label)?T.value.toString():T.label,i=c(T.color)?i:"[object Array]"===Object.prototype.toString.call(T.color)?T.color[0]:T.color,e=this.isAddNewLegendData(p)),v&&c(T.value)&&T.maxOpacity&&T.minOpacity&&"Interactive"===this.treemap.legendSettings.mode){var M=[];if(C=!0,"[object Array]"===Object.prototype.toString.call(T.color))for(var D=0;D<T.color.length;D++){var k={colorStop:(D*(100/(T.color.length-1))+"%").toString(),color:T.color[D]};M.push(k)}else{k={colorStop:"0%",color:i};var E={colorStop:"100%",color:i};M.push(k),M.push(E)}h="Top"===P||"Bottom"===P?"100%":"0%",u="Top"===P||"Bottom"===P?"0%":"100%";var j={id:"groupIndex_"+s+"_colorIndex_"+this.gradientCount,x1:"0%",y1:"0%",x2:h,y2:u};l=this.treemap.renderer.drawGradient("linearGradient",j,M).childNodes[0],"[object Array]"!==Object.prototype.toString.call(T.color)&&(l.childNodes[0].setAttribute("stop-opacity",T.minOpacity.toString()),l.childNodes[1].setAttribute("stop-opacity",T.maxOpacity.toString())),this.defsElement.appendChild(l),this.gradientCount++}d=!!this.treemap.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollections,o),e&&e.process&&v&&!d?(v=!1,i="[object Array]"===Object.prototype.toString.call(T.color)&&c(l)&&c(T.value)?this.legendGradientColor(T,x):i,this.legendCollections.push({actualValue:p,legendName:o,legendFill:i,legendData:[],gradientElement:c(l)?c(T.value)?this.legendLinearGradient:null:l,name:t[O].name,opacity:this.treemap.legendSettings.opacity,borderColor:this.treemap.legendSettings.border.color,borderWidth:this.treemap.legendSettings.border.width}),this.legendCollections[this.legendCollections.length-1].legendData.push(t[O]),x++):v&&!d&&(v=!1,this.legendCollections[e.value].legendData.push(t[O])),g||C||f||c(T.from)&&c(T.to)&&c(T.minOpacity)&&c(T.maxOpacity)&&c(T.value)&&!c(T.color)&&(m="[object Array]"===Object.prototype.toString.call(T.color)?T.color[0]:T.color,y=c(T.label)?"Others":T.label,c(this.outOfRangeLegend)&&(this.legendCollections.push({actualValue:y,legendData:[],legendName:y,legendFill:m}),b=this.legendCollections.length,this.outOfRangeLegend=this.legendCollections[b-1],x++),this.legendCollections[b-1].legendData.push(t[O]))}}},t.prototype.removeDuplicates=function(t,e){for(var i=!1,r=0;r<t.length;r++)if(t[r].legendName===e){i=!0;break}return i},t.prototype.isAddNewLegendData=function(t){var e,i;if(0===this.legendCollections.length)e=!0;else for(var r=0;r<this.legendCollections.length;r++){if(t===this.legendCollections[r].actualValue){e=!1,i=r;break}r===this.legendCollections.length-1&&(e=!0)}return{process:e,value:i}},t.prototype.drawLegend=function(){var t,e,i=this.treemap,r=i.legendSettings,n=i.renderer,o=r.textStyle;if(this.legendGroup=n.createGroup({id:i.element.id+"_Legend_Group"}),this.renderLegendBorder(),this.renderLegendTitle(),"Default"===r.mode)this.drawLegendItem(this.currentPage);else for(var s=0;s<this.legendRenderingCollections.length;s++){var a=i.element.id+"_Legend_Index_"+s,l=i.element.id+"_Legend_Index_"+s+"_Text",h=this.legendRenderingCollections[s];t=(e=h.element)?"url(#"+e.id+")":h.fill;var u=new On(h.x,h.y,h.width,h.height),c=new Mn(h.textX,h.textY),p=new Bn(a,t,r.shapeBorder,r.opacity,u);this.treemap.enableRtl&&("Left"===i.legendSettings.position||"Right"===i.legendSettings.position||"Auto"===i.legendSettings.position&&this.treemap.availableSize.width>=this.treemap.availableSize.height?(p.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-(this.translate.y+p.height)-Math.abs(this.legendBorderRect.y-p.y),c.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-this.translate.y+h.textHeight/2-Math.abs(this.legendBorderRect.y-c.y)):(p.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-(this.translate.x+p.width)-Math.abs(this.legendBorderRect.x-p.x),c.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-this.translate.x-Math.abs(this.legendBorderRect.x-c.x))),xt(new Tn(l,c.x,c.y,"middle",h.text,"",""),o,o.color||this.treemap.themeStyle.legendTextColor,this.legendGroup),this.legendGroup.appendChild(n.drawRectangle(p))}Zt(this.treemap,this.legendGroup)},t.prototype.defaultLegendRtlLocation=function(t,e,i,r){var n=t.Shape,o=t.Text,s=wt(t.DisplayText,r.textStyle);return n.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-(this.translate.x+e)-Math.abs(this.legendBorderRect.x-n.x),o.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-(this.translate.x+s.width+e)-Math.abs(this.legendBorderRect.x-o.x),("Left"===i.legendSettings.position||"Right"===i.legendSettings.position||"Auto"===i.legendSettings.position&&this.treemap.availableSize.width>=this.treemap.availableSize.height)&&(n.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-this.translate.y-Math.abs(Math.abs(this.legendBorderRect.y)-n.y)-r.shapeHeight/2,o.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-this.translate.y-Math.abs(Math.abs(this.legendBorderRect.y)-o.y)),{shapeLocation:n,textLocation:o}},t.prototype.drawLegendItem=function(t){var e,i,r=this,n=this.treemap,o=n.legendSettings,s=new xn(o.shapeWidth,o.shapeHeight),a=n.renderer,l=o.shapeBorder;if(t>=0&&t<this.totalPages.length){document.getElementById(this.legendGroup.id)&&document.getElementById(this.legendGroup.id).remove();for(var h="HorizontalLine"===o.shape||"VerticalLine"===o.shape||"Cross"===o.shape,u=h?c(o.fill)?"#000000":o.fill:l.color,p=h&&0===l.width?1:l.width,d=function(l){var c=f.totalPages[t].Collection[l],d=a.createGroup({id:n.element.id+"_Legend_Index_"+l}),g=c.DisplayText,m=n.element.id+"_Legend_Shape_Index_"+l,y=n.element.id+"_Legend_Text_Index_"+l,b=c.Shape,v=c.Text;n.enableRtl&&(e=f.defaultLegendRtlLocation(c,10,n,o),b=e.shapeLocation,v=e.textLocation),i={cancel:!1,name:on,treemap:n,fill:c.Fill,shape:o.shape,imageUrl:o.imageUrl},f.treemap.trigger(on,i,function(t){var e=new Ln(m,t.fill,p,h?c.Fill:u,o.opacity,"");d.appendChild(le(b,t.shape,s,t.imageUrl,e,g)),xt(new Tn(y,v.x,v.y,"start",g,"",""),o.textStyle,o.textStyle.color||r.treemap.themeStyle.legendTextColor,d),r.legendGroup.appendChild(d)})},f=this,g=0;g<this.totalPages[t].Collection.length;g++)d(g);var m=void 0;if(0!==this.page){var y=t+1+"/"+this.totalPages.length,b=o.textStyle,v=wt(y,b),w=this.legendItemRect.x+this.legendItemRect.width-v.width-20-10,S=this.legendItemRect.x+this.legendItemRect.width,P=this.legendItemRect.y+this.legendItemRect.height+2.5+10,C=S-10-v.width/2-5;m=a.createGroup({id:n.element.id+"_Legend_Paging_Group"});var x=a.createGroup({id:n.element.id+"_Legend_Left_Paging_Group"}),O=a.createGroup({id:n.element.id+"_Legend_Right_Paging_Group"}),B=" M "+S+" "+P+" L "+(S-10)+" "+(P-5)+" L "+(S-10)+" "+(P+5)+" z ",L=" M "+w+" "+P+" L "+(w+10)+" "+(P-5)+" L "+(w+10)+" "+(P+5)+" z ",T=new Ln(n.element.id+"_Left_Page","#a6a6a6",0,"#a6a6a6",1,"",L);x.appendChild(a.drawPath(T));var M=new Bn(n.element.id+"_Left_Page_Rect","transparent",{},1,new On(w-5,P-10,20,20),"");x.appendChild(a.drawRectangle(M)),this.wireEvents(x);var D=new Ln(n.element.id+"_Right_Page","#a6a6a6",0,"#a6a6a6",1,"",B);O.appendChild(a.drawPath(D));var k=new Bn(n.element.id+"_Right_Page_Rect","transparent",{},1,new On(S-10,P-5,10,10),"");O.appendChild(a.drawRectangle(k)),this.wireEvents(O),m.appendChild(x),m.appendChild(O);var E={id:n.element.id+"_Paging_Text",x:C,y:P+v.height/4,fill:"#a6a6a6","font-size":"14px","font-style":b.fontStyle,"font-family":b.fontFamily,"font-weight":b.fontWeight,"text-anchor":"middle",transform:"",opacity:1,"dominant-baseline":""};m.appendChild(a.createText(E,y)),this.legendGroup.appendChild(m)}}},t.prototype.renderLegendBorder=function(){var t=this.treemap,e=t.legendSettings,i=e.title.text,r=e.titleStyle,n=wt(St(this.legendItemRect.width+20,i,r),r);this.legendBorderRect=new On(this.legendItemRect.x-10,this.legendItemRect.y-10-n.height,this.legendItemRect.width+20,this.legendItemRect.height+20+n.height+("Interactive"===e.mode?0:0!==this.page?10:0));var o=new Bn(t.element.id+"_Legend_Border",e.background,e.border,1,this.legendBorderRect,""),s=t.renderer.drawRectangle(o);s.style.pointerEvents="none",this.legendGroup.appendChild(s),this.getLegendAlignment(t,this.legendBorderRect.width,this.legendBorderRect.height,e),this.legendGroup.setAttribute("transform","translate( "+(this.translate.x+-this.legendBorderRect.x)+" "+(this.translate.y+-this.legendBorderRect.y)+" )"),t.svgObject.appendChild(this.legendGroup)},t.prototype.renderLegendTitle=function(){var t=this.treemap,e=t.legendSettings,i=e.titleStyle,r=e.title.text,n=St(this.legendItemRect.width+20,r,i),o=wt(n,i);r&&xt(new Tn(t.element.id+"_LegendTitle",this.legendItemRect.x+this.legendItemRect.width/2,this.legendItemRect.y-o.height/2-5,"middle",n,""),i,i.color||this.treemap.themeStyle.legendTitleColor,this.legendGroup)},t.prototype.renderInteractivePointer=function(t){var e=this.treemap,i=t.target,r=e.element.id+"_Interactive_Legend";i=t.type.indexOf("touch")>-1?document.elementFromPoint(t.changedTouches[0].clientX,t.changedTouches[0].clientY):i;var n,o=e.legendSettings;if(i.id.indexOf("_Item_Index")>-1&&o.visible&&this.legendRenderingCollections.length>0){var s=void 0,a=void 0,l=void 0,h=void 0,u=void 0,p=void 0,d=void 0;n=e.layout.renderItems[parseFloat(i.id.split("_Item_Index_")[1])];for(var f=e.svgObject.getBoundingClientRect(),g=0;g<this.legendCollections.length;g++){s=this.legendCollections[g],a=(d=document.getElementById(e.element.id+"_Legend_Index_"+g)).getBoundingClientRect();var m=new On(Math.abs(a.left-f.left),Math.abs(a.top-f.top),a.width,a.height);if(h=d.getAttribute("fill"),u=o.shapeBorder.color,p=o.shapeBorder.width,!c(s.legendData)){l=s.legendData;for(var y=0;y<l.length;y++)if(l[y].levelOrderName===n.levelOrderName){this.drawInteractivePointer(o,h,u,r,p,m);break}}}}else this.removeInteractivePointer()},t.prototype.drawInteractivePointer=function(t,e,i,r,n,o){var s,a,l;s="Horizontal"===("None"===t.orientation?"Top"===t.position||"Bottom"===t.position?"Horizontal":"Vertical":t.orientation)?t.invertedPointer?" M "+(a=o.x+o.width/2)+" "+(l=o.y+o.height)+" L "+(a-10)+" "+(l+10)+" L "+(a+10)+" "+(l+10)+" Z ":" M "+(a=o.x+o.width/2)+" "+(l=o.y)+" L "+(a-10)+" "+(l-10)+" L "+(a+10)+" "+(l-10)+" Z ":t.invertedPointer?" M "+(a=o.x)+" "+(l=o.y+o.height/2)+" L "+(a-10)+" "+(l-10)+" L "+(a-10)+" "+(l+10)+" z ":" M "+(a=o.x+o.width)+" "+(l=o.y+o.height/2)+" L "+(a+10)+" "+(l-10)+" L "+(a+10)+" "+(l+10)+" z ";var h=new Ln(r,e,n,i,1,"",s);this.treemap.svgObject.appendChild(this.treemap.renderer.drawPath(h))},t.prototype.getLegendAlignment=function(t,e,i,r){var n,o,s,a=(s=u({},t.areaRect,s,!0)).x,l=s.y,h=s.height,c=s.width,p=t.availableSize.width,d=t.availableSize.height,f="Auto"===r.position?p>d?"Right":"Bottom":r.position;if("Float"===r.position)this.translate=r.location;else{switch(f){case"Top":case"Bottom":s.height=h-i,n=p/2-e/2,o="Top"===f?l:l+s.height+10,s.y="Top"===f?l+i+10:l;break;case"Left":case"Right":s.width=c-e,n="Left"===f?a:a+s.width,o=d/2-i/2,s.x="Left"===f?a+e:a}switch(r.alignment){case"Near":"Top"===f||"Bottom"===f?n=s.x:o=s.y;break;case"Far":"Top"===f||"Bottom"===f?n=p-e:o=d-i}this.treemap.totalRect=s,this.translate=new Mn(n,o)}},t.prototype.mouseUpHandler=function(t){this.renderInteractivePointer(t),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeInteractivePointer.bind(this),3e3)},t.prototype.removeInteractivePointer=function(){if(document.getElementById(this.treemap.element.id+"_Interactive_Legend")){var t=document.getElementById(this.treemap.element.id+"_Interactive_Legend");t.parentNode.removeChild(t)}},t.prototype.changeNextPage=function(t){this.currentPage=t.target.id.indexOf("_Left_Page_")>-1?this.currentPage-1:this.currentPage+1,this.drawLegend()},t.prototype.wireEvents=function(t){Si.add(t,wi.touchStartEvent,this.changeNextPage,this)},t.prototype.addEventListener=function(){this.treemap.isDestroyed||(this.treemap.on(wi.touchMoveEvent,this.renderInteractivePointer,this),this.treemap.on(wi.touchEndEvent,this.mouseUpHandler,this))},t.prototype.removeEventListener=function(){this.treemap.isDestroyed||(this.treemap.off(wi.touchMoveEvent,this.renderInteractivePointer),this.treemap.off(wi.touchEndEvent,this.mouseUpHandler))},t.prototype.getModuleName=function(){return"treeMapLegend"},t.prototype.destroy=function(t){this.removeEventListener()},t.prototype.legendGradientColor=function(t,e){var i,r="http://www.w3.org/2000/svg";if(!c(t.color)&&"[object Array]"===Object.prototype.toString.call(t.color)){var n=this.treemap.renderer.createDefs(),o=document.createElementNS(r,"linearGradient"),s=this.treemap.legendSettings.position,a="Top"===s||"Bottom"===s?"100":"0",l="Top"===s||"Bottom"===s?"0":"100";o.setAttribute("id","linear_"+e),o.setAttribute("x1","0%"),o.setAttribute("y1","0%"),o.setAttribute("x2",a+"%"),o.setAttribute("y2",l+"%");for(var h=0;h<t.color.length;h++){var u=100/(t.color.length-1),p=document.createElementNS(r,"stop");p.setAttribute("offset",h*u+"%"),p.setAttribute("stop-color",t.color[h]),p.setAttribute("stop-opacity",1..toString()),o.appendChild(p)}n.appendChild(o),this.legendLinearGradient=o;var d="url(#linear_"+e+")";this.defsElement.appendChild(o),i=d}return i},t}(),hu=function(){function t(t){this.target="highlight",this.shapeTarget="highlight",this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.currentElement=[],this.treemap=t,this.addEventListener()}return t.prototype.mouseMove=function(t){var e,i,r,n,o,s,a,l=this.treemap,h=t.target.id,u=[],c=this.treemap.highlightSettings,p=[],d=this.treemap.treeMapSelectionModule;if(h.indexOf("_Item_Index")>-1&&(!d||this.treemap.selectionId!==h)){if(this.highLightId!==h){o=document.getElementById(l.element.id+"_TreeMap_"+l.layoutType+"_Layout");var f=document.getElementsByClassName("treeMapSelection");r=this.treemap.layout.renderItems[parseFloat(h.split("_Item_Index_")[1])];var g=void 0;if(this.treemap.legendSettings.visible){var m=this.treemap.treeMapLegendModule.legendCollections;g=ge(this.treemap.treeMapLegendModule.legendCollections.length,r,l),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+g):document.getElementById(this.treemap.element.id+"_Legend_Index_"+g),null===this.shapeElement||d&&this.shapeElement.getAttribute("id")===d.legendSelectId?this.currentElement.length>0&&this.currentElement[this.currentElement.length-1].currentElement!==this.shapeElement&&(fe(this.shapeHighlightCollection,this.currentElement,l),this.highLightId=""):d&&this.shapeElement===d.shapeElement?this.currentElement.length>0&&this.currentElement[this.currentElement.length-1].currentElement!==this.shapeElement&&(fe(this.shapeHighlightCollection,this.currentElement,l),this.highLightId=""):(this.currentElement.push({currentElement:this.shapeElement}),ce(this.shapeHighlightCollection),this.shapeHighlightCollection.push({legendEle:this.shapeElement,oldFill:m[g].legendFill,oldOpacity:m[g].opacity,oldBorderColor:m[g].borderColor,oldBorderWidth:m[g].borderWidth}),de(this.shapeElement,c.fill,c.opacity,c.border.color,c.border.width.toString()),this.target="highlight")}if(a=Dt(r,[],c.mode,l),!this.treemap.legendSettings.visible||(!d||(!this.shapeElement||this.shapeElement.getAttribute("id")!==d.legendSelectId)))if(this.treemap.legendSettings.visible&&(d&&this.shapeElement===d.shapeElement))e=!1;else{for(var y=0;y<o.childElementCount;y++){s=o.childNodes[y],n=!0,r=l.layout.renderItems[parseFloat(s.id.split("_Item_Index_")[1])];for(var b=0;b<f.length;b++)if(s.id===f[b].id){n=!1;break}a.indexOf(r.levelOrderName)>-1&&n&&(p.push(s),u.push(r))}te(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",l);for(var v=0;v<p.length;v++)ee((s=p[v]).childNodes[0],{border:c.border,fill:c.fill,opacity:c.opacity}),s.classList.add("treeMapHighLight"),this.highLightId=h;i={cancel:!1,name:tn,treemap:l,items:u,elements:p},l.trigger(tn,i)}}}else if(h.indexOf("_Legend_Shape")>-1||h.indexOf("_Legend_Index")>-1){if(this.treemap.legendSettings.visible&&(!d||d.legendSelectId!==h)&&(!d||d.shapeSelectId!==h)){var w,S=void 0,P=void 0,C=document.getElementById(h);"highlight"===this.shapeTarget&&pe(this.legendHighlightCollection),this.shapeTarget="highlight";g="Default"===this.treemap.legendSettings.mode?parseFloat(h.split("_Legend_Shape_Index_")[1]):parseFloat(h.split("_Legend_Index_")[1]);var x=this.treemap.treeMapLegendModule.legendCollections[g].legendData.length,O=(m=this.treemap.treeMapLegendModule.legendCollections,parseInt(h[h.length-1],10));for(y=0;y<x;y++)for(b=0;b<this.treemap.layout.renderItems.length;b++)if(this.treemap.treeMapLegendModule.legendCollections[g].legendData[y].levelOrderName===this.treemap.layout.renderItems[b].levelOrderName){S=b,P=this.treemap.layout.renderItems[b].groupIndex;var B=document.getElementById(this.treemap.element.id+"_Level_Index_"+P+"_Item_Index_"+S+"_RectPath");0===y&&(this.legendHighlightCollection=[],me(this.legendHighlightCollection,O,b,C,B,this.treemap.layout.renderItems,m),w=this.legendHighlightCollection.length,this.legendHighlightCollection[w-1].ShapeCollection={Elements:[]}),de(C,c.fill,c.opacity,c.border.color,c.border.width.toString()),de(B,c.fill,c.opacity,c.border.color,c.border.width.toString()),w=this.legendHighlightCollection.length,this.legendHighlightCollection[w-1].ShapeCollection.Elements.push(B)}}}else d&&this.shapeElement&&this.shapeElement.getAttribute("id")===d.legendSelectId||(d?this.shapeElement!==d.shapeElement:this.treemap.legendSettings.visible)&&te(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",l),"highlight"!==this.shapeTarget&&"highlight"!==this.target||!this.treemap.legendSettings.visible||d&&this.shapeElement&&this.shapeElement.getAttribute("id")===d.legendSelectId||(d?this.shapeElement!==d.shapeElement:!d||d.legendSelect)&&(ce(this.shapeHighlightCollection),this.shapeHighlightCollection=[]),"highlight"===this.shapeTarget&&this.treemap.legendSettings.visible&&pe(this.legendHighlightCollection),this.highLightId="",e=!1;return e},t.prototype.addEventListener=function(){this.treemap.isDestroyed||this.treemap.on(wi.touchMoveEvent,this.mouseMove,this)},t.prototype.removeEventListener=function(){this.treemap.isDestroyed||this.treemap.off(wi.touchMoveEvent,this.mouseMove)},t.prototype.getModuleName=function(){return"treeMapHighlight"},t.prototype.destroy=function(t){this.removeEventListener()},t}(),uu=function(){function t(t){this.shapeSelectionCollection=[],this.legendSelectionCollection=[],this.shapeSelect=!0,this.legendSelect=!0,this.treemap=t,this.addEventListener()}return t.prototype.mouseDown=function(t){var e,i=t.target,r=this.treemap;r.levelSelection=[];var n,o,s,a,l=[],h=i.id,u=i.innerHTML,c=[],p=r.selectionSettings,d=this.treemap.treeMapHighlightModule,f=r.element.id+"_TreeMap_"+r.layoutType+"_Layout";if(h.indexOf("_Item_Index")>-1)if(t.preventDefault(),this.treemap.selectionId!==h&&this.legendSelect){o=document.getElementById(f),n=r.layout.renderItems[parseFloat(h.split("_Item_Index_")[1])];var g=void 0;if(this.treemap.legendSettings.visible){this.shapeSelect=!1;var m=this.treemap.treeMapLegendModule.legendCollections.length,y=this.treemap.treeMapLegendModule.legendCollections;this.shapeElement=void 0,ce(this.shapeSelectionCollection),d&&(d.shapeTarget="selection",d.shapeHighlightCollection=[]),g=ge(m,n,r),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+g):document.getElementById(this.treemap.element.id+"_Legend_Index_"+g),null!==this.shapeElement&&(this.shapeSelectId=this.shapeElement.getAttribute("id"),this.shapeSelectionCollection.push({legendEle:this.shapeElement,oldFill:y[g].legendFill,oldOpacity:y[g].opacity,oldBorderColor:y[g].borderColor,oldBorderWidth:y[g].borderWidth}),de(this.shapeElement,p.fill,p.opacity,p.border.color,p.border.width.toString()))}a=Dt(n,[],p.mode,r);for(var b=0;b<o.childElementCount;b++)s=o.childNodes[b],n=r.layout.renderItems[parseFloat(s.id.split("_Item_Index_")[1])],a.indexOf(n.levelOrderName)>-1&&(c.push(s),r.levelSelection.push(s.id),l.push(n));te(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",r),this.treemap.selectionId=h;for(var v=document.getElementsByClassName("treeMapHighLight"),w=0;w<c.length;w++){if(s=c[w],v.length>0)for(var S=0;S<v.length;S++)v[S].id===s.id&&v[S].classList.remove("treeMapHighLight"),ee(s.childNodes[0],{border:p.border,fill:p.fill,opacity:p.opacity}),s.classList.add("treeMapSelection");else ee(s.childNodes[0],{border:p.border,fill:p.fill,opacity:p.opacity}),s.classList.add("treeMapSelection");e={cancel:!1,name:Zr,treemap:r,items:l,elements:c,text:u,contentItemTemplate:u},r.trigger(Zr,e,function(t){t.contentItemTemplate!==u&&Ot(h,i,t.contentItemTemplate)})}}else ce(this.shapeSelectionCollection),this.shapeSelectionCollection=[],this.shapeElement=void 0,this.shapeSelect=!0,this.shapeSelectId="",this.treemap.legendId=[],te(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",r),this.treemap.selectionId="";else if(h.indexOf("_Legend_Shape")>-1||h.indexOf("_Legend_Index")>-1){y=this.treemap.treeMapLegendModule.legendCollections;if(this.treemap.legendSettings.visible&&this.legendSelectId!==h&&this.shapeSelect){var P,C=void 0,x=void 0;this.legendSelectId=h,this.legendSelect=!1;var O=parseInt(h[h.length-1],10),B=document.getElementById(h);pe(this.legendSelectionCollection),d&&(d.shapeTarget="selection");g="Default"===this.treemap.legendSettings.mode?parseFloat(h.split("_Legend_Shape_Index_")[1]):parseFloat(h.split("_Legend_Index_")[1]);var L=this.treemap.treeMapLegendModule.legendCollections[g].legendData.length;for(w=0;w<L;w++)for(var T=0;T<this.treemap.layout.renderItems.length;T++)if(this.treemap.treeMapLegendModule.legendCollections[g].legendData[w].levelOrderName===this.treemap.layout.renderItems[T].levelOrderName){C=T,x=this.treemap.layout.renderItems[T].groupIndex;var M=document.getElementById(this.treemap.element.id+"_Level_Index_"+x+"_Item_Index_"+C+"_RectPath");0===w&&(me(this.legendSelectionCollection,O,T,B,M,this.treemap.layout.renderItems,y),P=this.legendSelectionCollection.length,this.legendSelectionCollection[P-1].ShapeCollection={Elements:[]}),de(B,p.fill,p.opacity,p.border.color,p.border.width.toString()),de(M,p.fill,p.opacity,p.border.color,p.border.width.toString()),P=this.legendSelectionCollection.length,this.legendSelectionCollection[P-1].ShapeCollection.Elements.push(M)}}else pe(this.legendSelectionCollection),d&&(d.shapeTarget="highlight"),this.legendSelect=!0,this.legendSelectId=""}},t.prototype.selectTreemapItem=function(t,e){if(e){for(var i=void 0,r=0;r<this.treemap.layout.renderItems.length;r++)if(t===this.treemap.layout.renderItems[r].levelOrderName){i=this.treemap.layout.renderItems[r];break}var n=this.treemap.selectionSettings,o=[],s=void 0,a=void 0,l=[];this.treemap.levelSelection=[];for(var h=this.treemap.element.id+"_TreeMap_"+this.treemap.layoutType+"_Layout",u=document.getElementById(h),c=Dt(i,[],n.mode,this.treemap),p=0;p<u.childElementCount;p++)s=u.childNodes[p],i=this.treemap.layout.renderItems[parseFloat(s.id.split("_Item_Index_")[1])],c.indexOf(i.levelOrderName)>-1&&(o.push(s),this.treemap.levelSelection.push(s.id),l.push(i));if(this.treemap.legendSettings.visible)for(var d=0;d<l.length;d++){this.shapeSelect=!1;var f=this.treemap.treeMapLegendModule.legendCollections.length,g=this.treemap.treeMapLegendModule.legendCollections;this.shapeElement=void 0,ce(this.shapeSelectionCollection),a=ge(f,l[d],this.treemap),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+a):document.getElementById(this.treemap.element.id+"_Legend_Index_"+a),null!==this.shapeElement&&(this.shapeSelectId=this.shapeElement.getAttribute("id"),this.treemap.legendId.push(this.shapeSelectId),this.shapeSelectionCollection.push({legendEle:this.shapeElement,oldFill:g[a].legendFill,oldOpacity:g[a].opacity,oldBorderColor:g[a].borderColor,oldBorderWidth:g[a].borderWidth}),de(this.shapeElement,n.fill,n.opacity,n.border.color,n.border.width.toString()))}te(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",this.treemap);var m=document.getElementById(this.treemap.levelSelection[0]);this.treemap.selectionId=m.childNodes[0].id;for(var y=document.getElementsByClassName("treeMapHighLight"),b=0;b<o.length;b++)if(s=o[b],y.length>0)for(var v=0;v<y.length;v++)y[v].id===s.id&&y[v].classList.remove("treeMapHighLight"),ee(s.childNodes[0],{border:n.border,fill:n.fill,opacity:n.opacity}),s.classList.add("treeMapSelection");else n.fill="null"===n.fill?this.treemap.layout.renderItems[parseInt(s.id.split("Item_Index_")[1],10)].options.fill:n.fill,ee(s.childNodes[0],{border:n.border,fill:n.fill,opacity:n.opacity}),s.classList.add("treeMapSelection")}else ce(this.shapeSelectionCollection),this.shapeElement=void 0,this.treemap.levelSelection=[],this.shapeSelect=!0,this.shapeSelectId="",this.treemap.legendId=[],te(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",this.treemap),this.treemap.selectionId=""},t.prototype.addEventListener=function(){this.treemap.isDestroyed||this.treemap.on(wi.touchStartEvent,this.mouseDown,this)},t.prototype.removeEventListener=function(){this.treemap.isDestroyed||this.treemap.off(wi.touchStartEvent,this.mouseDown)},t.prototype.getModuleName=function(){return"treeMapSelection"},t.prototype.destroy=function(t){this.removeEventListener()},t}(),cu=function(t,e){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(i[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&(i[r[n]]=t[r[n]])}return i},pu=function(){function t(t){this.treemap=t,this.tooltipSettings=this.treemap.tooltipSettings,this.tooltipId=this.treemap.element.id+"_TreeMapTooltip",this.addEventListener()}return t.prototype.renderTooltip=function(t){var e,i,r,n,o,s=this;-1!==t.type.indexOf("touch")?(this.isTouch=!0,e=(n=t).changedTouches[0].pageX,i=n.changedTouches[0].pageY,r=n.target):(this.isTouch="touch"===t.pointerType,e=t.pageX,i=t.pageY,r=t.target);var a,l,h,u,p=r.id,d={},f={},g=[];p.indexOf("_Item_Index")>-1?c(d=this.treemap.layout.renderItems[parseFloat(p.split("_Item_Index_")[1])])||(d.name,a=d.weight,f=d.data,u=d.options.fill,g=this.treemap.enableRtl?[ie(this.tooltipSettings.format,f,this.treemap)||re(a,this.treemap)+" : "+this.treemap.weightValuePath.toString()]:[ie(this.tooltipSettings.format,f,this.treemap)||this.treemap.weightValuePath.toString()+" : "+re(a,this.treemap)],document.getElementById(this.tooltipId)?l=document.getElementById(this.tooltipId):(l=w("div",{id:this.treemap.element.id+"_TreeMapTooltip",className:"EJ2-TreeMap-Tooltip",styles:"position: absolute;pointer-events:none;"}),document.getElementById(this.treemap.element.id+"_Secondary_Element").appendChild(l)),(h=Vt(e,i,this.treemap.svgObject)).y=this.tooltipSettings.template?h.y+10:h.y,this.tooltipSettings.textStyle.fontFamily=this.treemap.themeStyle.fontFamily,this.tooltipSettings.textStyle.color=this.treemap.themeStyle.tooltipFontColor||this.tooltipSettings.textStyle.color,this.tooltipSettings.textStyle.opacity=this.treemap.themeStyle.tooltipTextOpacity||this.tooltipSettings.textStyle.opacity,o={cancel:!1,name:en,item:d,options:{location:h,text:g,data:f,textStyle:this.tooltipSettings.textStyle,template:this.tooltipSettings.template},treemap:this.treemap,element:r,eventArgs:t},this.treemap.trigger(en,o,function(t){s.addTooltip(o,u,l)})):(this.removeTooltip(),this.treemap.clearTemplate())},t.prototype.addTooltip=function(t,e,i,r){var n,o;if(c(t))n=r.cancel,o=r;else{n=t.cancel,o=cu(t,["cancel"]).options}n?(this.removeTooltip(),this.treemap.clearTemplate()):(this.svgTooltip=new $r({enable:!0,header:"",data:o.data,template:o.template,content:o.text,shapes:[],location:o.location,palette:[e],areaBounds:this.treemap.areaRect,textStyle:o.textStyle,fill:this.treemap.tooltipSettings.fill?this.treemap.tooltipSettings.fill:this.treemap.themeStyle.tooltipFillColor}),(this.treemap.isVue||this.treemap.isVue3)&&(this.svgTooltip.controlInstance=this.treemap),this.svgTooltip.opacity=this.treemap.themeStyle.tooltipFillOpacity||this.svgTooltip.opacity,this.svgTooltip.appendTo(i),this.treemap.renderReactTemplates())},t.prototype.mouseUpHandler=function(t){this.renderTooltip(t),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)},t.prototype.removeTooltip=function(){if(document.getElementsByClassName("EJ2-TreeMap-Tooltip").length>0){var t=document.getElementsByClassName("EJ2-TreeMap-Tooltip")[0];t.parentNode.removeChild(t)}},t.prototype.addEventListener=function(){this.treemap.isDestroyed||(this.treemap.on(wi.touchMoveEvent,this.renderTooltip,this),this.treemap.on(wi.touchEndEvent,this.mouseUpHandler,this))},t.prototype.removeEventListener=function(){this.treemap.isDestroyed||(this.treemap.off(wi.touchMoveEvent,this.renderTooltip),this.treemap.off(wi.touchEndEvent,this.mouseUpHandler))},t.prototype.getModuleName=function(){return"treeMapTooltip"},t.prototype.destroy=function(t){this.removeEventListener()},t}(),du=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),fu=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(e),gu=fu.h,mu=!gu,yu=function(t){function e(){var e=t.call(this,arguments)||this;return e.hasInjectedModules=!1,e.hasChildDirective=!1,e.childDirObjects="",e.isDecorator=!1,e}return du(e,t),e.prototype.created=function(){var t=this;if(this.propKeys){for(var e=function(e){i.ej2Instances.addEventListener(e,function(i){t.$emit(e,i)})},i=this,r=0,n=this.propKeys;r<n.length;r++){e(n[r])}var s=o("$root.$options.provide",this),a=o("$parent.$options.provide",this);if(this.hasInjectedModules&&!mu){var l=[];s&&s.managed?(this.isDecorator=!0,l=this.getInjectedServices()||[]):s?l=s[this.ej2Instances.getModuleName()]||[]:a&&(l=this.getInjectedServices()||[]);for(var h=0,u=this.ej2Instances.getInjectedModules()||[];h<u.length;h++){var c=u[h];-1===l.indexOf(c)&&l.push(c)}this.ej2Instances.injectedModules=l}}},e.prototype.mounted=function(){var t=this.$el?this.$el.querySelectorAll("div.e-directive"):null;if(gu&&t)for(var e=0;e<t.length;e++)t[e].parentElement&&t[e].parentElement.removeChild(t[e]);this.ej2Instances.isVue=!0,this.ej2Instances.isVue3=this.isVue3,this.ej2Instances.vueInstance=this,this.isVue3&&(this.ej2Instances.ej2Instances=this.ej2Instances,this.ej2Instances.referModels=this.models),this.ej2Instances.appendTo(this.$el)},e.prototype.getInjectedServices=function(){var t,e=[];if(this.$root&&this.isDecorator?t=o("$root.$options.provide",this):this.$vnode?t=o("$vnode.context.$options.provide",this):this.$parent&&(t=o("$parent.$options.provide",this)),t){var i=t;if("function"==typeof t)if(t.managed){var r=t.managed,n=Object.keys(r),s=void 0;this.$root&&this.isDecorator?s=Object.keys(this.$root):this.$vnode?s=Object.keys(this.$vnode.context):this.$parent&&(s=Object.keys(this.$parent));for(var a=0;a<n.length;a++)for(var l=0;l<s.length;l++)-1!==s[l].indexOf(n[a])&&(this.$root&&this.isDecorator?r[n[l]]=this.$root[s[a]]:this.$vnode?r[n[a]]=this.$vnode.context[s[l]]:this.$parent&&(r[n[a]]=this.$parent[s[l]]),i=r)}else this.$vnode?i=this.$vnode.context.$options.provide():this.$parent&&(i=this.$parent.$options.provide());e=i[this.ej2Instances.getModuleName()]||[]}return this.isDecorator=!1,e},e.prototype.updated=function(){if(this.hasChildDirective){var t={};this.fetchChildPropValues(t);var e=JSON.stringify(t);this.childDirObjects!==e&&(this.childDirObjects=e,this.assignValueToWrapper(t,!1))}},e.prototype.beforeDestroy=function(){var t=this;t.ej2Instances.destroy(),t.$el.style.visibility="hidden",t=null},e.prototype.bindProperties=function(){for(var t={},e=0,i=this.propKeys;e<i.length;e++){var r=i[e];(!c(this[r])&&!this.isVue3||this[0]&&!c(this[0][0])&&!c(this[0][0][r]))&&(t[r]=this.isVue3?this[0][0][r]:this[r])}if(this.hasChildDirective&&this.fetchChildPropValues(t),this.hasInjectedModules){for(var n=this.getInjectedServices()||[],o=0,s=this.ej2Instances.getInjectedModules()||[];o<s.length;o++){var a=s[o];-1===n.indexOf(a)&&n.push(a)}this.ej2Instances.injectedModules=n}this.assignValueToWrapper(t)},e.prototype.assignValueToWrapper=function(t,e){this.ej2Instances.setProperties(u({},{},t,!0),!!c(e)||e)},e.prototype.fetchChildPropValues=function(t){var e={};if(this.isVue3){var i=void 0;if(this[0]&&this[0][1].slots.default?i=this[0][1].slots.default():this&&this.$&&this.$.slots&&(i=this.$.slots.default()),!i)return;for(var r=0;r<i.length;r++)if(i[r].type.methods){var n=i[r].type.methods.getTag().replace("e-",""),o=this.resolveArrayDirectives(i[r].children,n),s=n.split("-"),a=this.ej2Instances.getModuleName().toLowerCase(),l=s.length>1&&a.indexOf(s[0])>-1?s[1]:s[0];l=l.replace(a,""),"splitter"==a&&"panes"==l?l="paneSettings":"bulletchart"==a&&"range"==l?l="ranges":"schedule"==a&&"header"==l&&(l="headerRows"),e[l]=o[n]}}else e=this.getDirectiveValues(this.$slots.default,this.tagMapper||{},this.tagNameMapper||{});this.childDirObjects||(this.childDirObjects=JSON.stringify(e));for(var h=0,u=Object.keys(e);h<u.length;h++){var c=u[h];t[c]=e[c]}},e.prototype.resolveArrayDirectives=function(t,e){var i,r=[];r=t.default?t.default():t;var n={};n[e]=[];for(var o=function(t){var r={},o=t.type.methods?t.type.methods.getTag():e;if(t.children){var a=void 0;if((i=s.resolveComplexDirs(t.children,s.tagMapper["e-"+e],o)).length)r=i;else for(var l=0;l<Object.keys(i).length;l++)a=Object.keys(i)[l],r[a]=i[a]}t.props&&Object.keys(t.props).forEach(function(e){r[e]=t.props[e]}),/[s]\b/.test(o)&&i&&(!/[s]\b/.test(e)||i.length)?n[e]=r:n[e].push(r)},s=this,a=0,l=r;a<l.length;a++){o(l[a])}return n},e.prototype.resolveComplexDirs=function(t,e,i){for(var r,n=[],o={},s=function(t){var s=void 0;e[i]&&(s=(s=Object.keys(e[i]).find(function(r){return e[i][r]===t.type.methods.getTag().replace(/[s]\b/,"")}))?s.replace("e-",""):t.type.methods.getTag().replace("e-",""),"diagram"==a.ej2Instances.getModuleName().toLowerCase()&&-1!=s.indexOf("annotations")&&(s="annotations")),t.children&&(r=a.resolveComplexInnerDirs(t.children,e[i],t.type.methods.getTag()),o[s]||(o[s]=[]),r.length>1?o[s]=r:o[s].push(r)),n.length>1?(o=0!=Object.keys(o).length||o.length?o:[],t.props&&o.push(t.props)):o=t.props?Object.assign(o,t.props):o},a=this,l=0,h=n=t.default?t.default():t;l<h.length;l++){s(h[l])}return o},e.prototype.resolveComplexInnerDirs=function(t,e,i){for(var r,n=[],o=(n=t.default?t.default():t).length>1?[]:{},s=0,a=n;s<a.length;s++){var l=a[s],h=l.type.methods.getTag().replace("e-","");l.children&&(r=this.resolveMultilevelComplexInnerDirs(l.children,e[i],l.type.methods.getTag()),/[s]\b/.test(h)||n.length>1?/[s]\b/.test(h)?(o[h]=o[h]?o[h]:[],r.length?o[h]=r:o[h].push(r)):r&&o.push(r):o=r||o),n.length>1&&l.props&&o.length>=0?o.push(l.props):o=l.props?Object.assign(o,l.props):o}return o},e.prototype.resolveMultilevelComplexInnerDirs=function(t,e,i){for(var r,n=[],o=(n=t.default?t.default():t).length>1?[]:{},s=0,a=n;s<a.length;s++){var l=a[s],h=l.type.methods.getTag().replace("e-","");l.children&&(r=this.resolveComplexInnerDirs(l.children,e[i],l.type.methods.getTag())),/[s]\b/.test(h)?(o[h]=o[h]?o[h]:[],r.length?o[h]=r:o[h].push(r),l.props&&o[h].push(l.props)):(o=r,o=l.props?Object.assign(o,l.props):o)}return o},e.prototype.getDirectiveValues=function(t,e,i){var r=Object.keys(e),n={};if(t)for(var o=0,s=t;o<s.length;o++){var a=s[o];if(a.componentOptions&&a.componentOptions.children&&a.componentOptions.tag){var l=a.componentOptions.tag;if(-1!==r.indexOf(l)){var h=i[l]?i[l]:l;n[h.replace("e-","")]=[];for(var u=0,c=a.componentOptions.children;u<c.length;u++){var p=c[u],d=this.getVNodeValue(p,e[l],i);0!==Object.keys(d).length&&n[h.replace("e-","")].push(d)}}}}return n},e.prototype.getMultiLevelDirValue=function(t,e,i){for(var r={},n=0,o=t;n<o.length;n++){var s=o[n];if(s.componentOptions){var a=s.componentOptions.tag,l=i[a]?i[a]:a;if(r[l.replace("e-","")]=[],s.componentOptions&&s.componentOptions.children)for(var h=0,u=s.componentOptions.children;h<u.length;h++){var c=u[h],p=this.getVNodeValue(c,e[a],i);0!==Object.keys(p).length&&r[l.replace("e-","")].push(p)}}}return r},e.prototype.getVNodeValue=function(t,e,i){var r={};if(t.componentOptions){var n=t.componentOptions.tag;"string"==typeof e&&n===e&&t.data?r=t.data.attrs?this.getCamelCaseProps(t.data.attrs):this.getCamelCaseProps(t.data):"object"==typeof e&&(t.componentOptions.children&&-1!==Object.keys(e).indexOf(n)&&(r=this.getMultiLevelDirValue(t.componentOptions.children,e[n],i)),t.data&&t.data.attrs&&(r=u(r,this.getCamelCaseProps(t.data.attrs))))}return r},e.prototype.getCamelCaseProps=function(t){for(var e={},i=0,r=Object.keys(t);i<r.length;i++){var n=r[i];e[n.replace(/-[a-z]/g,function(t){return t[1].toUpperCase()})]=t[n]}return e},e.prototype.dataBind=function(){this.ej2Instances.dataBind()},e.prototype.setProperties=function(t,e){return this.ej2Instances.setProperties(t,e)},e}((!mu||parseInt(fu.version),Be)),bu=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured"],vu=ct();ut({compile:function(t,e){var i=this;return function(r,n,s,a,l){var h;if(n){var c=d("templateParentDiv"),p=d("templateDiv"),f=w("div",{id:c,innerHTML:'<div id="'+p+'"></div>'});if(document.body.appendChild(f),gu&&"string"==typeof t){var g=function(t,e,i){if(t||i&&i.vueInstance)return xe(i&&i.vueInstance?i.vueInstance.$slots:t.$slots,e)}(n.vueInstance,t,l);if(!g)return B(f),vu(t,e)(r);fu.createApp({render:function(){return g[t]({data:r})}}).mount("grid"===n.getModuleName()?"#"+c:"#"+p),h=f.childNodes,B(f)}else if(gu){var m=T=t.call(i,{}),y=o("template.propsData",T),b={data:{data:u(T.data||{},r)},parent:n.vueInstance};m.template||(m.template=m[Object.keys(m)[0]]);var v=void 0;if(m.template.extends)v=m.template.extends._context.components.template;else if(!(v=m.template._context.components[t.name])){var S=Object.keys(m.template._context.components)[0];v=m.template._context.components[S]}var P;if(y)P=Object.assign(v.data(),y);else if(P=Object.assign(v.data(),b.data),v.components)for(var C=function(t){var e=v.components[t];if(e&&e.data){var i=Object.assign(e.data(),b.data);e.data=function(){return i}}},x=0,O=Object.keys(v.components)||[];x<O.length;x++)C(O[x]);v.data=function(){return P},fu.createApp(v).mount("grid"===n.getModuleName()?"#"+c:"#"+p),h=f.childNodes,B(f)}else if("string"==typeof t){var L=function(t,e,i){if(t||i&&i.vueInstance)return Pe(i&&i.vueInstance?i.vueInstance:t,e)}(n.vueInstance,t,l);if(!L)return B(f),vu(t,e)(r);new Be({render:function(){return L[t]({data:r})}}).$mount("#"+p),h=f.childNodes,B(f)}else{var T,M=(T=t.call(i,{})).template;if(y=o("template.propsData",T),b={data:{data:u(T.data||{},r)},parent:n.vueInstance},y&&(M=T.template.extends,b.propsData=y),"function"!=typeof M&&(M=Be.extend(M)),new M(b).$mount("#"+p),h=f.childNodes,n.vueInstance){var D=n.vueInstance.templateCollection;D||(n.vueInstance.templateCollection={},D=n.vueInstance.templateCollection),s&&(D[s]||(D[s]=[]),D[s].push(h[0]))}B(f)}}return h||[]}}});var wu,Su,Pu=!gu,Cu=function(t){function e(){return t.call(this,arguments)||this}return pt(e,t),e.prototype.render=function(t){if(gu){var e=gu||t,i=null;return c(this.$slots.default)||(i=gu?this.$slots.default():this.$slots.default),e("div",{class:"e-directive"},i)}},e.prototype.updated=function(){gu&&this.custom&&this.custom()},e.prototype.getTag=function(){return"e-colorMappings"},e=dt([Se({},Pu)],e)}(wu=!Pu||parseInt(fu.version)<3?i.Vue:Be),xu={name:"e-colorMappings",install:function(t){t.component(xu.name,Cu)}},Ou=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return pt(e,t),e.prototype.render=function(){},e.prototype.getTag=function(){return"e-colorMapping"},e=dt([Se({},Pu)],e)}(wu),Bu={name:"e-colorMapping",install:function(t){t.component(Bu.name,Ou)}},Lu=!gu,Tu=function(t){function e(){return t.call(this,arguments)||this}return pt(e,t),e.prototype.render=function(t){if(gu){var e=gu||t,i=null;return c(this.$slots.default)||(i=gu?this.$slots.default():this.$slots.default),e("div",{class:"e-directive"},i)}},e.prototype.updated=function(){gu&&this.custom&&this.custom()},e.prototype.getTag=function(){return"e-levels"},e=dt([Se({},Lu)],e)}(Su=!Lu||parseInt(fu.version)<3?i.Vue:Be),Mu={name:"e-levels",install:function(t){t.component(Mu.name,Tu)}},Du=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return pt(e,t),e.prototype.render=function(){},e.prototype.getTag=function(){return"e-level"},e=dt([Se({},Lu)],e)}(Su),ku={name:"e-level",install:function(t){t.component(ku.name,Du)}},Eu=["isLazyUpdate","allowImageExport","allowPdfExport","allowPrint","background","border","breadcrumbConnector","colorValuePath","dataSource","description","drillDownView","enableBreadcrumb","enableDrillDown","enablePersistence","enableRtl","equalColorValuePath","format","height","highlightSettings","initialDrillDown","layoutType","leafItemSettings","legendSettings","levels","locale","margin","palette","query","rangeColorValuePath","renderDirection","selectionSettings","tabIndex","theme","titleSettings","tooltipSettings","useGroupingSeparator","weightValuePath","width","beforePrint","click","doubleClick","drillEnd","drillStart","itemClick","itemHighlight","itemMove","itemRendering","itemSelected","legendItemRendering","legendRendering","load","loaded","mouseMove","resize","rightClick","tooltipRendering"],ju=[],Iu=function(t){if(void 0===t&&(t={}),t.props)for(var e=function(e){(t.newprops||(t.newprops={}))[e]={},(t.watch||(t.watch={}))[e]=function(i){this.ej2Instances[e]=i,this.dataBind&&"DateRangePickerComponent"!==t.name&&this.dataBind()}},i=0,r=t.props;i<r.length;i++)e(r[i]);return[t.newprops,t.watch]}({props:Eu})[1],Ru=Object.keys(Iu);Ru.push("modelchanged");for(var Au=0,Nu=ju;Au<Nu.length;Au++){var Fu=Nu[Au];Ru.push("update:"+Fu)}var Vu=!gu,zu=function(t){function e(){var e=t.call(this,arguments)||this;return e.propKeys=Eu,e.models=ju,e.hasChildDirective=!0,e.hasInjectedModules=!0,e.tagMapper={"e-levels":{"e-level":{"e-colorMappings":"e-colorMapping"}}},e.tagNameMapper={"e-colorMappings":"e-colorMapping"},e.isVue3=!Vu,e.ej2Instances=new su({}),e.bindProperties(),e.ej2Instances._setProperties=e.ej2Instances.setProperties,e.ej2Instances.setProperties=e.setProperties,e.ej2Instances.clearTemplate=e.clearTemplate,e.updated=e.updated,e}return pt(e,t),e.prototype.clearTemplate=function(t){if(t||(t=Object.keys(this.templateCollection||{})),t.length&&this.templateCollection)for(var e=0,i=t;e<i.length;e++){var r=i[e],n=this.templateCollection[r];if(n&&n.length){for(var s=0,a=n;s<a.length;s++){var l=a[s];o("__vue__.$destroy",l)&&l.__vue__.$destroy(),l.innerHTML&&(l.innerHTML="")}delete this.templateCollection[r]}}},e.prototype.setProperties=function(t,e){var i=this;this.isVue3&&(this.models=this.models?this.models:this.ej2Instances.referModels),this.ej2Instances&&this.ej2Instances._setProperties&&this.ej2Instances._setProperties(t,e),t&&this.models&&this.models.length&&Object.keys(t).map(function(e){i.models.map(function(r){e!==r||/datasource/i.test(e)||(i.isVue3?i.ej2Instances.vueInstance.$emit("update:"+e,t[e]):(i.$emit("update:"+e,t[e]),i.$emit("modelchanged",t[e])))})})},e.prototype.render=function(t){var e=gu||t,i=null;return c(this.$slots.default)||(i=gu?this.$slots.default():this.$slots.default),e("div",i)},e.prototype.custom=function(){this.updated()},e.prototype.calculatePreviousLevelChildItems=function(t,e,i,r){return this.ej2Instances.calculatePreviousLevelChildItems(t,e,i,r)},e.prototype.calculateSelectedTextLevels=function(t,e){return this.ej2Instances.calculateSelectedTextLevels(t,e)},e.prototype.clickOnTreeMap=function(t){return this.ej2Instances.clickOnTreeMap(t)},e.prototype.compareSelectedLabelWithDrillDownItems=function(t,e,i){return this.ej2Instances.compareSelectedLabelWithDrillDownItems(t,e,i)},e.prototype.doubleClickOnTreeMap=function(t){return this.ej2Instances.doubleClickOnTreeMap(t)},e.prototype.export=function(t,e,i,r){return this.ej2Instances.export(t,e,i,r)},e.prototype.findTotalWeight=function(t,e){return this.ej2Instances.findTotalWeight(t,e)},e.prototype.mouseDownOnTreeMap=function(t){return this.ej2Instances.mouseDownOnTreeMap(t)},e.prototype.mouseEndOnTreeMap=function(t){return this.ej2Instances.mouseEndOnTreeMap(t)},e.prototype.mouseLeaveOnTreeMap=function(t){return this.ej2Instances.mouseLeaveOnTreeMap(t)},e.prototype.mouseMoveOnTreeMap=function(t){return this.ej2Instances.mouseMoveOnTreeMap(t)},e.prototype.print=function(t){return this.ej2Instances.print(t)},e.prototype.reOrderLevelData=function(t){return this.ej2Instances.reOrderLevelData(t)},e.prototype.resizeOnTreeMap=function(t){return this.ej2Instances.resizeOnTreeMap(t)},e.prototype.rightClickOnTreeMap=function(t){return this.ej2Instances.rightClickOnTreeMap(t)},e.prototype.selectItem=function(t,e){return this.ej2Instances.selectItem(t,e)},e=dt([Se({props:Eu},Vu)],e)}(yu),Gu={name:"ejs-treemap",install:function(t){t.component(Gu.name,zu),t.component(ku.name,Du),t.component(Mu.name,Tu),t.component(Bu.name,Ou),t.component(xu.name,Cu)}};su.Inject(pu,lu,hu,uu,$n,ru,Jn);var _u=Object.freeze({ColorMappingsDirective:Cu,ColorMappingDirective:Ou,ColorMappingsPlugin:xu,ColorMappingPlugin:Bu,LevelsDirective:Tu,LevelDirective:Du,LevelsPlugin:Mu,LevelPlugin:ku,TreeMapComponent:zu,TreeMapPlugin:Gu,TreeMap:su,LevelsData:au,Border:un,Margin:cn,Font:pn,CommonTitleSettings:dn,SubTitleSettings:fn,TitleSettings:gn,ColorMapping:mn,LegendSettings:yn,InitialDrillSettings:bn,LeafItemSettings:vn,TooltipSettings:wn,SelectionSettings:Sn,HighlightSettings:Pn,LevelSettings:Cn,load:"load",loaded:"loaded",beforePrint:Jr,itemRendering:Xr,drillStart:Qr,drillEnd:"drillEnd",itemSelected:Zr,itemHighlight:tn,tooltipRendering:en,itemClick:"itemClick",itemMove:"itemMove",click:"click",doubleClick:rn,rightClick:nn,mouseMove:"mouseMove",legendItemRendering:on,legendRendering:sn,resize:"resize",defaultFont:an,get Theme(){return Gi},getThemeStyle:ve,Size:xn,stringToNumber:vt,Rect:On,RectOption:Bn,PathOption:Ln,measureText:wt,TextOption:Tn,textTrim:St,Location:Mn,findPosition:Pt,createTextStyle:Ct,renderTextElement:xt,setItemTemplateContent:Ot,getElement:Bt,itemsToOrder:Lt,isContainsData:Tt,findChildren:Mt,findHightLightItems:Dt,getTemplateFunction:kt,convertElement:Et,findLabelLocation:jt,measureElement:It,getArea:Rt,getShortestEdge:At,convertToContainer:Nt,convertToRect:Ft,getMousePosition:Vt,colorMap:zt,deSaturationColor:Gt,colorCollections:_t,rgbToHex:Ht,getColorByValue:Wt,getGradientColor:Ut,getPercentageColor:qt,getPercentage:Kt,wordWrap:Yt,textWrap:$t,hide:Jt,orderByArea:Xt,maintainSelection:Qt,legendMaintain:Zt,removeClassNames:te,applyOptions:ee,textFormatter:ie,formatValue:re,ColorValue:Dn,convertToHexCode:ne,componentToHex:oe,convertHexToColor:se,colorNameToHex:ae,drawSymbol:le,renderLegendShape:he,isParentItem:ue,TreeMapAjax:kn,removeShape:ce,removeLegend:pe,setColor:de,removeSelectionWithHighlight:fe,getLegendIndex:ge,pushCollection:me,triggerDownload:ye,removeElement:be,TreeMapLegend:lu,LayoutPanel:En,TreeMapHighlight:hu,TreeMapSelection:uu,TreeMapTooltip:pu,ImageExport:Jn,PdfExport:ru,Print:$n});return t.base=jr,t.treemap=_u,t}({},Vue,Vue3);if(this.ejs=ej,window.Vue)for(var packages=Object.keys(ejs),i=0;i<packages.length;i++)for(var pack=packages[i],packKeys=Object.keys(ejs[pack]),j=0;j<packKeys.length;j++){var packKey=packKeys[j];/Plugin/.test(packKey)&&Vue.use(ejs[pack][packKey])}"object"==typeof module&&"object"==typeof module.exports&&(module.exports={ej:ej}),"function"==typeof define&&define.amd&&define("ej",[],function(){return{ej:ej}});
|
|
10
|
+
var ej=function(t,e,i){"use strict";function r(t,e){var i=e;return i.unshift(void 0),new(Function.prototype.bind.apply(t,i))}function n(t){var e,i=new Uint16Array(5);(window.msCrypto||window.crypto).getRandomValues(i);var r="ej2"+function(t){for(var e="",i=0;i<5;i++)e+=(i?",":"")+t[i];return e}(i),n=function(i){i.source===window&&"string"==typeof i.data&&i.data.length<=32&&i.data===r&&(t(),e())};return window.addEventListener("message",n,!1),window.postMessage(r,"*"),e=function(){window.removeEventListener("message",n),t=n=r=void 0}}function o(t,e){for(var i=e,r=t.replace(/\[/g,".").replace(/\]/g,"").split("."),n=0;n<r.length&&!p(i);n++)i=i[r[n]];return i}function s(t,e,i){var r,n,o=t.replace(/\[/g,".").replace(/\]/g,"").split("."),s=i||{},a=s,l=o.length;for(r=0;r<l;r++)n=o[r],r+1===l?a[n]=void 0===e?{}:e:c(a[n])&&(a[n]={}),a=a[n];return s}function a(t,e){delete t[e]}function l(t){return!c(t)&&t.constructor==={}.constructor}function h(t,e){if(!c(e))for(var i=t,r=e,n=0,o=Object.keys(e);n<o.length;n++){var s=o[n];c(i.deepMerge)||-1===i.deepMerge.indexOf(s)||!l(r[s])&&!Array.isArray(r[s])?i[s]=r[s]:u(i[s],i[s],r[s],!0)}}function u(t,e,i,r){var n=t&&"object"==typeof t?t:{},o=arguments.length;r&&(o-=1);for(var s=function(t){if(!a[t])return"continue";var e=a[t];Object.keys(e).forEach(function(t){var i,o=n[t],s=e[t],a=Array.isArray(s)&&Array.isArray(o)&&s.length!==o.length,h=!b()||!(o instanceof Event||a);r&&h&&(l(s)||Array.isArray(s))?l(s)?(i=o||{},Array.isArray(i)&&i.hasOwnProperty("isComplexArray")?u(i,{},s,r):n[t]=u(i,{},s,r)):(i=b()?o&&Object.keys(s).length:o||[],n[t]=u([],i,s,i&&i.length||s&&s.length)):n[t]=s})},a=arguments,h=1;h<o;h++)s(h);return n}function c(t){return void 0===t||null===t}function p(t){return void 0===t}function d(t){return t+"_"+Te++}function f(t,e){var i;return function(){var r=this,n=arguments;clearTimeout(i),i=setTimeout(function(){return i=null,t.apply(r,n)},e)}}function g(t,e){var i=t;return i===e||!(i===document||!i)&&g(i.parentNode,e)}function m(t){try{throw new Error(t)}catch(t){throw t.message+"\n"+t.stack}}function y(t,e){var i=document.createElement("div"),r=[].slice.call(document.getElementsByTagName("head")[0].querySelectorAll("base, link, style")),n=[].slice.call(document.getElementsByTagName("body")[0].querySelectorAll("link, style"));if(n.length)for(var o=0,s=n.length;o<s;o++)r.push(n[o]);var a="";c(e)&&(e=window.open("","print","height=452,width=1024,tabbar=no")),i.appendChild(t.cloneNode(!0));var l=0;for(s=r.length;l<s;l++)a+=r[l].outerHTML;e.document.write("<!DOCTYPE html> <html><head>"+a+"</head><body>"+i.innerHTML+"<script> (function() { window.ready = true; })(); <\/script></body></html>"),e.document.close(),e.focus();var h=setInterval(function(){e.ready&&(e.print(),e.close(),clearInterval(h))},500);return e}function b(){return Me}function v(){if("undefined"!=typeof window){var t=new Uint16Array(5);return(window.msCrypto||window.crypto).getRandomValues(t)}}function w(t,e){var i=Pi.test(t)?document.createElementNS("http://www.w3.org/2000/svg",t):document.createElement(t);return void 0===e?i:(i.innerHTML=e.innerHTML?e.innerHTML:"",void 0!==e.className&&(i.className=e.className),void 0!==e.id&&(i.id=e.id),void 0!==e.styles&&i.setAttribute("style",e.styles),void 0!==e.attrs&&T(i,e.attrs),i)}function S(t,e){for(var i=C(e),r=0,n=t;r<n.length;r++)for(var a=n[r],h=0,u=i;h<u.length;h++){var p=u[h];if(l(a)){var d=o("attributes.className",a);c(d)?s("attributes.className",p,a):new RegExp("\\b"+p+"\\b","i").test(d)||s("attributes.className",d+" "+p,a)}else a.classList.contains(p)||a.classList.add(p)}return t}function P(t,e){for(var i=C(e),r=0,n=t;r<n.length;r++){var a=n[r],h=l(a);if(h?o("attributes.className",a):""!==a.className)for(var u=0,c=i;u<c.length;u++){var p=c[u];if(h){var d=o("attributes.className",a).split(" "),f=d.indexOf(p);-1!==f&&d.splice(f,1),s("attributes.className",d.join(" "),a)}else a.classList.remove(p)}}return t}function C(t){var e=[];return"string"==typeof t?e.push(t):e=t,e}function x(t){var e=t;return""===e.style.visibility&&e.offsetWidth>0}function O(t){t.querySelectorAll("script").forEach(function(t){var e=document.createElement("script");e.text=t.innerHTML,document.head.appendChild(e),B(e)})}function B(t){var e=t.parentNode;if(e)return e.removeChild(t)}function L(t){var e=t.parentNode;Si.clearEvents(t),e.removeChild(t)}function T(t,e){for(var i=t,r=0,n=Object.keys(e);r<n.length;r++){var o=n[r];if(l(i)){var s=o;"tabindex"===o&&(s="tabIndex"),i.attributes[s]=e[o]}else i.setAttribute(o,e[o])}return i}function M(t,e,i){return void 0===e&&(e=document),t=k(t),e.querySelector(t)}function D(t,e,i){void 0===e&&(e=document),t=k(t);return e.querySelectorAll(t)}function k(t){var e=/(!|"|\$|%|&|'|\(|\)|\*|\/|:|;|<|=|\?|@|\]|\^|`|{|}|\||\+|~)/g;if(t.match(/#[0-9]/g)||t.match(e)){for(var i=t.split(","),r=0;r<i.length;r++){for(var n=i[r].split(" "),o=0;o<n.length;o++)if(n[o].indexOf("#")>-1&&!n[o].match(/\[.*\]/)){var s=n[o].split("#");if(s[1].match(/^\d/)||s[1].match(e)){var a=n[o].split(".");a[0]=a[0].replace(/#/,"[id='")+"']",n[o]=a.join(".")}}i[r]=n.join(" ")}return i.join(",")}return t}function E(t,e){var i=t;if("function"==typeof i.closest)return i.closest(e);for(;i&&1===i.nodeType;){if(I(i,e))return i;i=i.parentNode}return null}function j(t,e){void 0!==e&&Object.keys(e).forEach(function(i){t.style[i]=e[i]})}function I(t,e){var i=t.matches||t.msMatchesSelector||t.webkitMatchesSelector;return i?i.call(t,e):-1!==[].indexOf.call(document.querySelectorAll(e),t)}function R(t,e){var i,r,n="string"==typeof t?document.getElementById(t):t;for(r=0;r<n.ej2_instances.length;r++)if(i=n.ej2_instances[r],"string"==typeof e){if(e===i.getModuleName())return i}else if(i instanceof e)return i}function A(t,e,i,n){return t.properties.hasOwnProperty(e)&&t.properties[e]instanceof n||(t.properties[e]=r(n,[t,e,i])),t.properties[e]}function N(t,e,i,n,o,s){for(var a=[],l=i?i.length:0,h=0;h<l;h++){var u=n;if(s&&(u=n(i[h],t)),o){var c=r(u,[t,e,{},!0]);c.setProperties(i[h],!0),a.push(c)}else a.push(r(u,[t,e,i[h],!1]))}return a}function F(t,e){return function(){return this.properties.hasOwnProperty(e)||(this.properties[e]=t),this.properties[e]}}function V(t,e,i){return function(){var r=this;if(!this.properties.hasOwnProperty(e)){var n=N(this,e,t,i,!1);this.properties[e]=n}var o=void 0!==this.controlParent&&this.controlParent.ignoreCollectionWatch||this.ignoreCollectionWatch;return this.properties[e].hasOwnProperty("push")||o||["push","pop"].forEach(function(t){var i={value:function(t,e,i,r){return function(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];var o=this.propName?this.getParentKey()+"."+e+"-":e+"-";switch(t){case"push":for(var s=0;s<i.length;s++){Array.prototype[t].apply(r,[i[s]]);var a=z(o+(r.length-1),i[s],!this.controlParent,t);this.serverDataBind(a,i[s],!1,t)}break;case"pop":Array.prototype[t].apply(r);var l=z(o+r.length,null,!this.controlParent,t);this.serverDataBind(l,{ejsAction:"pop"},!1,t)}return r}}(t,e,0,r.properties[e]).bind(r),configurable:!0};Object.defineProperty(r.properties[e],t,i)}),this.properties[e].hasOwnProperty("isComplexArray")||Object.defineProperty(this.properties[e],"isComplexArray",{value:!0}),this.properties[e]}}function z(t,e,i,r){var n=t;if(i&&(n={},n[t]=e,e&&"object"==typeof e)){n[t].ejsAction=r}return n}function G(t){return function(e,i){var r={set:function(t,e){return function(i){if(this.properties[e]!==i){var r=this.properties.hasOwnProperty(e)?this.properties[e]:t;this.saveChanges(e,i,r),this.properties[e]=i}}}(t,i),get:F(t,i),enumerable:!0,configurable:!0};Object.defineProperty(e,i,r),q(e,i,"prop",t)}}function _(t,e){return function(i,r){var n={set:function(t,e,i){return function(r){A(this,e,t,i).setProperties(r)}}(t,r,e),get:function(t,e,i){return function(){return A(this,e,t,i)}}(t,r,e),enumerable:!0,configurable:!0};Object.defineProperty(i,r,n),q(i,r,"complexProp",t,e)}}function H(t,e){return function(i,r){var n={set:function(t,e,i){return function(r){this.isComplexArraySetter=!0;var n=N(this,e,t,i,!1),o=N(this,e,r,i,!0);this.isComplexArraySetter=!1,this.saveChanges(e,o,n),this.properties[e]=o}}(t,r,e),get:V(t,r,e),enumerable:!0,configurable:!0};Object.defineProperty(i,r,n),q(i,r,"colProp",t,e)}}function W(){return function(t,e){var i={set:function(t){var i=this.properties[e];if(i!==t){var r=Y(this,e);!1===p(i)&&r.context.removeEventListener(r.prefix,i),r.context.addEventListener(r.prefix,t),this.properties[e]=t}},get:F(void 0,e),enumerable:!0,configurable:!0};Object.defineProperty(t,e,i),q(t,e,"event")}}function U(t){}function q(t,e,i,r,n){p(t.propList)&&(t.propList={props:[],complexProps:[],colProps:[],events:[],propNames:[],complexPropNames:[],colPropNames:[],eventNames:[]}),t.propList[i+"s"].push({propertyName:e,defaultValue:r,type:n}),t.propList[i+"Names"].push(e)}function K(t){if(p(t.prototype.builderObject)){t.prototype.builderObject={properties:{},propCollections:[],add:function(){this.isPropertyArray=!0,this.propCollections.push(u({},this.properties,{}))}};for(var e=/complex/,i=0,r=Object.keys(t.prototype.propList);i<r.length;i++)for(var n=r[i],o=function(i){e.test(n)?t.prototype.builderObject[i.propertyName]=function(t){var e={};h(e,K(i.type)),t(e);var r;return r=e.isPropertyArray?e.propCollections:u({},e.properties,{}),this.properties[i.propertyName]=r,e.properties={},e.propCollections=[],e.isPropertyArray=!1,this}:t.prototype.builderObject[i.propertyName]=function(t){return this.properties[i.propertyName]=t,this}},s=0,a=t.prototype.propList[n];s<a.length;s++){o(a[s])}}return t.prototype.builderObject}function Y(t,e){if(!1===t.hasOwnProperty("parentObj"))return{context:t,prefix:e};var i=o("propName",t);return i&&(e=i+"-"+e),Y(o("parentObj",t),e)}function $(t){var e=t.target,i=this.rippleOptions.selector,r=i?E(e,i):e;if(!(!r||this.rippleOptions&&E(e,this.rippleOptions.ignore))){var n=r.getBoundingClientRect(),o=t.pageX-document.body.scrollLeft,s=t.pageY-(!document.body.scrollTop&&document.documentElement?document.documentElement.scrollTop:document.body.scrollTop),a=Math.max(Math.abs(o-n.left),Math.abs(o-n.right)),l=Math.max(Math.abs(s-n.top),Math.abs(s-n.bottom)),h=Math.sqrt(a*a+l*l),u=2*h+"px",c=o-n.left-h,p=s-n.top-h;this.rippleOptions&&this.rippleOptions.isCenterRipple&&(c=0,p=0,u="100%"),r.classList.add("e-ripple");var d=w("div",{className:"e-ripple-element",styles:"width: "+u+";height: "+u+";left: "+c+"px;top: "+p+"px;transition-duration: "+this.rippleOptions.duration.toString()+"ms;"});r.appendChild(d),window.getComputedStyle(d).getPropertyValue("opacity"),d.style.transform="scale(1)",r!==this.parent&&Si.add(r,"mouseleave",X,{parent:this.parent,rippleOptions:this.rippleOptions})}}function J(t){Q(t,this)}function X(t){Q(t,this)}function Q(t,e){var i=e.rippleOptions.duration,r=t.target,n=e.rippleOptions.selector,o=n?E(r,n):r;if(o&&(!o||-1!==o.className.indexOf("e-ripple"))){var s=D(".e-ripple-element",o),a=s[s.length-1];a&&(a.style.opacity="0.5"),e.parent!==o&&Si.remove(o,"mouseleave",X),setTimeout(function(){a&&a.parentNode&&a.parentNode.removeChild(a),o.getElementsByClassName("e-ripple-element").length||o.classList.remove("e-ripple"),e.done&&e.done(t)},i)}}function Z(t){for(var e="",i=0,r=t;i<r.length;i++){var n=r[i];e+=String.fromCharCode(n)}return e}function tt(t){Ii=new ji(t)}function et(t,e,i){var r='var str="'+function(t,e,i,r){var n=0,o=[],s=t.match(/class="([^"]+|)\s{2}/g),a="";s&&s.forEach(function(e){a=e.replace(/\s\s+/g," "),t=t.replace(e,a)});return t.replace(lr,"").replace(br,"'$1'").replace(wr,function(t,s,a,l){var h=s.match(gr);if(h){var u=h[1];if(cr.test(s))s='";} '+s.replace(h[1],u.replace(yr,function(t){return t=t.trim(),it(t,!hr.test(t)&&-1===o.indexOf(t),e,o,r)}))+'{ \n str = str + "';else if(ur.test(s))s='"; '+s.replace(h[1],u.replace(vr,function(t){return ot(t,e,o,r)}))+'{ \n str = str + "';else if(dr.test(s)){var c=h[1].split(" of ");s='"; '+s.replace(h[1],function(t){return o.push(c[0]),o.push(c[0]+"Index"),"var i"+(n+=1)+"=0; i"+n+" < "+it(c[1],!0,e,o,r)+".length; i"+n+"++"})+"{ \n "+c[0]+"= "+it(c[1],!0,e,o,r)+"[i"+n+"]; \n var "+c[0]+"Index=i"+n+'; \n str = str + "'}else{var p=s.split("("),d=i&&i.hasOwnProperty(p[0])?"this.":"global";d=/\./.test(p[0])?"":d;var f=h[1].split(",");0===h[1].length||/data/.test(f[0])||/window./.test(f[0])||(h[1]="global"===d?e+"."+h[1]:h[1]);if(Or.test(s)&&/\]\./gm.test(s)||/@|\$|#/gm.test(s)){/@|\$|#|\]\./gm.test(s)&&(s='"+ '+("global"===d?"":d)+s.replace(h[1],u.replace(xr,function(t){return ot(t,e,o,r)}))+'+ "')}else s='" + '+("global"===d?"":d)+s.replace(u,it(h[1].replace(/,( |)data.|,/gi,","+e+".").replace(/,( |)data.window/gi,",window"),"global"!==d,e,o,r))+'+"'}}else pr.test(s)?s='"; '+s.replace(pr,'} else { \n str = str + "'):s.match(fr)?s=s.replace(fr,'"; \n } \n str = str + "'):/@|#|\$/gm.test(s)?(s.match(Pr)&&(s=nt(s)),s='"+'+rt(s,-1===o.indexOf(s),e,o)+'"]+"'):s=s.match(Pr)?'"+'+rt(s=nt(s),-1===o.indexOf(s),e,o)+'"]+"':'"+'+it(s.replace(/,/gi,"+"+e+"."),-1===o.indexOf(s),e,o,r)+'+"';return s})}(t,"data",e,i)+"\";var valueRegEx = (/value=\\'([A-Za-z0-9 _]*)((.)([\\w)(!-;?-■\\s]+)['])/g);\n var hrefRegex = (/(?:href)([\\s='\"./]+)([\\w-./?=&\\\\#\"]+)((.)([\\w)(!-;/?-■\\s]+)['])/g);\n if(str.match(valueRegEx)){\n var check = str.match(valueRegEx);\n var str1 = str;\n for (var i=0; i < check.length; i++) {\n var check1 = str.match(valueRegEx)[i].split('value=')[1];\n var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;\n change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;\n str1 = str1.replace(check1, change);\n }\n str = str.replace(str, str1);\n }\n else if (str.match(/(?:href='')/) === null) {\n if(str.match(hrefRegex)) {\n var check = str.match(hrefRegex);\n var str1 = str;\n for (var i=0; i < check.length; i++) {\n var check1 = str.match(hrefRegex)[i].split('href=')[1];\n if (check1) {\n var change = check1.match(/^'/) !== null ? check1.replace(/^'/, '\"') : check1;\n change =change.match(/.$/)[0] === '\\'' ? change.replace(/.$/,'\"') : change;\n str1 = str1.replace(check1, change);\n }\n }\n str = str.replace(str, str1);\n }\n }\n return str;";return new Function("data",r).bind(e)}function it(t,e,i,r,n){return!e||mr.test(t)||-1!==r.indexOf(t.split(".")[0])||n?t:i+"."+t}function rt(t,e,i,r){return e&&!mr.test(t)&&-1===r.indexOf(t.split(".")[0])?i+'["'+t:t}function nt(t){return t=t.match(Cr)?t:t.replace(Pr,"\\\\")}function ot(t,e,i,r){t=t.trim();if(/\window\./gm.test(t))return t;var n=/'|"/gm;return/@|\$|#/gm.test(t)&&(t=rt(t,-1===i.indexOf(t),e,i)+'"]'),Sr.test(t)?function(t,e,i,r){return!e||mr.test(t)||-1!==r.indexOf(t.split(".")[0])||/^\..*/gm.test(t)?t:i+"."+t}(t,!n.test(t)&&-1===i.indexOf(t),e,i):it(t,!n.test(t)&&-1===i.indexOf(t),e,i,r)}function st(){return"-"+Math.random().toString(36).substr(2,5)}function at(t,e,i){var r=Mr.compile(t,e,i);return function(t,e,i,n,o,s,a,l){var h=r(t,e,i,a,l),u="BlazorTemplateId";if(b()&&!o){var p=n+st();if(Tr[n]||(Tr[n]=[]),c(s))t[u]=p,Tr[n].push(t);else for(var d=0,f=Object.keys(Tr[n][s]);d<f.length;d++){var g=f[d];g!==u&&t[g]&&(Tr[n][s][g]=t[g]),g===u&&(p=Tr[n][s][g])}return"rowTemplate"===i?[w("tr",{id:p,className:"e-blazor-template"})]:[w("div",{id:p,className:"e-blazor-template"})]}if("string"==typeof h){if(Lr.test(h)){return w("svg",{innerHTML:h}).childNodes}return w(Br.test(h)?"table":"div",{innerHTML:h}).childNodes}return h}}function lt(t,e,i,r,n){if(b()){window.sfBlazor.updateTemplate(e,Tr[t],t,i,n),!1!==r&&(Tr[t]=[])}}function ht(t,e,i){var r=document.getElementById(t);if(r)for(var n=r.getElementsByClassName("blazor-inner-template"),o=0;o<n.length;o++){var s=" ";s=c(i)?n[o].getAttribute("data-templateId"):n[i].getAttribute("data-templateId");var a=document.getElementById(s);if(a)for(var l=a.childNodes.length,h=0;h<l;h++)c(i)?n[o].appendChild(a.childNodes[0]):(n[i].appendChild(a.childNodes[0]),o=n.length)}}function ut(t){Mr.compile=t.compile}function ct(){return Mr.compile}function pt(t,e){function i(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function dt(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s}function ft(t,e){var i=t||"",r=document.getElementById("chartmeasuretext");if(null===r&&(r=w("text",{id:"chartmeasuretext"}),document.body.appendChild(r)),"string"==typeof t&&(t.indexOf("<")>-1||t.indexOf(">")>-1)){for(var n=t.split(" "),o=0;o<n.length;o++)-1===n[o].indexOf("<br/>")&&(n[o]=n[o].replace(/[<>]/g,"&"));t=n.join(" ")}return r.innerHTML=i.indexOf("<br>")>-1||i.indexOf("<br/>")>-1?i:t,r.style.position="fixed",r.style.fontSize=e.size,r.style.fontWeight=e.fontWeight,r.style.fontStyle=e.fontStyle,r.style.fontFamily=e.fontFamily,r.style.visibility="hidden",r.style.top="-100",r.style.left="0",r.style.whiteSpace="nowrap",r.style.lineHeight="normal",new Nr(r.clientWidth,r.clientHeight)}function gt(t,e,i,r,n){return void 0===r&&(r=0),void 0===n&&(n=0),t>=i.x-r&&t<=i.x+i.width+r&&e>=i.y-n&&e<=i.y+i.height+n}function mt(t){return document.getElementById(t)}function yt(t){var e=mt(t);e&&L(e)}function bt(t,e,i,r,n,o){var s=new Rr(""),a=function(t,e,i,r,n){var o,s="Path",a=e.width,l=e.height,u=t.x,c=t.y,p=t.x+-a/2,d=t.y+-l/2;switch(i){case"Circle":case"Bubble":s="Ellipse",h(r,{rx:a/2,ry:l/2,cx:u,cy:c});break;case"Cross":h(r,{d:o="M "+p+" "+c+" L "+(u+a/2)+" "+c+" M "+u+" "+(c+l/2)+" L "+u+" "+(c+-l/2)});break;case"HorizontalLine":h(r,{d:o="M "+p+" "+c+" L "+(u+a/2)+" "+c});break;case"VerticalLine":h(r,{d:o="M "+u+" "+(c+l/2)+" L "+u+" "+(c+-l/2)});break;case"Diamond":h(r,{d:o="M "+p+" "+c+" L "+u+" "+(c+-l/2)+" L "+(u+a/2)+" "+c+" L "+u+" "+(c+l/2)+" L "+p+" "+c+" z"});break;case"Rectangle":h(r,{d:o="M "+p+" "+(c+-l/2)+" L "+(u+a/2)+" "+(c+-l/2)+" L "+(u+a/2)+" "+(c+l/2)+" L "+p+" "+(c+l/2)+" L "+p+" "+(c+-l/2)+" z"});break;case"Triangle":h(r,{d:o="M "+p+" "+(c+l/2)+" L "+u+" "+(c+-l/2)+" L "+(u+a/2)+" "+(c+l/2)+" L "+p+" "+(c+l/2)+" z"});break;case"InvertedTriangle":h(r,{d:o="M "+(u+a/2)+" "+(c-l/2)+" L "+u+" "+(c+l/2)+" L "+(u-a/2)+" "+(c-l/2)+" L "+(u+a/2)+" "+(c-l/2)+" z"});break;case"Pentagon":for(var f=void 0,g=void 0,m=0;m<=5;m++)f=a/2*Math.cos(Math.PI/180*(72*m)),g=l/2*Math.sin(Math.PI/180*(72*m)),o=0===m?"M "+(u+f)+" "+(c+g)+" ":o.concat("L "+(u+f)+" "+(c+g)+" ");o=o.concat("Z"),h(r,{d:o});break;case"Image":s="Image",h(r,{href:n,height:l,width:a,x:p,y:d})}return{renderOption:r,functionName:s}}(t,i,e,n,r),l=s["draw"+a.functionName](a.renderOption);return l.setAttribute("aria-label",o),l}function vt(t,e){return null!==t&&void 0!==t?-1!==t.indexOf("%")?e/100*parseInt(t,10):parseInt(t,10):null}function wt(t,e){var i=document.getElementById("treeMapMeasureText");return null===i&&(i=w("text",{id:"treeMapMeasureText"}),document.body.appendChild(i)),i.innerHTML=t,i.style.position="absolute",i.style.fontSize=e.size,i.style.fontWeight=e.fontWeight,i.style.fontStyle=e.fontStyle,i.style.fontFamily=e.fontFamily,i.style.visibility="hidden",i.style.top="-100",i.style.left="0",i.style.whiteSpace="nowrap",i.style.lineHeight="normal",new On(i.clientWidth,i.clientHeight)}function St(t,e,i){var r=e,n=wt(e,i).width;if(n>t)for(var o=e.length-1;o>=0;--o)if(r=e.substring(0,o)+"...",(n=wt(r,i).width)<=t||r.length<4)return r.length<4&&(r=" "),r;return r}function Pt(t,e,i,r){var n;switch(e){case"Near":n=t.x;break;case"Center":n="title"===r?t.width/2-i.width/2:t.x+t.width/2-i.width/2;break;case"Far":n="title"===r?t.width-t.y-i.width:t.x+t.width-i.width}var o="title"===r?t.y+i.height/2:t.y+t.height/2+i.height/2;return new Dn(n,o)}function Ct(t,e,i){var r=t.createText(e,i);return r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.style["user-select"]="none",r.style["-moz-user-select"]="none",r.style["-webkit-touch-callout"]="none",r.style["-webkit-user-select"]="none",r.style["-khtml-user-select"]="none",r.style["-ms-user-select"]="none",r.style["-o-user-select"]="none",r}function xt(t,e,i,r,n){void 0===n&&(n=!1);var o,s,a,l={"font-size":e.size,"font-style":e.fontStyle,"font-family":e.fontFamily,"font-weight":e.fontWeight,"text-anchor":t.anchor,transform:t.transform,opacity:e.opacity,"dominant-baseline":t.baseLine,id:t.id,x:t.x,y:t.y,fill:i},h="string"==typeof t.text?t.text:n?t.text[t.text.length-1]:t.text[0],u=new Rr("");if(!c(h)&&!c(t.connectorText)&&h.search(t.connectorText[1])>=0)for(var p=h.split("#"),d=0;d<p.length;d++){var f=-1===p[d].search(t.connectorText)||c(t.connectorText)?p[d]:t.connectorText;if(l.id=t.id+"_"+d,a=Ct(u,l,f),d%2==0&&0!==d){f=f.replace(/\s+/g," ")}var g=wt(f,e);l.x=0!==d?l.x+g.width:l.x+g.width+5,r.appendChild(a)}else a=Ct(u,l,h),r.appendChild(a);if("string"!=typeof t.text&&t.text.length>1){for(var m=1,y=t.text.length;m<y;m++)s=wt(t.text[m],e).height,o=u.createTSpan({x:t.x,id:t.id,y:t.y+m*s},t.text[m]),a.appendChild(o);r.appendChild(a)}return a}function Ot(t,e,i){var r,n=t.split("_RectPath")[0];c(r=t.indexOf("_LabelTemplate")>-1?e:document.querySelector("#"+n+"_LabelTemplate"))||(r.innerHTML=i)}function Bt(t){return document.getElementById(t)}function Lt(t,e){return t.weight===e.weight?0:t.weight<e.weight?1:-1}function Tt(t,e,i,r){for(var n=!1,o="",s=r.leafItemSettings,a=0;a<t.length;a++){var l=i[r.levels[a]?r.levels[a].groupPath:s.labelPath?s.labelPath:r.weightValuePath]||"undefined";if(t[a]===l&&(o+=l+(a===t.length-1?"":"#"))===e){n=!0;break}}return n}function Mt(t){var e;if(t){var i=Object.keys(t);e={};for(var r=0;r<i.length;r++)if(t[i[r]]instanceof Array){e.values=t[i[r]],e.key=i[r];break}}return e}function Dt(t,e,i,r){if("Child"===i){e.push(t.levelOrderName);var n=Mt(t).values;if(n&&n.length>0){for(var o=0;o<n.length;o++)-1===e.indexOf(n[o].levelOrderName)&&e.push(n[o].levelOrderName);for(var s=0;s<n.length;s++)Dt(n[s],e,i,r)}}else if("Parent"===i)"string"==typeof t.levelOrderName&&-1===e.indexOf(t.levelOrderName)&&(e.push(t.levelOrderName),Dt(t.parent,e,i,r));else if("All"===i){var a=t.levelOrderName.split("#")[0],l=void 0;for(o=0;o<r.layout.renderItems.length;o++)(l=r.layout.renderItems[o]).levelOrderName.indexOf(a)>-1&&-1===e.indexOf(l.levelOrderName)&&e.push(l.levelOrderName)}else e.push(t.levelOrderName);return e}function kt(t){var e=null;try{document.querySelectorAll(t).length&&(e=at(document.querySelector(t).innerHTML.trim()))}catch(i){e=at(t)}return e}function Et(t,e,i){for(var r=w("div",{id:e,styles:"position: absolute;pointer-events: auto;"}),n=t.length;n>0;)r.appendChild(t[0]),n--;for(var o=r.innerHTML,s=Object.keys(i),a=0;a<s.length;a++)o=o.replace(new RegExp("{{:"+s[a]+"}}","g"),i[s[a].toString()]);return r.innerHTML=o,r}function jt(t,e,i,r,n){var o=new Dn(0,0),s=(n.element.getBoundingClientRect(),"Template"===r?n.areaRect.x:0),a="Template"===r?n.areaRect.y:0;return o.x=Math.abs(s-(e.indexOf("Left")>-1?t.x+5:e.indexOf("Right")>-1?t.x+t.width-i.width:t.x+(t.width/2-i.width/2)))-2,!n.enableDrillDown||"BottomLeftTopRight"!==n.renderDirection&&"BottomRightTopLeft"!==n.renderDirection?o.y=Math.abs(a-(e.indexOf("Top")>-1?"Template"===r?t.y:t.y+i.height:e.indexOf("Bottom")>-1?t.y+t.height-i.height:"Template"===r?t.y+(t.height/2-i.height/2):t.y+t.height/2+i.height/4)):o.y=Math.abs(t.y+t.height-i.height+5),o}function It(t,e){var i=new On(0,0);e.appendChild(t),i.height=t.offsetHeight,i.width=t.offsetWidth;var r=document.getElementById(t.id);return r.parentNode.removeChild(r),i}function Rt(t){return(t.width-t.x)*(t.height-t.y)}function At(t){var e=Nt(t),i=e.width,r=e.height;return Math.min(i,r)}function Nt(t){var e=t.x,i=t.y;return{x:e,y:i,width:t.width-e,height:t.height-i}}function Ft(t){var e=t.x,i=t.y;return{x:e,y:i,width:e+t.width,height:i+t.height}}function Vt(t,e,i){var r=i.getBoundingClientRect(),n=i.ownerDocument.defaultView.pageXOffset,o=i.ownerDocument.defaultView.pageYOffset,s=i.ownerDocument.documentElement.clientTop,a=i.ownerDocument.documentElement.clientLeft,l=r.left+n-a,h=r.top+o-s;return new Dn(t-l,e-h)}function zt(t,e,i,r){var n,o,s=[];if(c(e)&&c(i)&&isNaN(i))return null;for(var a=0;a<t.length;a++){var l=!1,h=i;c(t[a].from)||c(t[a].to)||c(t[a].value)?(c(t[a].from)||c(t[a].to))&&c(t[a].value)||(i>=t[a].from&&t[a].to>=i||t[a].value===e)&&(t[a].value===e&&(l=!0),n="[object Array]"===Object.prototype.toString.call(t[a].color)?l?t[a].color[0]:_t(t[a],h):t[a].color):i>=t[a].from&&t[a].to>=i&&t[a].value===e&&(l=!0,n="[object Array]"===Object.prototype.toString.call(t[a].color)?l?t[a].color[0]:_t(t[a],h):t[a].color),(i>=t[a].from&&i<=t[a].to||t[a].value===e)&&!c(t[a].minOpacity)&&!c(t[a].maxOpacity)&&n&&(o=Gt(r,t[a],n,i)),(""===n||c(n))&&c(t[a].from)&&c(t[a].to)&&c(t[a].minOpacity)&&c(t[a].maxOpacity)&&c(t[a].value)&&(n="[object Array]"===Object.prototype.toString.call(t[a].color)?t[a].color[0]:t[a].color),o=c(o)?"1":o,s.push(n)}for(var u=s.length-1;u>=0;u--)u=(n=s[u])?-1:u;return{fill:n,opacity:o}}function Gt(t,e,i,r){var n=1;if(r>=e.from&&r<=e.to){n=(r-e.from)/(e.to-e.from)*(e.maxOpacity-e.minOpacity)+e.minOpacity}return n.toString()}function _t(t,e){return Wt(t,e)}function Ht(t,e,i){return"#"+oe(t)+oe(e)+oe(i)}function Wt(t,e){var i;return Number(e)===t.from?t.color[0]:Number(e)===t.to?t.color[t.color.length-1]:Ht((i=Ut(Number(e),t)).r,i.g,i.b)}function Ut(t,e){var i=e.from,r=e.to,n=0,o=r-i;n=(t-i)/o;var s,a;if(e.color.length<=2)s="#"===e.color[0].charAt(0)?e.color[0]:ae(e.color[0]),a="#"===e.color[e.color.length-1].charAt(0)?e.color[e.color.length-1]:ae(e.color[e.color.length-1]);else{s="#"===e.color[0].charAt(0)?e.color[0]:ae(e.color[0]),a="#"===e.color[e.color.length-1].charAt(0)?e.color[e.color.length-1]:ae(e.color[e.color.length-1]);for(var l=o/(e.color.length-1),h=e.color.length-1,u=[],c={},p=1;p<h;p++)c={b:i+p*l,color:e.color[p]},u.push(c);for(var d=0;d<u.length;d++)i<=t&&t<=u[d].b&&0===d?(a="#"===u[d].color.charAt(0)?u[d].color:ae(u[d].color),n=t<u[d].b?1-Math.abs((t-u[d].b)/l):(t-u[d].b)/l):u[d].b<=t&&t<=r&&d===u.length-1&&(s="#"===u[d].color.charAt(0)?u[d].color:ae(u[d].color),n=t<u[d].b?1-Math.abs((t-u[d].b)/l):(t-u[d].b)/l),d!==u.length-1&&d<u.length&&u[d].b<=t&&t<=u[d+1].b&&(s="#"===u[d].color.charAt(0)?u[d].color:ae(u[d].color),a="#"===u[d+1].color.charAt(0)?u[d+1].color:ae(u[d+1].color),n=Math.abs(t-u[d+1].b)/l)}return qt(n,s,a)}function qt(t,e,i){var r=i.split("#")[1],n=e.split("#")[1],o=Kt(t,parseInt(n.substr(0,2),16),parseInt(r.substr(0,2),16)),s=Kt(t,parseInt(n.substr(2,2),16),parseInt(r.substr(2,2),16)),a=Kt(t,parseInt(n.substr(4,2),16),parseInt(r.substr(4,2),16));return new kn(o,s,a)}function Kt(t,e,i){var r=i-e;return Math.round(e+r*t)}function Yt(t,e,i){for(var r,n=e.split(" "),o="",s=[],a=0,l=n.length;a<l;a++)r=n[a],wt(o.concat(r),i).width<t?o=o.concat((""===o?"":" ")+r):""!==o?(s.push(St(t,o,i)),o=r):(s.push(St(t,r,i)),r=""),o&&a===l-1&&s.push(St(t,o,i));return s}function $t(t,e,i){var r=[],n=0,o=wt(e,i).width,s=e.length;if(t>=o)return r.push(e),r;for(var a=e.length;a>n;a--){var l=e.slice(n,a);if((o=wt(l,i).width)<=t){if(r.push(l),n+=l.length,s===n)return r;a=s+1}}return r}function Jt(t,e,i,r){var n=wt(i,r);return n.width>t||n.height>e?" ":i}function Xt(t,e){return t.itemArea===e.itemArea?0:t.itemArea<e.itemArea?1:-1}function Qt(t,e,i){var r=t.levelSelection;if(r)for(var n=0;n<r.length;n++)e.getAttribute("id")===r[n]?e.childElementCount>0&&(e.children[0].setAttribute("class",i),ee(e.childNodes[0],{border:t.selectionSettings.border,fill:t.selectionSettings.fill,opacity:t.selectionSettings.opacity})):e.setAttribute("class","")}function Zt(t,e){var i=t.legendId;if(i)for(var r=0;r<i.length;r++)for(var n=0;n<e.childElementCount;n++)e.childNodes[n].id===i[r]&&(e.childNodes[n].setAttribute("fill",t.selectionSettings.fill),e.childNodes[n].setAttribute("stroke",t.selectionSettings.border.color),e.childNodes[n].setAttribute("stroke-width",t.selectionSettings.border.width.toString()),e.childNodes[n].setAttribute("opacity",t.selectionSettings.opacity))}function te(t,e,i){for(var r,n=0;n<t.length;n++)ee(r=c(t[n].childNodes[0])?t[n]:t[n].childNodes[0],i.layout.renderItems[parseFloat(r.id.split("_Item_Index_")[1])].options),t[n].classList.remove(e),n-=1}function ee(t,e){t.setAttribute("opacity",e.opacity),c(e.fill)||t.setAttribute("fill",e.fill),t.setAttribute("stroke",e.border.color),t.setAttribute("stroke-width",e.border.width)}function ie(t,e,i){if(c(t))return null;for(var r=0,n=Object.keys(e);r<n.length;r++){var o=n[r];t=t.split("${"+o+"}").join(re(e[o],i).toString())}return t}function re(t,e){return(e.format&&!isNaN(Number(t))?e.intl.getNumberFormat({format:e.format,useGrouping:e.useGroupingSeparator})(Number(t)):t)||""}function ne(t){return"#"+oe(t.r)+oe(t.g)+oe(t.b)}function oe(t){var e=t.toString(16);return 1===e.length?"0"+e:e}function se(t){var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?new kn(parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)):new kn(255,255,255)}function ae(t){t="transparent"===t?"white":t;var e=document.getElementById("treeMapMeasureText");e.style.color=t,t=window.getComputedStyle(e).color;var i=/^(rgb|hsl)(a?)[(]\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*(?:,\s*([\d.]+)\s*)?[)]$/.exec(t);return ne(new kn(parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)))}function le(t,e,i,r,n,o){var s=new Rr(""),a=he(t,i,e,n,r),l=s["draw"+a.functionName](a.renderOption);return l.setAttribute("aria-label",o),l}function he(t,e,i,r,n){var o,s="Path",a=e.width,l=e.height,u=t.x,c=t.y,p=t.x+-a/2,d=t.y+-l/2;switch(i){case"Circle":case"Bubble":s="Ellipse",h(r,{rx:a/2,ry:l/2,cx:u,cy:c});break;case"VerticalLine":h(r,{d:o="M "+u+" "+(c+l/2)+" L "+u+" "+(c+-l/2)});break;case"Diamond":h(r,{d:o="M "+p+" "+c+" L "+u+" "+(c+-l/2)+" L "+(u+a/2)+" "+c+" L "+u+" "+(c+l/2)+" L "+p+" "+c+" z"});break;case"Rectangle":h(r,{d:o="M "+p+" "+(c+-l/2)+" L "+(u+a/2)+" "+(c+-l/2)+" L "+(u+a/2)+" "+(c+l/2)+" L "+p+" "+(c+l/2)+" L "+p+" "+(c+-l/2)+" z"});break;case"Triangle":h(r,{d:o="M "+p+" "+(c+l/2)+" L "+u+" "+(c+-l/2)+" L "+(u+a/2)+" "+(c+l/2)+" L "+p+" "+(c+l/2)+" z"});break;case"InvertedTriangle":h(r,{d:o="M "+(u+a/2)+" "+(c-l/2)+" L "+u+" "+(c+l/2)+" L "+(u-a/2)+" "+(c-l/2)+" L "+(u+a/2)+" "+(c-l/2)+" z"});break;case"Pentagon":for(var f=void 0,g=void 0,m=0;m<=5;m++)f=a/2*Math.cos(Math.PI/180*(72*m)),g=a/2*Math.sin(Math.PI/180*(72*m)),o=0===m?"M "+(u+f)+" "+(c+g)+" ":o.concat("L "+(u+f)+" "+(c+g)+" ");h(r,{d:o=o.concat("Z")});break;case"Star":h(r,{d:o="M "+(t.x+e.width/3)+" "+(t.y-e.height/2)+" L "+(t.x-e.width/2)+" "+(t.y+e.height/6)+" L "+(t.x+e.width/2)+" "+(t.y+e.height/6)+" L "+(t.x-e.width/3)+" "+(t.y-e.height/2)+" L "+t.x+" "+(t.y+e.height/2)+" L "+(t.x+e.width/3)+" "+(t.y-e.height/2)+" Z"});break;case"Cross":h(r,{d:o="M "+p+" "+c+" L "+(u+a/2)+" "+c+" M "+u+" "+(c+l/2)+" L "+u+" "+(c+-l/2)});break;case"Image":s="Image",h(r,{href:n,height:l,width:a,x:p,y:d})}return{renderOption:r,functionName:s}}function ue(t,e){for(var i=!1,r=0;r<t.length;r++)if(e.levelOrderName===t[r].levelOrderName){i=!0;break}return i}function ce(t,e){if(t.length>0)for(var i=0;i<t.length;i++){var r=t[i];de(r.legendEle,r.oldFill,r.oldOpacity,r.oldBorderColor,r.oldBorderWidth)}}function pe(t,e){if(t.length>0)for(var i=0;i<t.length;i++){var r=t[i];de(r.legendEle,r.oldFill,r.oldOpacity,r.oldBorderColor,r.oldBorderWidth);for(var n=r.ShapeCollection.Elements.length,o=0;o<n;o++)de(r.ShapeCollection.Elements[o],r.shapeOldFill,r.shapeOldOpacity,r.shapeOldBorderColor,r.shapeOldBorderWidth)}}function de(t,e,i,r,n){t.setAttribute("fill",e),t.setAttribute("opacity",i),t.setAttribute("stroke",r),t.setAttribute("stroke-width",n)}function fe(t,e,i){ce(t),te(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",i)}function ge(t,e,i){for(var r,n=0;n<t;n++)for(var o=i.treeMapLegendModule.legendCollections[n].legendData.length,s=0;s<o;s++)if(i.treeMapLegendModule.legendCollections[n].legendData[s].levelOrderName===e.levelOrderName){r=n;break}return r}function me(t,e,i,r,n,o,s){t.push({legendEle:r,oldFill:s[e].legendFill,oldOpacity:s[e].opacity,oldBorderColor:s[e].borderColor,oldBorderWidth:s[e].borderWidth,shapeElement:n,shapeOldFill:o[i].options.fill,shapeOldOpacity:o[i].options.opacity,shapeOldBorderColor:o[i].options.border.color,shapeOldBorderWidth:o[i].options.border.width})}function ye(t,e,i,r){w("a",{attrs:{download:t+"."+e.toLocaleLowerCase(),href:i}}).dispatchEvent(new MouseEvent(r?"click":"move",{view:window,bubbles:!1,cancelable:!0}))}function be(t){var e=document.getElementById(t);return e?L(e):null}function ve(t){var e,i;switch(t.toLowerCase()){case"materialdark":i="#303030";break;case"fabricdark":i="#201F1F";break;case"bootstrapdark":i="#1A1A1A"}switch(t.toLowerCase()){case"bootstrapdark":case"fabricdark":case"materialdark":e={backgroundColor:i,titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",legendTitleColor:"#DADADA",legendTextColor:"#DADADA",fontSize:"15px",subtitleFontSize:"14px",legendFontSize:"13px",fontFamily:"Roboto, Noto, Sans-serif"};break;case"highcontrast":e={backgroundColor:"#000000",titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontSize:"15px",subtitleFontSize:"14px",legendFontSize:"13px",fontFamily:"Roboto, Noto, Sans-serif"};break;case"bootstrap4":e={backgroundColor:"#FFFFFF",titleFontColor:"#212529",subTitleFontColor:"#212529",tooltipFillColor:"#000000",tooltipFontColor:"#FFFFFF",tooltipFillOpacity:1,tooltipTextOpacity:.9,legendTitleColor:"#212529",legendTextColor:"#212529",fontFamily:"HelveticaNeue-Medium",fontSize:"16px",subtitleFontSize:"14px",legendFontSize:"14px",labelFontFamily:"HelveticaNeue"};break;case"tailwind":e={backgroundColor:"transparent",titleFontColor:"#374151",subTitleFontColor:"#374151",tooltipFillColor:"#111827",tooltipFontColor:"#F9FAFB",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#374151",legendTextColor:"#374151",fontFamily:"Inter",fontSize:"14px",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Inter"};break;case"tailwinddark":e={backgroundColor:"transparent",titleFontColor:"#D1D5DB",subTitleFontColor:"#D1D5DB",tooltipFillColor:"#F9FAFB",tooltipFontColor:"#1F2937",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#D1D5DB",legendTextColor:"#D1D5DB",fontFamily:"Inter",fontSize:"14px",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Inter"};break;case"bootstrap5":e={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#212529",subTitleFontColor:"#212529",tooltipFillColor:"#212529",tooltipFontColor:"#F9FAFB",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#212529",legendTextColor:"#212529",fontFamily:"Helvetica Neue",fontSize:"14px",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Helvetica Neue"};break;case"bootstrap5dark":e={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#FFFFFF",subTitleFontColor:"#FFFFFF",tooltipFillColor:"#E9ECEF",tooltipFontColor:"#212529",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#FFFFFF",legendTextColor:"#FFFFFF",fontFamily:"Helvetica Neue",fontSize:"14px",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Helvetica Neue"};break;case"fluent":e={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#201F1E",subTitleFontColor:"#201F1E",tooltipFillColor:"#FFFFFF",tooltipFontColor:"#323130",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#201F1E",legendTextColor:"#201F1E",fontFamily:"Segoe UI",fontSize:"14px",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI"};break;case"fluentdark":e={backgroundColor:"rgba(255,255,255, 0.0)",titleFontColor:"#F3F2F1",subTitleFontColor:"#F3F2F1",tooltipFillColor:"#252423",tooltipFontColor:"#F3F2F1",tooltipFillOpacity:1,tooltipTextOpacity:1,legendTitleColor:"#F3F2F1",legendTextColor:"#F3F2F1",fontFamily:"Segoe UI",fontSize:"14px",subtitleFontSize:"12px",legendFontSize:"12px",labelFontFamily:"Segoe UI"};break;default:e={backgroundColor:"#FFFFFF",titleFontColor:"#424242",subTitleFontColor:"#424242",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",legendTitleColor:"#353535",legendTextColor:"#353535",fontSize:"15px",subtitleFontSize:"14px",legendFontSize:"13px",fontFamily:"Roboto, Noto, Sans-serif"}}return e}function we(t,e){if(null===t||void 0===t)throw new Error("ArgumentException: "+e+" cannot be null or undefined")}function Se(t,e){if(e)return function(e){return function(t,e){void 0===e&&(e={});e.name=e.name||t._componentTag||t.name;var i=t.prototype;if(e.props)for(var r=function(t){(e.props||(e.props={}))[t]={},(e.watch||(e.watch={}))[t]=function(i){this.ej2Instances[t]=i,this.dataBind&&"DateRangePickerComponent"!==e.name&&this.dataBind()}},n=0,o=e.props;n<o.length;n++){var s=o[n];r(s)}Object.getOwnPropertyNames(i).forEach(function(t){if("constructor"!==t)if(vu.indexOf(t)>-1)e[t]=i[t];else{var r=Object.getOwnPropertyDescriptor(i,t);"function"==typeof r.value?(e.methods||(e.methods={}))[t]=r.value:(r.get||r.set)&&((e.computed||(e.computed={}))[t]={get:r.get,set:r.set})}}),Object.getOwnPropertyNames(bu.prototype).forEach(function(t){vu.indexOf(t)>-1&&(e[t]=i[t])}),(e.mixins||(e.mixins=[])).push({data:function(){return function(t,e){e.prototype._init=function(){var e=this,i=Object.getOwnPropertyNames(t);if(t.$options.props)for(var r in t.$options.props)t.hasOwnProperty(r)||i.push(r);i.forEach(function(i){"_"!==i.charAt(0)&&Object.defineProperty(e,i,{get:function(){return t[i]},set:function(e){return t[i]=e}})})};var i=new e,r={};return Object.keys(i).forEach(function(t){void 0!==i[t]&&(r[t]=i[t])}),r}(this,t)}});var a=t.__decorators__;a&&(a.forEach(Function(e)),delete t.__decorators__);var l=Object.getPrototypeOf(t.prototype);return(l instanceof Be?l.constructor:Be).extend(e)}(e,t)}}function Pe(t,e){if(t){var i=t.$slots,r=t.$scopedSlots,n=t.scopedSlots,o=t.children;if(r&&r[e])return r;if(i&&i.default)for(var s=i.default,a=0;a<s.length;a++){if(l=Pe(Ce(s[a]),e))return l}else{if(n&&n[e])return n;if(o)for(a=0;a<o.length;a++){var l;if(l=Pe(Ce(o[a]),e))return l}}}}function Ce(t){var e=t.componentOptions&&t.componentOptions.children?t.componentOptions:t.data;return t.componentInstance?t.componentInstance:e}function xe(t,e){if(t&&t[e])return t;if(t&&t.default)for(var i=t.default(),r=0;r<i.length;r++){var n=xe(i[r].children,e);if(n)return n}}window.process={env:{NODE_ENV:"production"}};var Oe,Be=e.default,Le="ej2_instances",Te=0,Me=!1,De="undefined"!=typeof window?window:{},ke={latn:{_digits:"0123456789",_type:"numeric"}},Ee={decimal:".",group:",",percentSign:"%",plusSign:"+",minusSign:"-",infinity:"∞",nan:"NaN",exponential:"E"},je=[0,1,2,3,4,5,6,7,8,9],Ie=function(){function t(){}return t.getMainObject=function(t,e){return o(b()?e:"main."+e,t)},t.getNumberingSystem=function(t){return o("supplemental.numberingSystems",t)||this.numberingSystems},t.reverseObject=function(t,e){for(var i={},r=0,n=e||Object.keys(t);r<n.length;r++){var o=n[r];i.hasOwnProperty(t[o])||(i[t[o]]=o)}return i},t.getSymbolRegex=function(t){var e=t.map(function(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}).join("|");return new RegExp(e,"g")},t.getSymbolMatch=function(t){for(var e={},i=0,r=Object.keys(Ee);i<r.length;i++){var n=r[i];e[t[n]]=Ee[n]}return e},t.constructRegex=function(t){for(var e=t.length,i="",r=0;r<e;r++)i+=r!==e-1?t[r]+"|":t[r];return i},t.convertValueParts=function(t,e,i){return t.replace(e,function(t){return i[t]})},t.getDefaultNumberingSystem=function(t){var e={};return e.obj=o("numbers",t),e.nSystem=o("defaultNumberingSystem",e.obj),e},t.getCurrentNumericOptions=function(t,e,i,r){var n={},s=this.getDefaultNumberingSystem(t);if(!p(s.nSystem)||r){var a=r?o("obj.mapperDigits",s):o(s.nSystem+"._digits",e);p(a)||(n.numericPair=this.reverseObject(a,je),n.numberParseRegex=new RegExp(this.constructRegex(a),"g"),n.numericRegex="["+a[0]+"-"+a[9]+"]",i&&(n.numericRegex=a[0]+"-"+a[9],n.symbolNumberSystem=o(r?"numberSymbols":"symbols-numberSystem-"+s.nSystem,s.obj),n.symbolMatch=this.getSymbolMatch(n.symbolNumberSystem),n.numberSystem=s.nSystem))}return n},t.getNumberMapper=function(t,e,i){var r={mapper:{}},n=this.getDefaultNumberingSystem(t);if(!p(n.nSystem)){r.numberSystem=n.nSystem,r.numberSymbols=o("symbols-numberSystem-"+n.nSystem,n.obj),r.timeSeparator=o("timeSeparator",r.numberSymbols);var s=o(n.nSystem+"._digits",e);if(!p(s))for(var a=0,l=je;a<l.length;a++){var h=l[a];r.mapper[h]=s[h]}}return r},t.nPair="numericPair",t.nRegex="numericRegex",t.numberingSystems=ke,t}(),Re={DJF:"Fdj",ERN:"Nfk",ETB:"Br",NAD:"$",ZAR:"R",XAF:"FCFA",GHS:"GH₵",XDR:"XDR",AED:"د.إ.",BHD:"د.ب.",DZD:"د.ج.",EGP:"ج.م.",ILS:"₪",IQD:"د.ع.",JOD:"د.ا.",KMF:"CF",KWD:"د.ك.",LBP:"ل.ل.",LYD:"د.ل.",MAD:"د.م.",MRU:"أ.م.",OMR:"ر.ع.",QAR:"ر.ق.",SAR:"ر.س.",SDG:"ج.س.",SOS:"S",SSP:"£",SYP:"ل.س.",TND:"د.ت.",YER:"ر.ي.",CLP:"$",INR:"₹",TZS:"TSh",EUR:"€",AZN:"₼",RUB:"₽",BYN:"Br",ZMW:"K",BGN:"лв.",NGN:"₦",XOF:"CFA",BDT:"৳",CNY:"¥",BAM:"КМ",UGX:"USh",USD:"$",CZK:"Kč",GBP:"£",DKK:"kr.",KES:"Ksh",CHF:"CHF",MVR:"ރ.",BTN:"Nu.",XCD:"EC$",AUD:"$",BBD:"$",BIF:"FBu",BMD:"$",BSD:"$",BWP:"P",BZD:"$",CAD:"$",NZD:"$",FJD:"$",FKP:"£",GIP:"£",GMD:"D",GYD:"$",HKD:"$",IDR:"Rp",JMD:"$",KYD:"$",LRD:"$",MGA:"Ar",MOP:"MOP$",MUR:"Rs",MWK:"MK",MYR:"RM",PGK:"K",PHP:"₱",PKR:"Rs",RWF:"RF",SBD:"$",SCR:"SR",SEK:"kr",SGD:"$",SHP:"£",SLL:"Le",ANG:"NAf.",SZL:"E",TOP:"T$",TTD:"$",VUV:"VT",WST:"WS$",ARS:"$",BOB:"Bs",BRL:"R$",COP:"$",CRC:"₡",CUP:"$",DOP:"$",GTQ:"Q",HNL:"L",MXN:"$",NIO:"C$",PAB:"B/.",PEN:"S/",PYG:"₲",UYU:"$",VES:"Bs.S",IRR:"ريال",GNF:"FG",CDF:"FC",HTG:"G",XPF:"FCFP",HRK:"kn",HUF:"Ft",AMD:"֏",ISK:"kr",JPY:"¥",GEL:"₾",CVE:"",KZT:"₸",KHR:"៛",KPW:"₩",KRW:"₩",KGS:"сом",AOA:"Kz",LAK:"₭",MZN:"MTn",MKD:"ден",MNT:"₮",BND:"$",MMK:"K",NOK:"kr",NPR:"रु",AWG:"Afl.",SRD:"$",PLN:"zł",AFN:"؋",STN:"Db",MDL:"L",RON:"lei",UAH:"₴",LKR:"රු.",ALL:"Lekë",RSD:"дин.",TJS:"смн",THB:"฿",TMT:"m.",TRY:"₺",UZS:"сўм",VND:"₫",TWD:"NT$"};!function(t){var e=[28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990];t.getHijriDate=function(t){var i=t.getDate(),r=t.getMonth(),n=t.getFullYear(),o=r+1,s=n;o<3&&(s-=1,o+=12);var a=Math.floor(s/100),l=a-Math.floor(a/4)-2,h=Math.floor(365.25*(s+4716))+Math.floor(30.6001*(o+1))+i-l-1524,u=h+(l=(a=Math.floor((h-1867216.25)/36524.25))-Math.floor(a/4)+1)+1524,c=Math.floor((u-122.1)/365.25),p=Math.floor(365.25*c),d=Math.floor((u-p)/30.6001);i=u-p-Math.floor(30.6001*d),(r=Math.floor((u-p)/20.6001))>13&&(c+=1,r-=12),r-=1,n=c-4716;var f=h-24e5,g=h-1948084,m=Math.floor(g/10631);g-=10631*m;var y=Math.floor((g-.1335)/(10631/30)),b=30*m+y;g-=Math.floor(y*(10631/30)+.1335);var v=Math.floor((g+28.5001)/29.5);13===v&&(v=12);for(var w=g-Math.floor(29.5001*v-29),S=0;S<e.length&&!(e[S]>f);S++);var P=S+16260,C=Math.floor((P-1)/12),x=C+1,O=P-12*C,B=f-e[S-1]+1;return(B+"").length>2&&(B=w,O=v,x=b),{year:x,month:O,date:B}},t.toGregorian=function(t,i,r){var n=r+e[12*(t-1)+1+(i-1)-16260-1]-1+24e5,o=Math.floor(n+.5),s=Math.floor((o-1867216.25)/36524.25),a=1524+(s=o+1+s-Math.floor(s/4)),l=Math.floor((a-122.1)/365.25),h=Math.floor(365.25*l),u=Math.floor((a-h)/30.6001),c=a-h-Math.floor(30.6001*u),p=u-(u>13.5?13:1),d=l-(p>2.5?4716:4715);return d<=0&&p--,new Date(d+"/"+p+"/"+c)}}(Oe||(Oe={}));var Ae,Ne=/\/MMMMM|MMMM|MMM|a|LLLL|LLL|EEEEE|EEEE|E|K|cccc|ccc|WW|W|G+|z+/gi,Fe=["sun","mon","tue","wed","thu","fri","sat"],Ve={m:"getMinutes",h:"getHours",H:"getHours",s:"getSeconds",d:"getDate",f:"getMilliseconds"},ze={M:"month",d:"day",E:"weekday",c:"weekday",y:"year",m:"minute",h:"hour",H:"hour",s:"second",L:"month",a:"designator",z:"timeZone",Z:"timeZone",G:"era",f:"milliseconds"},Ge=function(){function t(){}return t.dateFormat=function(t,e,i){var r=this,n=Ae.getDependables(i,t,e.calendar),s=o("parserObject.numbers",n),a=n.dateObject,l={isIslamic:Ae.islamicRegex.test(e.calendar)};b()&&e.isServerRendered&&(e=Ae.compareBlazorDateFormats(e,t));var h=e.format||Ae.getResultantPattern(e.skeleton,n.dateObject,e.type,!1,b()?t:"");if(l.dateSeperator=b()?o("dateSeperator",a):Ae.getDateSeparator(n.dateObject),p(h))m("Format options or type given must be invalid");else{h=Ae.ConvertDateToWeekFormat(h),b()&&(h=h.replace(/tt/,"a")),l.pattern=h,l.numMapper=b()?u({},s):Ie.getNumberMapper(n.parserObject,Ie.getNumberingSystem(i));for(var c=0,d=h.match(Ne)||[];c<d.length;c++){var f=d[c],g=f.length,y=f[0];switch("K"===y&&(y="h"),y){case"E":case"c":b()?l.weekday=o("days."+Ae.monthIndex[g],a):l.weekday=n.dateObject[Ae.days]["stand-alone"][Ae.monthIndex[g]];break;case"M":case"L":b()?l.month=o("months."+Ae.monthIndex[g],a):l.month=n.dateObject[Ae.month]["stand-alone"][Ae.monthIndex[g]];break;case"a":l.designator=b()?o("dayPeriods",a):o("dayPeriods.format.wide",a);break;case"G":var v=g<=3?"eraAbbr":4===g?"eraNames":"eraNarrow";l.era=b()?o("eras",a):o("eras."+v,n.dateObject);break;case"z":l.timeZone=o("dates.timeZoneNames",n.parserObject)}}}return function(t){return isNaN(t.getDate())?null:r.intDateFormatter(t,l)}},t.intDateFormatter=function(t,e){for(var i="",r=e.pattern.match(Ae.dateParseRegex),n=this.getCurrentDateValue(t,e.isIslamic),o=0,s=r;o<s.length;o++){var a=s[o],l=a.length,h=a[0];"K"===h&&(h="h");var u=void 0,p="",d=void 0,f=void 0,g="";switch(h){case"M":case"L":u=n.month,l>2?i+=e.month[u]:d=!0;break;case"E":case"c":i+=e.weekday[Fe[t.getDay()]];break;case"H":case"h":case"m":case"s":case"d":case"f":if(d=!0,"d"===h)u=n.date;else if("f"===h){d=!1,f=!0;var m=(p=(p=t[Ve[h]]().toString()).substring(0,l)).length;if(l!==m){if(l>3)continue;for(var y=0;y<l-m;y++)p="0"+p.toString()}g+=p}else u=t[Ve[h]]();"h"===h&&(u=u%12||12);break;case"y":f=!0,g+=n.year,2===l&&(g=g.substr(g.length-2));break;case"a":var b=t.getHours()<12?"am":"pm";i+=e.designator[b];break;case"G":var v=t.getFullYear()<0?0:1,w=e.era[v];c(w)&&(w=e.era[v?0:1]),i+=w||"";break;case"'":i+="''"===a?"'":a.replace(/'/g,"");break;case"z":var S=t.getTimezoneOffset(),P=l<4?"+H;-H":e.timeZone.hourFormat;P=P.replace(/:/g,e.numMapper.timeSeparator),0===S?i+=e.timeZone.gmtZeroFormat:(f=!0,g=this.getTimeZoneValue(S,P)),g=e.timeZone.gmtFormat.replace(/\{0\}/,g);break;case":":i+=e.numMapper.numberSymbols.timeSeparator;break;case"/":i+=e.dateSeperator;break;case"W":d=!0,u=Ae.getWeekOfYear(t);break;default:i+=a}d&&(f=!0,g=this.checkTwodigitNumber(u,l)),f&&(i+=Ie.convertValueParts(g,Ae.latnParseRegex,e.numMapper.mapper))}return i},t.getCurrentDateValue=function(t,e){return e?Oe.getHijriDate(t):{year:t.getFullYear(),month:t.getMonth()+1,date:t.getDate()}},t.checkTwodigitNumber=function(t,e){var i=t+"";return 2===e&&2!==i.length?"0"+i:i},t.getTimeZoneValue=function(t,e){var i=this,r=e.split(";")[t>0?1:0],n=Math.abs(t);return r=r.replace(/HH?|mm/g,function(t){var e=t.length,r=-1!==t.indexOf("H");return i.checkTwodigitNumber(Math.floor(r?n/60:n%60),e)})},t}(),_e={ms:"minimumSignificantDigits",ls:"maximumSignificantDigits",mf:"minimumFractionDigits",lf:"maximumFractionDigits"},He=["infinity","nan","group","decimal","exponential"],We=function(){function t(){}return t.numberFormatter=function(t,e,i){var r,n=this,s=u({},e),a={},l={},h=Ae.getDependables(i,t,"",!0),c=h.numericObject;l.numberMapper=b()?u({},c):Ie.getNumberMapper(h.parserObject,Ie.getNumberingSystem(i),!0),l.currencySymbol=b()?o("currencySymbol",c):Ae.getCurrencySymbol(h.numericObject,s.currency||ri,e.altSymbol),l.percentSymbol=b()?o("numberSymbols.percentSign",c):l.numberMapper.numberSymbols.percentSign,l.minusSymbol=b()?o("numberSymbols.minusSign",c):l.numberMapper.numberSymbols.minusSign;var d=l.numberMapper.numberSymbols;if(e.format&&!Ae.formatRegex.test(e.format))a=Ae.customFormat(e.format,l,h.numericObject);else{if(u(s,Ae.getProperNumericSkeleton(e.format||"N")),s.isCurrency="currency"===s.type,s.isPercent="percent"===s.type,b()||(r=Ae.getSymbolPattern(s.type,l.numberMapper.numberSystem,h.numericObject,s.isAccount)),s.groupOne=this.checkValueRange(s.maximumSignificantDigits,s.minimumSignificantDigits,!0),this.checkValueRange(s.maximumFractionDigits,s.minimumFractionDigits,!1,!0),p(s.fractionDigits)||(s.minimumFractionDigits=s.maximumFractionDigits=s.fractionDigits),p(s.useGrouping)&&(s.useGrouping=!0),s.isCurrency&&!b()&&(r=r.replace(/\u00A4/g,Ae.defaultCurrency)),b())a.nData=u({},{},o(s.type+"nData",c)),a.pData=u({},{},o(s.type+"pData",c)),"currency"===s.type&&e.currency&&Ae.replaceBlazorCurrency([a.pData,a.nData],l.currencySymbol,e.currency);else{var f=r.split(";");a.nData=Ae.getFormatData(f[1]||"-"+f[0],!0,l.currencySymbol),a.pData=Ae.getFormatData(f[0],!1,l.currencySymbol),s.useGrouping&&(s.groupSeparator=d[He[2]],s.groupData=this.getGroupingDetails(f[0]))}if(p(s.minimumFractionDigits)&&(s.minimumFractionDigits=a.nData.minimumFraction),p(s.maximumFractionDigits)){var g=a.nData.maximumFraction;s.maximumFractionDigits=p(g)&&s.isPercent?0:g}var m=s.minimumFractionDigits,y=s.maximumFractionDigits;p(m)||p(y)||m>y&&(s.maximumFractionDigits=m)}return u(a.nData,s),u(a.pData,s),function(t){return isNaN(t)?d[He[1]]:isFinite(t)?n.intNumberFormatter(t,a,l):d[He[0]]}},t.getGroupingDetails=function(t){var e={},i=t.match(Ae.negativeDataRegex);if(i&&i[4]){var r=i[4],n=r.lastIndexOf(",");if(-1!==n){var o=r.split(".")[0];e.primary=o.length-n-1;var s=r.lastIndexOf(",",n-1);-1!==s&&(e.secondary=n-1-s)}}return e},t.checkValueRange=function(t,e,i,r){var n=r?"f":"s",o=0,s=_e["l"+n],a=_e["m"+n];if(p(t)||(this.checkRange(t,s,r),o++),p(e)||(this.checkRange(e,a,r),o++),2===o){if(!(t<e))return!0;m(a+"specified must be less than the"+s)}else i&&1===o&&m("Both"+a+"and"+a+"must be present");return!1},t.checkRange=function(t,e,i){var r=i?[0,20]:[1,21];(t<r[0]||t>r[1])&&m(e+"value must be within the range"+r[0]+"to"+r[1])},t.intNumberFormatter=function(t,e,i){var r;if(!p(e.nData.type)){t<0?(t*=-1,r=e.nData):r=0===t?e.zeroData||e.pData:e.pData;var n="";return r.isPercent&&(t*=100),r.groupOne?n=this.processSignificantDigits(t,r.minimumSignificantDigits,r.maximumSignificantDigits):(n=this.processFraction(t,r.minimumFractionDigits,r.maximumFractionDigits),r.minimumIntegerDigits&&(n=this.processMinimumIntegers(n,r.minimumIntegerDigits))),"scientific"===r.type&&(n=(n=t.toExponential(r.maximumFractionDigits)).replace("e",i.numberMapper.numberSymbols[He[4]])),n=n.replace(".",i.numberMapper.numberSymbols[He[3]]),r.useGrouping&&(n=this.groupNumbers(n,r.groupData.primary,r.groupSeparator||",",i.numberMapper.numberSymbols[He[3]]||".",r.groupData.secondary)),n=Ie.convertValueParts(n,Ae.latnParseRegex,i.numberMapper.mapper),"N/A"===r.nlead?r.nlead:r.nlead+n+r.nend}},t.processSignificantDigits=function(t,e,i){var r=t+"";return r.length<e?t.toPrecision(e):(r=t.toPrecision(i),+r+"")},t.groupNumbers=function(t,e,i,r,n){for(var o=!c(n)&&0!==n,s=t.split(r),a=s[0],l=a.length,h="";l>e;)h=a.slice(l-e,l)+(h.length?i+h:""),l-=e,o&&(e=n,o=!1);return s[0]=a.slice(0,l)+(h.length?i:"")+h,s.join(r)},t.processFraction=function(t,e,i){var r=(t+"").split(".")[1],n=r?r.length:0;if(e&&n<e){var o="";if(0!==n){o+=t;for(var s=0;s<e-n;s++)o+="0";return o}return o=t.toFixed(e),t.toFixed(e)}return!c(i)&&(n>i||0===i)?t.toFixed(i):t+""},t.processMinimumIntegers=function(t,e){var i=t.split("."),r=i[0],n=r.length;if(n<e){for(var o=0;o<e-n;o++)r="0"+r;i[0]=r}return i.join(".")},t}(),Ue=/^[0-9]*$/,qe={minute:"setMinutes",hour:"setHours",second:"setSeconds",day:"setDate",month:"setMonth",milliseconds:"setMilliseconds"},Ke=function(){function t(){}return t.dateParser=function(t,e,i){var r=this,n=Ae.getDependables(i,t,e.calendar),s=Ie.getCurrentNumericOptions(n.parserObject,Ie.getNumberingSystem(i),!1,b()),a={};b()&&e.isServerRendered&&(e=Ae.compareBlazorDateFormats(e,t));var l,h=e.format||Ae.getResultantPattern(e.skeleton,n.dateObject,e.type,!1,b()?t:""),u="";if(p(h))m("Format options or type given must be invalid");else{h=Ae.ConvertDateToWeekFormat(h),a={isIslamic:Ae.islamicRegex.test(e.calendar),pattern:h,evalposition:{},culture:t};for(var d=h.match(Ae.dateParseRegex)||[],f=d.length,g=0,y=0,v=!1,w=s.numericRegex,S=b()?n.parserObject.numbers:Ie.getNumberMapper(n.parserObject,Ie.getNumberingSystem(i)),P=0;P<f;P++){var C=d[P],x=C.length,O="K"===C[0]?"h":C[0],B=void 0,L=void 0,T=ze[O],M=2===x?"":"?";switch(v&&(g=y,v=!1),O){case"E":case"c":var D=void 0;D=b()?o("days."+Ae.monthIndex[x],n.dateObject):n.dateObject[Ae.days]["stand-alone"][Ae.monthIndex[x]];var k=Ie.reverseObject(D);u+="("+Object.keys(k).join("|")+")";break;case"M":case"L":case"d":case"m":case"s":case"h":case"H":case"f":if(L=!0,("M"===O||"L"===O)&&x>2){var E=void 0;E=b()?o("months."+Ae.monthIndex[x],n.dateObject):n.dateObject.months["stand-alone"][Ae.monthIndex[x]],a[T]=Ie.reverseObject(E),u+="("+Object.keys(a[T]).join("|")+")"}else if("f"===O){if(x>3)continue;B=!0,u+="("+w+w+"?"+w+"?)"}else B=!0,u+="("+w+w+M+")";"h"===O&&(a.hour12=!0);break;case"W":u+="("+w+(1===x?"?":"")+w+")";break;case"y":L=B=!0,u+=2===x?"("+w+w+")":"("+w+"{"+x+",})";break;case"a":L=!0;var j=b()?o("dayPeriods",n.dateObject):o("dayPeriods.format.wide",n.dateObject);a[T]=Ie.reverseObject(j),u+="("+Object.keys(a[T]).join("|")+")";break;case"G":L=!0;var I=x<=3?"eraAbbr":4===x?"eraNames":"eraNarrow";a[T]=Ie.reverseObject(b()?o("eras",n.dateObject):o("eras."+I,n.dateObject)),u+="("+Object.keys(a[T]).join("|")+"?)";break;case"z":L=0!==(new Date).getTimezoneOffset(),a[T]=o("dates.timeZoneNames",n.parserObject);var R=a[T],A=(l=x<4)?"+H;-H":R.hourFormat;A=A.replace(/:/g,S.timeSeparator),u+="("+this.parseTimeZoneRegx(A,R,w)+")?",v=!0,y=l?6:12;break;case"'":u+="("+C.replace(/'/g,"")+")?";break;default:u+="([\\D])"}L&&(a.evalposition[T]={isNumber:B,pos:P+1+g,hourOnly:l}),P!==f-1||c(u)||(a.parserRegex=new RegExp("^"+u+"$","i"))}}return function(t){var e=r.internalDateParse(t,a,s);if(c(e)||!Object.keys(e).length)return null;if(a.isIslamic){var i={},n=e.year,o=e.day,l=e.month,h=n?n+"":"",u=2===h.length;n&&l&&o&&!u||(i=Oe.getHijriDate(new Date)),u&&(n=parseInt((i.year+"").slice(0,2)+h,10));var p=Oe.toGregorian(n||i.year,l||i.month,o||i.date);e.year=p.getFullYear(),e.month=p.getMonth()+1,e.day=p.getDate()}return r.getDateObject(e)}},t.getDateObject=function(t,e){var i=e||new Date;i.setMilliseconds(0);var r=t.year,n=t.designator,o=t.timeZone;if(!p(r)){if((r+"").length<=2){r+=100*Math.floor(i.getFullYear()/100)}i.setFullYear(r)}for(var s=0,a=["hour","minute","second","milliseconds","month","day"];s<a.length;s++){var l=a[s],h=t[l];if(p(h)&&"day"===l&&i.setDate(1),!p(h))if("month"===l){if((h-=1)<0||h>11)return new Date("invalid");var u=i.getDate();i.setDate(1),i[qe[l]](h);var c=new Date(i.getFullYear(),h+1,0).getDate();i.setDate(u<c?u:c)}else{if("day"===l){var d=new Date(i.getFullYear(),i.getMonth()+1,0).getDate();if(h<1||h>d)return null}i[qe[l]](h)}}if(!p(n)){var f=i.getHours();"pm"===n?i.setHours(f+(12===f?0:12)):12===f&&i.setHours(0)}if(!p(o)){var g=o-i.getTimezoneOffset();0!==g&&i.setMinutes(i.getMinutes()+g)}return i},t.internalDateParse=function(t,e,i){var r=t.match(e.parserRegex),n={hour:0,minute:0,second:0};if(c(r))return null;for(var o=0,s=Object.keys(e.evalposition);o<s.length;o++){var a=s[o],l=e.evalposition[a],h=r[l.pos];if(l.isNumber)n[a]=this.internalNumberParser(h,i);else if("timeZone"!==a||p(h))h="month"!==a||e.isIslamic||"en"!==e.culture&&"en-GB"!==e.culture&&"en-US"!==e.culture?h:h[0].toUpperCase()+h.substring(1).toLowerCase(),n[a]=e[a][h];else{var u=l.pos,d=void 0,f=r[u+1],g=!p(f);l.hourOnly?d=60*this.getZoneValue(g,f,r[u+4],i):(d=60*this.getZoneValue(g,f,r[u+7],i),d+=this.getZoneValue(g,r[u+4],r[u+10],i)),c(d)||(n[a]=d)}}return e.hour12&&(n.hour12=!0),n},t.internalNumberParser=function(t,e){return t=Ie.convertValueParts(t,e.numberParseRegex,e.numericPair),Ue.test(t)?+t:null},t.parseTimeZoneRegx=function(t,e,i){var r,n,o=e.gmtFormat,s="("+i+")("+i+")";return r=t.replace("+","\\+"),r=-1!==t.indexOf("HH")?r.replace(/HH|mm/g,"("+s+")"):r.replace(/H|m/g,"("+s+"?)"),n=r.split(";").map(function(t){return o.replace("{0}",t)}),r=n.join("|")+"|"+e.gmtZeroFormat},t.getZoneValue=function(t,e,i,r){var n=t?e:i;if(!n)return 0;var o=this.internalNumberParser(n,r);return t?-o:o},t}(),Ye=/^([^0-9]*)(([0-9,]*[0-9]+)(\.[0-9]+)?)([Ee][+-]?[0-9]+)?([^0-9]*)$/,$e=/,/g,Je=["minusSign","infinity"],Xe=function(){function t(){}return t.numberParser=function(t,e,i){var r,n=this,s=Ae.getDependables(i,t,"",!0),a={custom:!0};Ae.formatRegex.test(e.format)||!e.format?(u(a,Ae.getProperNumericSkeleton(e.format||"N")),a.custom=!1,a.fractionDigits||e.maximumFractionDigits&&(a.maximumFractionDigits=e.maximumFractionDigits)):u(a,Ae.customFormat(e.format,null,null));var l=o("numbers",s.parserObject);r=Ie.getCurrentNumericOptions(s.parserObject,Ie.getNumberingSystem(i),!0,b()),a.symbolRegex=Ie.getSymbolRegex(Object.keys(r.symbolMatch)),a.infinity=r.symbolNumberSystem[Je[1]];var h;if(b())a.nData=u({},{},o(a.type+"nData",l)),a.pData=u({},{},o(a.type+"pData",l)),"currency"===a.type&&e.currency&&Ae.replaceBlazorCurrency([a.pData,a.nData],o("currencySymbol",l),e.currency);else if(h=Ae.getSymbolPattern(a.type,r.numberSystem,s.numericObject,a.isAccount)){var c=(h=h.replace(/\u00A4/g,Ae.defaultCurrency)).split(";");a.nData=Ae.getFormatData(c[1]||"-"+c[0],!0,""),a.pData=Ae.getFormatData(c[0],!0,"")}return function(t){return n.getParsedNumber(t,a,r)}},t.getParsedNumber=function(t,e,i){var r,n,o,s,a,l;if(-1!==t.indexOf(e.infinity))return 1/0;t=Ie.convertValueParts(t,e.symbolRegex,i.symbolMatch),0===(t=-1!==(t=Ie.convertValueParts(t,i.numberParseRegex,i.numericPair)).indexOf("-")?t.replace("-.","-0."):t).indexOf(".")&&(t="0"+t);var h=t.match(Ye);if(c(h))return NaN;s=h[1],o=h[2];var u=h[5];return a=h[6],r=e.custom?s===e.nData.nlead&&a===e.nData.nend:-1!==s.indexOf(e.nData.nlead)&&-1!==a.indexOf(e.nData.nend),n=r?e.nData.isPercent:e.pData.isPercent,o=o.replace($e,""),u&&(o+=u),l=+o,("percent"===e.type||n)&&(l/=100),(e.custom||e.fractionDigits)&&(l=parseFloat(l.toFixed(e.custom?r?e.nData.maximumFractionDigits:e.pData.maximumFractionDigits:e.fractionDigits))),e.maximumFractionDigits&&(l=this.convertMaxFracDigits(o,e,l,r)),r&&(l*=-1),l},t.convertMaxFracDigits=function(t,e,i,r){var n=t.split(".");return n[1]&&n[1].length>e.maximumFractionDigits&&(i=+i.toFixed(e.custom?r?e.nData.maximumFractionDigits:e.pData.maximumFractionDigits:e.maximumFractionDigits)),i},t}(),Qe=function(){function t(t){this.ranArray=[],this.boundedEvents={},c(t)||(this.context=t)}return t.prototype.on=function(t,e,i,r){if(!c(e)){var n=i||this.context;this.notExist(t)?this.boundedEvents[t]=[{handler:e,context:n}]:c(r)?this.isHandlerPresent(this.boundedEvents[t],e)||this.boundedEvents[t].push({handler:e,context:n}):-1===this.ranArray.indexOf(r)&&(this.ranArray.push(r),this.boundedEvents[t].push({handler:e,context:n,id:r}))}},t.prototype.off=function(t,e,i){if(!this.notExist(t)){var r=o(t,this.boundedEvents);if(e){for(var n=0;n<r.length;n++)if(i){if(r[n].id===i){r.splice(n,1);var s=this.ranArray.indexOf(i);-1!==s&&this.ranArray.splice(s,1);break}}else if(e===r[n].handler){r.splice(n,1);break}}else delete this.boundedEvents[t]}},t.prototype.notify=function(t,e,i,r){if(this.notExist(t))i&&i.call(this,e);else{e&&(e.name=t);var n=o(t,this.boundedEvents).slice(0);if(window.Blazor)return this.blazorCallback(n,e,i,r,0);for(var s=0,a=n;s<a.length;s++){var l=a[s];l.handler.call(l.context,e)}i&&i.call(this,e)}},t.prototype.blazorCallback=function(t,e,i,r,n){var o=this,s=n===t.length-1;if(n<t.length){var a=t[n],l=a.handler.call(a.context,e);if(l&&"function"==typeof l.then){if(!i)return l;l.then(function(l){if(l="string"==typeof l&&o.isJson(l)?JSON.parse(l,o.dateReviver):l,u(e,e,l,!0),!i||!s)return o.blazorCallback(t,e,i,r,n+1);i.call(a.context,e)}).catch(function(t){r&&r.call(a.context,"string"==typeof t&&o.isJson(t)?JSON.parse(t,o.dateReviver):t)})}else{if(!i||!s)return this.blazorCallback(t,e,i,r,n+1);i.call(a.context,e)}}},t.prototype.dateReviver=function(t,e){return b&&"string"==typeof e&&null!==e.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/)?new Date(e):e},t.prototype.isJson=function(t){return!0},t.prototype.destroy=function(){this.boundedEvents=this.context=void 0},t.prototype.notExist=function(t){return!1===this.boundedEvents.hasOwnProperty(t)||this.boundedEvents[t].length<=0},t.prototype.isHandlerPresent=function(t,e){for(var i=0,r=t;i<r.length;i++){if(r[i].handler===e)return!0}return!1},t}(),Ze=new Qe,ti=!1,ei={},ii="en-US",ri="USD",ni=["numericObject","dateObject"],oi=function(){function t(t){t&&(this.culture=t)}return t.prototype.getDateFormat=function(t){return Ge.dateFormat(this.getCulture(),t||{type:"date",skeleton:"short"},ei)},t.prototype.getNumberFormat=function(t){return t&&!t.currency&&(t.currency=ri),b()&&t&&!t.format&&(t.minimumFractionDigits=0),We.numberFormatter(this.getCulture(),t||{},ei)},t.prototype.getDateParser=function(t){return Ke.dateParser(this.getCulture(),t||{skeleton:"short",type:"date"},ei)},t.prototype.getNumberParser=function(t){return b()&&t&&!t.format&&(t.minimumFractionDigits=0),Xe.numberParser(this.getCulture(),t||{format:"N"},ei)},t.prototype.formatNumber=function(t,e){return this.getNumberFormat(e)(t)},t.prototype.formatDate=function(t,e){return this.getDateFormat(e)(t)},t.prototype.parseDate=function(t,e){return this.getDateParser(e)(t)},t.prototype.parseNumber=function(t,e){return this.getNumberParser(e)(t)},t.prototype.getDatePattern=function(t,e){return Ae.getActualDateTimeFormat(this.getCulture(),t,ei,e)},t.prototype.getNumberPattern=function(t,e){return Ae.getActualNumberFormat(this.getCulture(),t,ei,e)},t.prototype.getFirstDayOfWeek=function(){return Ae.getWeekData(this.getCulture(),ei)},t.prototype.getCulture=function(){return this.culture||ii},t}(),si={"en-US":{d:"M/d/y",D:"EEEE, MMMM d, y",f:"EEEE, MMMM d, y h:mm a",F:"EEEE, MMMM d, y h:mm:s a",g:"M/d/y h:mm a",G:"M/d/yyyy h:mm:ss tt",m:"MMMM d",M:"MMMM d",r:"ddd, dd MMM yyyy HH':'mm':'ss 'GMT'",R:"ddd, dd MMM yyyy HH':'mm':'ss 'GMT'",s:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",t:"h:mm tt",T:"h:m:s tt",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",U:"dddd, MMMM d, yyyy h:mm:ss tt",y:"MMMM yyyy",Y:"MMMM yyyy"}};!function(t){function e(e,i,r,n,a){var l,h=r||"date";if(a)l=s({skeleton:e},a).format||s({skeleton:"d"},"en-US").format;else{if(-1!==t.basicPatterns.indexOf(e)){if(l=o(h+"Formats."+e,i),"dateTime"===h){var u=o("dateFormats."+e,i),c=o("timeFormats."+e,i);l=l.replace("{1}",u).replace("{0}",c)}}else l=o("dateTimeFormats.availableFormats."+e,i);p(l)&&"yMd"===e&&(l="M/d/y")}return l}function i(e,i,r,n){var s={},a=r||"gregorian";if(s.parserObject=Ie.getMainObject(e,i)||(b()?t.blazorDefaultObject:t.defaultObject),n)s.numericObject=o("numbers",s.parserObject);else{var l=b()?"dates":"dates.calendars."+a;s.dateObject=o(l,s.parserObject)}return s}function r(t,e,i,r){return o(t+"Formats-numberSystem-"+e+(r?".accounting":".standard"),i)||(r?o(t+"Formats-numberSystem-"+e+".standard",i):"")}function n(e){var i=e.match(t.dateConverterMapper);if(i&&b()){var r=3===i[0].length?"EEE":"EEEE";return e.replace(t.dateConverterMapper,r)}return e}function s(t,e){var i=t.format||t.skeleton,r=o((e||"en-US")+"."+i,si);return r||(r=o("en-US."+i,si)),r&&(r=n(r),t.format=r.replace(/tt/,"a")),t}function a(e){var i=e.match(t.formatRegex),r={},n=i[1].toUpperCase();return r.isAccount="A"===n,r.type=t.patternMatcher[n],e.length>1&&(r.fractionDigits=parseInt(i[2],10)),r}function l(e,i,r,n){var o=n?{}:{nlead:"",nend:""},s=e.match(t.customRegex);if(s){n||(o.nlead=h(s[1],r),o.nend=h(s[10],r),o.groupPattern=s[4]);var a=s[7];if(a&&i){var l=a.match(w);c(l)?o.minimumFraction=0:o.minimumFraction=l.length,o.maximumFraction=a.length-1}}return o}function h(e,i){return e?e.replace(t.defaultCurrency,i):""}function d(t,e,i){return o("currencies."+e+(i?"."+i:".symbol"),t)||o("currencies."+e+".symbol-alt-narrow",t)||"$"}function f(e,i,n){var o={type:"decimal",minimumFractionDigits:0,maximumFractionDigits:0},s=e.match(t.customRegex);if(c(s)||""===s[5]&&"N/A"!==e)return o.type=void 0,o;o.nlead=s[1],o.nend=s[10];var a=s[6],l=!!a.match(/\ $/g),h=-1!==a.replace(/\ $/g,"").indexOf(" ");o.useGrouping=-1!==a.indexOf(",")||h,a=a.replace(/,/g,"");var p=s[7];if(-1!==a.indexOf("0")&&(o.minimumIntegerDigits=a.length-a.indexOf("0")),c(p)||(o.minimumFractionDigits=p.lastIndexOf("0"),o.maximumFractionDigits=p.lastIndexOf("#"),-1===o.minimumFractionDigits&&(o.minimumFractionDigits=0),(-1===o.maximumFractionDigits||o.maximumFractionDigits<o.minimumFractionDigits)&&(o.maximumFractionDigits=o.minimumFractionDigits)),c(i)?u(o,g([o.nlead,o.nend],"%","%")):(u(o,g([o.nlead,o.nend],"$",i.currencySymbol)),o.isCurrency||u(o,g([o.nlead,o.nend],"%",i.percentSymbol))),!c(n)){var d=r(o.type,i.numberMapper.numberSystem,n,!1);o.useGrouping&&(o.groupSeparator=h?" ":i.numberMapper.numberSymbols[S[2]],o.groupData=We.getGroupingDetails(d.split(";")[0])),o.nlead=o.nlead.replace(/'/g,""),o.nend=l?" "+o.nend.replace(/'/g,""):o.nend.replace(/'/g,"")}return o}function g(t,e,i){for(var r={nlead:t[0],nend:t[1]},n=0;n<2;n++){var o=t[n],s=o.indexOf(e);if(-1!==s&&(s<o.indexOf("'")||s>o.lastIndexOf("'"))){r[B[n]]=o.substr(0,s)+i+o.substr(s+1),r[B[e]]=!0,r.type=r.isCurrency?"currency":"percent";break}}return r}function m(t,e,i){t+=".";for(var r=0;r<e;r++)t+="0";if(e<i)for(var n=i-e,o=0;o<n;o++)t+="#";return t}function y(t,e){for(var i=t.split("."),r="",n=0;n<e;n++)r+="0";return i[1]?r+"."+i[1]:r}function v(t){var e=t.split("."),i=e[0],r=3-i.length%3;t="";for(var n=(i=(r&&1===r?"#":2===r?"##":"")+i).length-1;n>0;n-=3)t=","+i[n-2]+i[n-1]+i[n]+t;return t=t.slice(1),e[1]?t+"."+e[1]:t}t.negativeDataRegex=/^(('[^']+'|''|[^*#@0,.E])*)(\*.)?((([#,]*[0,]*0+)(\.0*[0-9]*#*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/,t.customRegex=/^(('[^']+'|''|[^*#@0,.])*)(\*.)?((([0#,]*[0,]*[0#]*[0#\ ]*)(\.[0#]*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/,t.latnParseRegex=/0|1|2|3|4|5|6|7|8|9/g;var w=/[0-9]/g;t.defaultCurrency="$";var S=["infinity","nan","group","decimal"],P=/G|M|L|H|c|'| a|yy|y|EEEE|E/g,C={G:"",M:"m",L:"m",H:"h",c:"d","'":'"'," a":" AM/PM",yy:"yy",y:"yyyy",EEEE:"dddd",E:"ddd"};t.dateConverterMapper=/dddd|ddd/gi;var x="sun";t.islamicRegex=/^islamic/;var O={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};t.formatRegex=/(^[ncpae]{1})([0-1]?[0-9]|20)?$/i,t.currencyFormatRegex=/(^[ca]{1})([0-1]?[0-9]|20)?$/i,t.curWithoutNumberRegex=/(c|a)$/gi;var B={$:"isCurrency","%":"isPercent","-":"isNegative",0:"nlead",1:"nend"};t.dateParseRegex=/([a-z])\1*|'([^']|'')+'|''|./gi,t.basicPatterns=["short","medium","long","full"],t.defaultObject={dates:{calendars:{gregorian:{months:{"stand-alone":{abbreviated:{1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"},narrow:{1:"J",2:"F",3:"M",4:"A",5:"M",6:"J",7:"J",8:"A",9:"S",10:"O",11:"N",12:"D"},wide:{1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"}}},days:{"stand-alone":{abbreviated:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},narrow:{sun:"S",mon:"M",tue:"T",wed:"W",thu:"T",fri:"F",sat:"S"},short:{sun:"Su",mon:"Mo",tue:"Tu",wed:"We",thu:"Th",fri:"Fr",sat:"Sa"},wide:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"}}},dayPeriods:{format:{wide:{am:"AM",pm:"PM"}}},eras:{eraNames:{0:"Before Christ","0-alt-variant":"Before Common Era",1:"Anno Domini","1-alt-variant":"Common Era"},eraAbbr:{0:"BC","0-alt-variant":"BCE",1:"AD","1-alt-variant":"CE"},eraNarrow:{0:"B","0-alt-variant":"BCE",1:"A","1-alt-variant":"CE"}},dateFormats:{full:"EEEE, MMMM d, y",long:"MMMM d, y",medium:"MMM d, y",short:"M/d/yy"},timeFormats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats:{full:"{1} 'at' {0}",long:"{1} 'at' {0}",medium:"{1}, {0}",short:"{1}, {0}",availableFormats:{d:"d",E:"ccc",Ed:"d E",Ehm:"E h:mm a",EHm:"E HH:mm",Ehms:"E h:mm:ss a",EHms:"E HH:mm:ss",Gy:"y G",GyMMM:"MMM y G",GyMMMd:"MMM d, y G",GyMMMEd:"E, MMM d, y G",h:"h a",H:"HH",hm:"h:mm a",Hm:"HH:mm",hms:"h:mm:ss a",Hms:"HH:mm:ss",hmsv:"h:mm:ss a v",Hmsv:"HH:mm:ss v",hmv:"h:mm a v",Hmv:"HH:mm v",M:"L",Md:"M/d",MEd:"E, M/d",MMM:"LLL",MMMd:"MMM d",MMMEd:"E, MMM d",MMMMd:"MMMM d",ms:"mm:ss",y:"y",yM:"M/y",yMd:"M/d/y",yMEd:"E, M/d/y",yMMM:"MMM y",yMMMd:"MMM d, y",yMMMEd:"E, MMM d, y",yMMMM:"MMMM y"}}},islamic:{months:{"stand-alone":{abbreviated:{1:"Muh.",2:"Saf.",3:"Rab. I",4:"Rab. II",5:"Jum. I",6:"Jum. II",7:"Raj.",8:"Sha.",9:"Ram.",10:"Shaw.",11:"Dhuʻl-Q.",12:"Dhuʻl-H."},narrow:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},wide:{1:"Muharram",2:"Safar",3:"Rabiʻ I",4:"Rabiʻ II",5:"Jumada I",6:"Jumada II",7:"Rajab",8:"Shaʻban",9:"Ramadan",10:"Shawwal",11:"Dhuʻl-Qiʻdah",12:"Dhuʻl-Hijjah"}}},days:{"stand-alone":{abbreviated:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},narrow:{sun:"S",mon:"M",tue:"T",wed:"W",thu:"T",fri:"F",sat:"S"},short:{sun:"Su",mon:"Mo",tue:"Tu",wed:"We",thu:"Th",fri:"Fr",sat:"Sa"},wide:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"}}},dayPeriods:{format:{wide:{am:"AM",pm:"PM"}}},eras:{eraNames:{0:"AH"},eraAbbr:{0:"AH"},eraNarrow:{0:"AH"}},dateFormats:{full:"EEEE, MMMM d, y G",long:"MMMM d, y G",medium:"MMM d, y G",short:"M/d/y GGGGG"},timeFormats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats:{full:"{1} 'at' {0}",long:"{1} 'at' {0}",medium:"{1}, {0}",short:"{1}, {0}",availableFormats:{d:"d",E:"ccc",Ed:"d E",Ehm:"E h:mm a",EHm:"E HH:mm",Ehms:"E h:mm:ss a",EHms:"E HH:mm:ss",Gy:"y G",GyMMM:"MMM y G",GyMMMd:"MMM d, y G",GyMMMEd:"E, MMM d, y G",h:"h a",H:"HH",hm:"h:mm a",Hm:"HH:mm",hms:"h:mm:ss a",Hms:"HH:mm:ss",M:"L",Md:"M/d",MEd:"E, M/d",MMM:"LLL",MMMd:"MMM d",MMMEd:"E, MMM d",MMMMd:"MMMM d",ms:"mm:ss",y:"y G",yyyy:"y G",yyyyM:"M/y GGGGG",yyyyMd:"M/d/y GGGGG",yyyyMEd:"E, M/d/y GGGGG",yyyyMMM:"MMM y G",yyyyMMMd:"MMM d, y G",yyyyMMMEd:"E, MMM d, y G",yyyyMMMM:"MMMM y G",yyyyQQQ:"QQQ y G",yyyyQQQQ:"QQQQ y G"}}}},timeZoneNames:{hourFormat:"+HH:mm;-HH:mm",gmtFormat:"GMT{0}",gmtZeroFormat:"GMT"}},numbers:{currencies:{USD:{displayName:"US Dollar",symbol:"$","symbol-alt-narrow":"$"},EUR:{displayName:"Euro",symbol:"€","symbol-alt-narrow":"€"},GBP:{displayName:"British Pound","symbol-alt-narrow":"£"}},defaultNumberingSystem:"latn",minimumGroupingDigits:"1","symbols-numberSystem-latn":{decimal:".",group:",",list:";",percentSign:"%",plusSign:"+",minusSign:"-",exponential:"E",superscriptingExponent:"×",perMille:"‰",infinity:"∞",nan:"NaN",timeSeparator:":"},"decimalFormats-numberSystem-latn":{standard:"#,##0.###"},"percentFormats-numberSystem-latn":{standard:"#,##0%"},"currencyFormats-numberSystem-latn":{standard:"¤#,##0.00",accounting:"¤#,##0.00;(¤#,##0.00)"},"scientificFormats-numberSystem-latn":{standard:"#E0"}}},t.blazorDefaultObject={numbers:{mapper:{0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},mapperDigits:"0123456789",numberSymbols:{decimal:".",group:",",plusSign:"+",minusSign:"-",percentSign:"%",nan:"NaN",timeSeparator:":",infinity:"∞"},timeSeparator:":",currencySymbol:"$",currencypData:{nlead:"$",nend:"",groupSeparator:",",groupData:{primary:3},maximumFraction:2,minimumFraction:2},percentpData:{nlead:"",nend:"%",groupSeparator:",",groupData:{primary:3},maximumFraction:2,minimumFraction:2},percentnData:{nlead:"-",nend:"%",groupSeparator:",",groupData:{primary:3},maximumFraction:2,minimumFraction:2},currencynData:{nlead:"($",nend:")",groupSeparator:",",groupData:{primary:3},maximumFraction:2,minimumFraction:2},decimalnData:{nlead:"-",nend:"",groupData:{primary:3},maximumFraction:2,minimumFraction:2},decimalpData:{nlead:"",nend:"",groupData:{primary:3},maximumFraction:2,minimumFraction:2}},dates:{dayPeriods:{am:"AM",pm:"PM"},dateSeperator:"/",days:{abbreviated:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},short:{sun:"Su",mon:"Mo",tue:"Tu",wed:"We",thu:"Th",fri:"Fr",sat:"Sa"},wide:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"}},months:{abbreviated:{1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"},wide:{1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"}},eras:{1:"AD"}}},t.monthIndex={3:"abbreviated",4:"wide",5:"narrow",1:"abbreviated"},t.month="months",t.days="days",t.patternMatcher={C:"currency",P:"percent",N:"decimal",A:"currency",E:"scientific"},t.getResultantPattern=e,t.getDependables=i,t.getSymbolPattern=r,t.ConvertDateToWeekFormat=n,t.compareBlazorDateFormats=s,t.getProperNumericSkeleton=a,t.getFormatData=l,t.changeCurrencySymbol=h,t.getCurrencySymbol=d,t.customFormat=function(t,e,i){for(var r={},n=t.split(";"),o=["pData","nData","zeroData"],s=0;s<n.length;s++)r[o[s]]=f(n[s],e,i);return c(r.nData)&&(r.nData=u({},r.pData),r.nData.nlead=c(e)?"-"+r.nData.nlead:e.minusSymbol+r.nData.nlead),r},t.customNumberFormat=f,t.isCurrencyPercent=g,t.getDateSeparator=function(t){var e=(o("dateFormats.short",t)||"").match(/[dM]([^dM])[dM]/i);return e?e[1]:"/"},t.getActualDateTimeFormat=function(t,r,n,a){var l=i(n,t,r.calendar);b()&&(r=s(r,t));var h=r.format||e(r.skeleton,l.dateObject,r.type);if(a){if(-1!==(h=h.replace(P,function(t){return C[t]})).indexOf("z")){var u=h.match(/z/g).length,c=void 0,p={timeZone:{}};p.numMapper=Ie.getNumberMapper(l.parserObject,Ie.getNumberingSystem(n)),p.timeZone=o("dates.timeZoneNames",l.parserObject);var d=(new Date).getTimezoneOffset(),f=u<4?"+H;-H":p.timeZone.hourFormat;f=f.replace(/:/g,p.numMapper.timeSeparator),0===d?c=p.timeZone.gmtZeroFormat:(c=Ge.getTimeZoneValue(d,f),c=p.timeZone.gmtFormat.replace(/\{0\}/,c)),h=h.replace(/[z]+/,'"'+c+'"')}h=h.replace(/ $/,"")}return h},t.getActualNumberFormat=function(e,n,s,h){var c,p=i(s,e,"",!0),f={custom:!0},g=p.numericObject,w={},S=(n.format||"").match(t.currencyFormatRegex),P=t.formatRegex.test(n.format)?a(n.format||"N"):{},C={};if(S){C.numberMapper=b()?u({},p.numericObject):Ie.getNumberMapper(p.parserObject,Ie.getNumberingSystem(s),!0);var x=b()?o("currencySymbol",p.numericObject):d(p.numericObject,n.currency||ri,n.altSymbol),O=r("currency",C.numberMapper.numberSystem,p.numericObject,/a/i.test(n.format)),B=(O=O.replace(/\u00A4/g,x)).split(";");w.hasNegativePattern=!!b()||B.length>1,w.nData=b()?o(P.type+"nData",g):l(B[1]||"-"+B[0],!0,x),w.pData=b()?o(P.type+"pData",g):l(B[0],!1,x),S[2]||n.minimumFractionDigits||n.maximumFractionDigits||(c=l(O.split(";")[0],!0,"",!0).minimumFraction)}var L;if(t.formatRegex.test(n.format)||!n.format){if(u(f,a(n.format||"N")),f.custom=!1,L="###0",(f.fractionDigits||n.minimumFractionDigits||n.maximumFractionDigits||c)&&(f.fractionDigits&&(n.minimumFractionDigits=n.maximumFractionDigits=f.fractionDigits),L=m(L,c||f.fractionDigits||n.minimumFractionDigits||0,n.maximumFractionDigits||0)),n.minimumIntegerDigits&&(L=y(L,n.minimumIntegerDigits)),n.useGrouping&&(L=v(L)),"currency"===f.type||f.type&&b()){b()&&"currency"!==f.type&&(w.pData=o(f.type+"pData",g),w.nData=o(f.type+"nData",g));var T=L;L=w.pData.nlead+T+w.pData.nend,(w.hasNegativePattern||b())&&(L+=";"+w.nData.nlead+T+w.nData.nend)}"percent"!==f.type||b()||(L+=" %")}else L=n.format.replace(/'/g,'"');return Object.keys(C).length>0&&(L=h?L:function(t,e){if(-1!==t.indexOf(",")){var i=t.split(",");t=i[0]+o("numberMapper.numberSymbols.group",e)+i[1].replace(".",o("numberMapper.numberSymbols.decimal",e))}else t=t.replace(".",o("numberMapper.numberSymbols.decimal",e));return t}(L,C)),L},t.fractionDigitsPattern=m,t.minimumIntegerPattern=y,t.groupingPattern=v,t.getWeekData=function(t,e){var i=x,r=o("supplemental.weekData.firstDay",e),n=t;return/en-/.test(n)&&(n=n.slice(3)),n=n.slice(0,2).toUpperCase()+n.substr(2),r&&(i=r[n]||r[n.slice(0,2)]||x),O[i]},t.replaceBlazorCurrency=function(t,e,i){var r=function(t){return o(t||"",Re)}(i);if(e!==r)for(var n=0,s=t;n<s.length;n++){var a=s[n];a.nend=a.nend.replace(e,r),a.nlead=a.nlead.replace(e,r)}},t.getWeekOfYear=function(t){var e,i=new Date(t.getFullYear(),0,1),r=i.getDay();r=r>=0?r:r+7;var n=Math.floor((t.getTime()-i.getTime()-6e4*(t.getTimezoneOffset()-i.getTimezoneOffset()))/864e5)+1;if(r<4){if((e=Math.floor((n+r-1)/7)+1)>52){var o=new Date(t.getFullYear()+1,0,1).getDay();e=(o=o>=0?o:o+7)<4?1:53}}else e=Math.floor((n+r-1)/7);return e}}(Ae||(Ae={}));var ai=/^(.*?):[ \t]*([^\r\n]*)$/gm,li="GET",hi=function(){function t(t,e,i,r){this.mode=!0,this.emitError=!0,this.options={},"string"==typeof t?(this.url=t,this.type=e?e.toUpperCase():li,this.mode=!!c(i)||i):"object"==typeof t&&(this.options=t,h(this,this.options)),this.type=this.type?this.type.toUpperCase():li,this.contentType=void 0!==this.contentType?this.contentType:r}return t.prototype.send=function(t){var e=this;this.data=c(t)?this.data:t;var i={cancel:!1,httpRequest:null};return new Promise(function(t,r){e.httpRequest=new XMLHttpRequest,e.httpRequest.onreadystatechange=function(){e.stateChange(t,r)},c(e.onLoad)||(e.httpRequest.onload=e.onLoad),c(e.onProgress)||(e.httpRequest.onprogress=e.onProgress),c(e.onAbort)||(e.httpRequest.onabort=e.onAbort),c(e.onError)||(e.httpRequest.onerror=e.onError),c(e.onUploadProgress)||(e.httpRequest.upload.onprogress=e.onUploadProgress),e.httpRequest.open(e.type,e.url,e.mode),c(e.data)||null===e.contentType||e.httpRequest.setRequestHeader("Content-Type",e.contentType||"application/json; charset=utf-8"),e.beforeSend&&(i.httpRequest=e.httpRequest,e.beforeSend(i)),i.cancel||e.httpRequest.send(c(e.data)?null:e.data)})},t.prototype.successHandler=function(t){return this.onSuccess&&this.onSuccess(t,this),t},t.prototype.failureHandler=function(t){return this.onFailure&&this.onFailure(this.httpRequest),t},t.prototype.stateChange=function(t,e){var i=this.httpRequest.responseText;if(this.dataType&&"json"===this.dataType.toLowerCase())if(""===i)i=void 0;else try{i=JSON.parse(i)}catch(t){}4===this.httpRequest.readyState&&(this.httpRequest.status>=200&&this.httpRequest.status<=299||304===this.httpRequest.status?t(this.successHandler(i)):this.emitError?e(new Error(this.failureHandler(this.httpRequest.statusText))):t())},t.prototype.getResponseHeader=function(t){var e,i;e={};for(var r=ai.exec(this.httpRequest.getAllResponseHeaders());r;)e[r[1].toLowerCase()]=r[2],r=ai.exec(this.httpRequest.getAllResponseHeaders());return i=e[t.toLowerCase()],c(i)?null:i},t}(),ui=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i,ci=/msie|trident/i,pi=/Trident\/7\./,di=/(ipad|iphone|ipod touch)/i,fi=/(ipad|iphone|ipod touch);.*os 7_\d|(ipad|iphone|ipod touch);.*os 8_\d/i,gi=/android/i,mi=/trident|windows phone|edge/i,yi=/(version)[ /]([\w.]+)/i,bi={OPERA:/(opera|opr)(?:.*version|)[ /]([\w.]+)/i,EDGE:/(edge)(?:.*version|)[ /]([\w.]+)/i,CHROME:/(chrome|crios)[ /]([\w.]+)/i,PANTHOMEJS:/(phantomjs)[ /]([\w.]+)/i,SAFARI:/(safari)[ /]([\w.]+)/i,WEBKIT:/(webkit)[ /]([\w.]+)/i,MSIE:/(msie|trident) ([\w.]+)/i,MOZILLA:/(mozilla)(?:.*? rv:([\w.]+)|)/i};"undefined"!=typeof window&&(window.browserDetails=window.browserDetails||{});var vi,wi=function(){function t(){}return t.extractBrowserDetail=function(){for(var e={culture:{}},i=[],r=0,n=Object.keys(bi);r<n.length;r++){var o=n[r];if(i=t.userAgent.match(bi[o])){if(e.name="opr"===i[1].toLowerCase()?"opera":i[1].toLowerCase(),e.name="crios"===i[1].toLowerCase()?"chrome":e.name,e.version=i[2],e.culture.name=e.culture.language=navigator.language,t.userAgent.match(pi)){e.name="msie";break}var s=t.userAgent.match(yi);"safari"===e.name&&s&&(e.version=s[2]);break}}return e},t.getEvent=function(e){var i={start:{isPointer:"pointerdown",isTouch:"touchstart",isDevice:"mousedown"},move:{isPointer:"pointermove",isTouch:"touchmove",isDevice:"mousemove"},end:{isPointer:"pointerup",isTouch:"touchend",isDevice:"mouseup"},cancel:{isPointer:"pointercancel",isTouch:"touchcancel",isDevice:"mouseleave"}};return t.isPointer?i[e].isPointer:t.isTouch?i[e].isTouch+(t.isDevice?"":" "+i[e].isDevice):i[e].isDevice},t.getTouchStartEvent=function(){return t.getEvent("start")},t.getTouchEndEvent=function(){return t.getEvent("end")},t.getTouchMoveEvent=function(){return t.getEvent("move")},t.getTouchCancelEvent=function(){return t.getEvent("cancel")},t.getValue=function(e,i){var r=window.browserDetails;return"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1&&!0===t.isTouch&&(r.isIos=!0,r.isDevice=!0,r.isTouch=!0,r.isPointer=!0),void 0===r[e]?r[e]=i.test(t.userAgent):r[e]},Object.defineProperty(t,"userAgent",{get:function(){return t.uA},set:function(e){t.uA=e,window.browserDetails={}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"info",{get:function(){return p(window.browserDetails.info)?window.browserDetails.info=t.extractBrowserDetail():window.browserDetails.info},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isIE",{get:function(){return t.getValue("isIE",ci)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isTouch",{get:function(){return p(window.browserDetails.isTouch)?window.browserDetails.isTouch="ontouchstart"in window.navigator||window&&window.navigator&&window.navigator.maxTouchPoints>0||"ontouchstart"in window:window.browserDetails.isTouch},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isPointer",{get:function(){return p(window.browserDetails.isPointer)?window.browserDetails.isPointer="pointerEnabled"in window.navigator:window.browserDetails.isPointer},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isMSPointer",{get:function(){return p(window.browserDetails.isMSPointer)?window.browserDetails.isMSPointer="msPointerEnabled"in window.navigator:window.browserDetails.isMSPointer},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isDevice",{get:function(){return t.getValue("isDevice",ui)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isIos",{get:function(){return t.getValue("isIos",di)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isIos7",{get:function(){return t.getValue("isIos7",fi)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isAndroid",{get:function(){return t.getValue("isAndroid",gi)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isWebView",{get:function(){return p(window.browserDetails.isWebView)?(window.browserDetails.isWebView=!(p(window.cordova)&&p(window.PhoneGap)&&p(window.phonegap)&&"object"!==window.forge),window.browserDetails.isWebView):window.browserDetails.isWebView},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isWindows",{get:function(){return t.getValue("isWindows",mi)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"touchStartEvent",{get:function(){return p(window.browserDetails.touchStartEvent)?window.browserDetails.touchStartEvent=t.getTouchStartEvent():window.browserDetails.touchStartEvent},enumerable:!0,configurable:!0}),Object.defineProperty(t,"touchMoveEvent",{get:function(){return p(window.browserDetails.touchMoveEvent)?window.browserDetails.touchMoveEvent=t.getTouchMoveEvent():window.browserDetails.touchMoveEvent},enumerable:!0,configurable:!0}),Object.defineProperty(t,"touchEndEvent",{get:function(){return p(window.browserDetails.touchEndEvent)?window.browserDetails.touchEndEvent=t.getTouchEndEvent():window.browserDetails.touchEndEvent},enumerable:!0,configurable:!0}),Object.defineProperty(t,"touchCancelEvent",{get:function(){return p(window.browserDetails.touchCancelEvent)?window.browserDetails.touchCancelEvent=t.getTouchCancelEvent():window.browserDetails.touchCancelEvent},enumerable:!0,configurable:!0}),t.uA="undefined"!=typeof navigator?navigator.userAgent:"",t}(),Si=function(){function t(){}return t.addOrGetEventData=function(t){return"__eventList"in t?t.__eventList.events:(t.__eventList={},t.__eventList.events=[])},t.add=function(e,i,r,n,o){var s,a=t.addOrGetEventData(e);s=o?f(r,o):r,n&&(s=s.bind(n));for(var l=i.split(" "),h=0;h<l.length;h++)a.push({name:l[h],listener:r,debounce:s}),wi.isIE?e.addEventListener(l[h],s):e.addEventListener(l[h],s,{passive:!1});return s},t.remove=function(e,i,r){for(var n=t.addOrGetEventData(e),o=i.split(" "),s=function(t){var i,s=-1;n&&0!==n.length&&n.some(function(e,n){return e.name===o[t]&&e.listener===r&&(s=n,i=e.debounce,!0)}),-1!==s&&n.splice(s,1),i&&e.removeEventListener(o[t],i)},a=0;a<o.length;a++)s(a)},t.clearEvents=function(e){var i,r;r=u([],r,i=t.addOrGetEventData(e));for(var n=0;n<r.length;n++)e.removeEventListener(r[n].name,r[n].debounce),i.shift()},t.trigger=function(e,i,r){for(var n=0,o=t.addOrGetEventData(e);n<o.length;n++){var s=o[n];s.name===i&&s.debounce.call(this,r)}},t}(),Pi=/^svg|^path|^g/,Ci=new RegExp("]"),xi=function(){function t(t,e){this.isRendered=!1,this.isComplexArraySetter=!1,this.isServerRendered=!1,this.allowServerDataBinding=!0,this.isProtectedOnChange=!0,this.properties={},this.changedProperties={},this.oldProperties={},this.bulkChanges={},this.refreshing=!1,this.ignoreCollectionWatch=!1,this.finalUpdate=function(){},this.childChangedProperties={},this.modelObserver=new Qe(this),p(e)||(this.element="string"==typeof e?document.querySelector(e):e,c(this.element)||(this.isProtectedOnChange=!1,this.addInstance())),p(t)||this.setProperties(t,!0),this.isDestroyed=!1}return t.prototype.setProperties=function(t,e){var i=this.isProtectedOnChange;this.isProtectedOnChange=!!e,h(this,t),!0!==e?(h(this.changedProperties,t),this.dataBind()):b()&&this.isRendered&&this.serverDataBind(t),this.finalUpdate(),this.changedProperties={},this.oldProperties={},this.isProtectedOnChange=i},t.callChildDataBind=function(t,e){for(var i=0,r=Object.keys(t);i<r.length;i++){var n=r[i];if(e[n]instanceof Array)for(var o=0,s=e[n];o<s.length;o++){var a=s[o];void 0!==a.dataBind&&a.dataBind()}else e[n].dataBind()}},t.prototype.clearChanges=function(){this.finalUpdate(),this.changedProperties={},this.oldProperties={},this.childChangedProperties={}},t.prototype.dataBind=function(){if(t.callChildDataBind(this.childChangedProperties,this),Object.getOwnPropertyNames(this.changedProperties).length){var e=this.isProtectedOnChange,i=this.changedProperties,r=this.oldProperties;this.clearChanges(),this.isProtectedOnChange=!0,this.onPropertyChanged(i,r),this.isProtectedOnChange=e}},t.prototype.serverDataBind=function(t){if(b()){t=t||{},u(this.bulkChanges,{},t,!0);this.allowServerDataBinding&&window.sfBlazor.updateModel&&(window.sfBlazor.updateModel(this),this.bulkChanges={})}},t.prototype.saveChanges=function(t,e,i){if(b()){var r={};r[t]=e,this.serverDataBind(r)}this.isProtectedOnChange||(this.oldProperties[t]=i,this.changedProperties[t]=e,this.finalUpdate(),this.finalUpdate=n(this.dataBind.bind(this)))},t.prototype.addEventListener=function(t,e){this.modelObserver.on(t,e)},t.prototype.removeEventListener=function(t,e){this.modelObserver.off(t,e)},t.prototype.trigger=function(t,e,i,r){var n=this;if(!0!==this.isDestroyed){var s=this.isProtectedOnChange;this.isProtectedOnChange=!1;var a=this.modelObserver.notify(t,e,i,r);if(Ci.test(t)){var l=o(t,this);if(l){if(window.Blazor){var h=l.call(this,e);h&&"function"==typeof h.then?i?h.then(function(t){i&&(t="string"==typeof t&&n.modelObserver.isJson(t)?JSON.parse(t):t,i.call(n,t))}).catch(function(t){r&&(t="string"==typeof t&&n.modelObserver.isJson(t)?JSON.parse(t):t,r.call(n,t))}):a=h:i&&i.call(this,e)}else l.call(this,e),i&&i.call(this,e)}else i&&i.call(this,e)}return this.isProtectedOnChange=s,a}},t.prototype.addInstance=function(){var t="e-"+this.getModuleName().toLowerCase();S([this.element],["e-lib",t]),c(this.element.ej2_instances)?s("ej2_instances",[this],this.element):this.element.ej2_instances.push(this)},t.prototype.destroy=function(){var t=this;this.element.ej2_instances=this.element.ej2_instances.filter(function(e){return e!==t}),P([this.element],["e-"+this.getModuleName()]),0===this.element.ej2_instances.length&&P([this.element],["e-lib"]),this.clearChanges(),this.modelObserver.destroy(),this.isDestroyed=!0},t}(),Oi=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Bi=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Li=function(t){function e(e){var i=t.call(this,e,void 0)||this;return i.easing={ease:"cubic-bezier(0.250, 0.100, 0.250, 1.000)",linear:"cubic-bezier(0.250, 0.250, 0.750, 0.750)",easeIn:"cubic-bezier(0.420, 0.000, 1.000, 1.000)",easeOut:"cubic-bezier(0.000, 0.000, 0.580, 1.000)",easeInOut:"cubic-bezier(0.420, 0.000, 0.580, 1.000)",elasticInOut:"cubic-bezier(0.5,-0.58,0.38,1.81)",elasticIn:"cubic-bezier(0.17,0.67,0.59,1.81)",elasticOut:"cubic-bezier(0.7,-0.75,0.99,1.01)"},i}Oi(e,t),i=e,e.prototype.animate=function(t,e){e=e||{};var r=this.getModel(e);if("string"==typeof t)for(var n=0,o=Array.prototype.slice.call(D(t,document));n<o.length;n++){var s=o[n];r.element=s,i.delayAnimation(r)}else r.element=t,i.delayAnimation(r)},e.stop=function(t,e){t.style.animation="",t.removeAttribute("e-animate");var i=t.getAttribute("e-animation-id");if(i){var r=parseInt(i,10);cancelAnimationFrame(r),t.removeAttribute("e-animation-id")}e&&e.end&&e.end.call(this,e)},e.delayAnimation=function(t){"Disable"===Mi?(t.begin&&t.begin.call(this,t),t.end&&t.end.call(this,t)):t.delay?setTimeout(function(){i.applyAnimation(t)},t.delay):i.applyAnimation(t)},e.applyAnimation=function(t){var e=this;t.timeStamp=0;var i=0,r=0,n=0,o=t.duration;t.element.setAttribute("e-animate","true");var s=function(a){try{if(a){n=0===n?a:n,t.timeStamp=a+t.timeStamp-n,n=a,!i&&t.begin&&t.begin.call(e,t),i+=1;var l=t.timeStamp/i;t.timeStamp<o&&t.timeStamp+l<o&&t.element.getAttribute("e-animate")?(t.element.style.animation=t.name+" "+t.duration+"ms "+t.timingFunction,t.progress&&t.progress.call(e,t),requestAnimationFrame(s)):(cancelAnimationFrame(r),t.element.removeAttribute("e-animation-id"),t.element.removeAttribute("e-animate"),t.element.style.animation="",t.end&&t.end.call(e,t))}else r=requestAnimationFrame(s),t.element.setAttribute("e-animation-id",r.toString())}catch(i){cancelAnimationFrame(r),t.element.removeAttribute("e-animation-id"),t.fail&&t.fail.call(e,i)}};s()},e.prototype.getModel=function(t){return{name:t.name||this.name,delay:t.delay||this.delay,duration:void 0!==t.duration?t.duration:this.duration,begin:t.begin||this.begin,end:t.end||this.end,fail:t.fail||this.fail,progress:t.progress||this.progress,timingFunction:this.easing[t.timingFunction]?this.easing[t.timingFunction]:t.timingFunction||this.easing[this.timingFunction]}},e.prototype.onPropertyChanged=function(t,e){},e.prototype.getModuleName=function(){return"animation"},e.prototype.destroy=function(){};var i;return Bi([G("FadeIn")],e.prototype,"name",void 0),Bi([G(400)],e.prototype,"duration",void 0),Bi([G("ease")],e.prototype,"timingFunction",void 0),Bi([G(0)],e.prototype,"delay",void 0),Bi([W()],e.prototype,"progress",void 0),Bi([W()],e.prototype,"begin",void 0),Bi([W()],e.prototype,"end",void 0),Bi([W()],e.prototype,"fail",void 0),e=i=Bi([U],e)}(xi),Ti=!1,Mi="",Di=function(){function t(t){this.loadedModules=[],this.parent=t}return t.prototype.inject=function(t,e){var i=t.length;if(0!==i){this.loadedModules.length&&this.clearUnusedModule(t);for(var n=0;n<i;n++)for(var o=t[n],a=0,l=e;a<l.length;a++){var h=l[a],u=o.member;if(h.prototype.getModuleName()===o.member&&!this.isModuleLoaded(u)){var c=r(h,o.args),p=this.getMemberName(u);o.isProperty?s(p,h,this.parent):s(p,c,this.parent);var d=o;d.member=p,this.loadedModules.push(d)}}}else this.clean()},t.prototype.clean=function(){for(var t=0,e=this.loadedModules;t<e.length;t++){var i=e[t];i.isProperty||o(i.member,this.parent).destroy()}this.loadedModules=[]},t.prototype.clearUnusedModule=function(t){for(var e=this,i=t.map(function(t){return e.getMemberName(t.member)}),r=0,n=this.loadedModules.filter(function(t){return-1===i.indexOf(t.member)});r<n.length;r++){var s=n[r];s.isProperty||o(s.member,this.parent).destroy(),this.loadedModules.splice(this.loadedModules.indexOf(s),1),a(this.parent,s.member)}},t.prototype.getMemberName=function(t){return t[0].toLowerCase()+t.substring(1)+"Module"},t.prototype.isModuleLoaded=function(t){for(var e=0,i=this.loadedModules;e<i.length;e++){if(i[e].member===this.getMemberName(t))return!0}return!1},t}(),ki=function(){function t(t,e,i,r){this.isComplexArraySetter=!1,this.properties={},this.changedProperties={},this.childChangedProperties={},this.oldProperties={},this.finalUpdate=function(){},this.callChildDataBind=o("callChildDataBind",xi),this.parentObj=t,this.controlParent=this.parentObj.controlParent||this.parentObj,this.propName=e,this.isParentArray=r,this.setProperties(i,!0)}return t.prototype.updateChange=function(t,e){!0===t?this.parentObj.childChangedProperties[e]=t:delete this.parentObj.childChangedProperties[e],this.parentObj.updateChange&&this.parentObj.updateChange(t,this.parentObj.propName)},t.prototype.updateTimeOut=function(){if(this.parentObj.updateTimeOut)this.parentObj.finalUpdate(),this.parentObj.updateTimeOut();else{var t=setTimeout(this.parentObj.dataBind.bind(this.parentObj));this.finalUpdate=function(){clearTimeout(t)}}},t.prototype.clearChanges=function(){this.finalUpdate(),this.updateChange(!1,this.propName),this.oldProperties={},this.changedProperties={}},t.prototype.setProperties=function(t,e){!0===e?(h(this,t),this.updateChange(!1,this.propName),this.clearChanges()):h(this,t)},t.prototype.dataBind=function(){if(this.callChildDataBind(this.childChangedProperties,this),this.isParentArray){var t=this.parentObj[this.propName].indexOf(this);Object.keys(this.changedProperties).length&&(s(this.propName+"."+t,this.changedProperties,this.parentObj.changedProperties),s(this.propName+"."+t,this.oldProperties,this.parentObj.oldProperties))}else this.parentObj.changedProperties[this.propName]=this.changedProperties,this.parentObj.oldProperties[this.propName]=this.oldProperties;this.clearChanges()},t.prototype.saveChanges=function(t,e,i,r){this.controlParent.isProtectedOnChange||(r||this.serverDataBind(t,e,!0),this.oldProperties[t]=i,this.changedProperties[t]=e,this.updateChange(!0,this.propName),this.finalUpdate(),this.updateTimeOut())},t.prototype.serverDataBind=function(t,e,i,r){if(b()&&!this.parentObj.isComplexArraySetter){var n,o={},s=i?this.getParentKey(!0)+"."+t:t;if(-1!==s.indexOf(".")){var a=s.split(".");n=o;for(var l=0;l<a.length;l++){var h=l===a.length-1;n[a[l]]=h?e:{},n=h?n:n[a[l]]}}else o[s]={},n=o[s],o[s][t]=e;if(this.isParentArray){n.ejsAction=r||"none"}this.controlParent.serverDataBind(o)}},t.prototype.getParentKey=function(t){var e="",i=this.propName;if(this.isParentArray){e=this.parentObj[this.propName].indexOf(this);var r=this.parentObj[this.propName].length;r=t?r:r>0?r-1:0,i+=e=-1!==e?"-"+e:"-"+r}return this.controlParent!==this.parentObj&&(i=this.parentObj.getParentKey()+"."+this.propName+e),i},t}(),Ei=[115,121,110,99,102,117,115,105,111,110,46,105,115,76,105,99,86,97,108,105,100,97,116,101,100],ji=function(){function t(t){this.isValidated=!1,this.version="20.2",this.platform=/JavaScript|ASPNET|ASPNETCORE|ASPNETMVC|FileFormats/i,this.errors={noLicense:'This application was built using a trial version of Syncfusion Essential Studio. Please include a valid license to permanently remove this license validation message. You can also obtain a free 30 day evaluation license to temporarily remove this message during the evaluation period. Please refer to this <a style="color:yellow;text-decoration:none;"href="https://help.syncfusion.com/common/essential-studio/licensing">help topic</a> for more information.',trailExpired:'Your Syncfusion trial license has expired. Please refer to this <a style="color:yellow;text-decoration:none;"href="https://help.syncfusion.com/common/essential-studio/licensing/licensing-errors#trial-expired">help topic</a> for more information.',versionMismatched:'The included Syncfusion license (v##LicenseVersion) is invalid for version ##Requireversion. Please refer to this <a style="color:yellow;text-decoration:none;" href="https://help.syncfusion.com/es/licensing/version-mismatch/">help topic</a> for more information.',platformMismatched:'The included Syncfusion license is invalid (Platform mismatch). Please refer to this <a style="color:yellow;text-decoration:none;" href="https://help.syncfusion.com/common/essential-studio/licensing/licensing-errors#platform-mismatch">help topic</a> for more information.',invalidKey:'The included Syncfusion license is invalid. Please refer to this <a style="color:yellow;text-decoration:none;" href="https://help.syncfusion.com/common/essential-studio/licensing/licensing-errors#invalid-key">help topic</a> for more information.'},this.manager=function(){var t=null;return{setKey:function(e){t=e},getKey:function(){return t}}}(),this.npxManager=function(){var t="npxKeyReplace";return{getKey:function(){return t}}}(),this.manager.setKey(t)}return t.prototype.validate=function(){if(!this.isValidated&&De&&!o(Z(Ei),De)&&!o("Blazor",De)){var t=void 0;if(this.manager&&this.manager.getKey()||this.npxManager&&"npxKeyReplace"!=this.npxManager.getKey()){var e=this.getInfoFromKey();if(e&&e.length)for(var i=0,r=e;i<r.length;i++){var n=r[i];if(!this.platform.test(n.platform)||n.invalidPlatform)t=this.errors.platformMismatched;else if(-1===n.version.indexOf(this.version))t=(t=(t=this.errors.versionMismatched).replace("##LicenseVersion",n.version)).replace("##Requireversion",this.version+".x");else if(n.expiryDate){var a=new Date(n.expiryDate),l=new Date;if(!(a!==l&&a<l))break;t=this.errors.trailExpired}}else t=this.errors.invalidKey}else t=this.errors.noLicense;if(t&&"undefined"!=typeof document&&!c(document)){var h=w("div",{innerHTML:t+'<span style="position:absolute;right: 10px;top:27%;cursor:pointer;"onClick=this.parentElement.remove();><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><line x1="5" y1="5" x2="15" y2="15" stroke="yellow" stroke-width="2.5" stroke-miterlimit="10" stroke-linecap="round"></line><line x1="15" y1="5" x2="5" y2="15" stroke="yellow" stroke-width="2.5" stroke-linecap="round" stroke-miterlimit="10"></line></svg></span>',styles:'position:fixed;top:0;left:0;right:0;font-family:"Segoe UI";font-size:16px;background:repeating-linear-gradient(45deg,#d70f0f,#d70f0f 10px,#e12121 10px,#e12121 17px);color:#ffffff;z-index:999999999;text-align:center;padding:10px 50px 10px 25px;'});h.setAttribute("id","js-licensing"),document.body.appendChild(h)}this.isValidated=!0,s(Z(Ei),this.isValidated,De)}},t.prototype.getDecryptedData=function(t){try{return atob(t)}catch(t){return""}},t.prototype.getInfoFromKey=function(){try{var t="",e=[5439488,7929856,5111808,6488064,4587520,7667712,5439488,6881280,5177344,7208960,4194304,4456448,6619136,7733248,5242880,7077888,6356992,7602176,4587520,7274496,7471104,7143424],i=[],r=[],n=!1,o=!1;this.manager.getKey()?t=this.manager.getKey():(o=!0,t=this.npxManager.getKey().split("npxKeyReplace")[1]);for(var s=0,a=t.split(";");s<a.length;s++){var l=a[s],h=this.getDecryptedData(l);if(h){var u=0,c="";if(o){var p=h[h.length-1],d=[];for(f=0;f<h.length;f++)d[f]=h[f].charCodeAt(0)-p.charCodeAt(0);for(f=0;f<d.length;f++)c+=String.fromCharCode(d[f])}else for(var f=0;f<h.length;f++,u++){u===e.length&&(u=0);var g=h.charCodeAt(f);c+=String.fromCharCode(g^e[u]>>16)}this.platform.test(c)?(n=!1,(i=c.split(";")).length>3&&r.push({platform:i[0],version:i[1],expiryDate:i[2]})):c&&c.split(";").length>3&&(n=!0)}}return n&&!r.length?[{invalidPlatform:n}]:r.length?r:null}catch(t){return null}},t}(),Ii=new ji,Ri=function(t){t&&tt(t),Ii.validate()},Ai=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ni=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Fi=0,Vi=0,zi=!1,Gi=function(t){function e(e,i){var r=t.call(this,e,i)||this;return r.randomId=v(),r.isStringTemplate=!1,r.needsID=!1,r.isReactHybrid=!1,c(r.enableRtl)&&r.setProperties({enableRtl:ti},!0),c(r.locale)&&r.setProperties({locale:ii},!0),r.moduleLoader=new Di(r),r.localObserver=new Qe(r),Ze.on("notifyExternalChange",r.detectFunction,r,r.randomId),Ri(),p(i)||r.appendTo(),r}return Ai(e,t),e.prototype.requiredModules=function(){return[]},e.prototype.destroy=function(){this.isDestroyed||(this.enablePersistence&&this.setPersistData(),this.localObserver.destroy(),this.refreshing||(P([this.element],["e-control"]),this.trigger("destroyed",{cancel:!1}),t.prototype.destroy.call(this),this.moduleLoader.clean(),Ze.off("notifyExternalChange",this.detectFunction,this.randomId)))},e.prototype.refresh=function(){this.refreshing=!0,this.moduleLoader.clean(),this.destroy(),this.clearChanges(),this.localObserver=new Qe(this),this.preRender(),this.injectModules(),this.render(),this.refreshing=!1},e.prototype.accessMount=function(){this.mount&&!this.isReactHybrid&&this.mount()},e.prototype.getRootElement=function(){return this.isReactHybrid?this.actualElement:this.element},e.prototype.getLocalData=function(){var t=this.getModuleName()+this.element.id;return zi?window.localStorage.getItem(t+this.ej2StatePersistenceVersion):window.localStorage.getItem(t)},e.prototype.appendTo=function(e){if(c(e)||"string"!=typeof e?c(e)||(this.element=e):this.element=M(e,document),!c(this.element)){var i="e-"+this.getModuleName().toLowerCase();S([this.element],["e-control",i]),this.isProtectedOnChange=!1,this.needsID&&!this.element.id&&(this.element.id=this.getUniqueID(this.getModuleName())),this.enablePersistence&&(this.mergePersistData(),window.addEventListener("unload",this.setPersistData.bind(this)));var r=o("ej2_instances",this.element);r&&-1!==r.indexOf(this)||t.prototype.addInstance.call(this),this.preRender(),this.injectModules(),this.render(),this.mount?this.accessMount():this.trigger("created")}},e.prototype.renderComplete=function(t){if(b()){window.sfBlazor.renderComplete(this.element,t)}this.isRendered=!0},e.prototype.dataBind=function(){this.injectModules(),t.prototype.dataBind.call(this)},e.prototype.on=function(t,e,i){if("string"==typeof t)this.localObserver.on(t,e,i);else for(var r=0,n=t;r<n.length;r++){var o=n[r];this.localObserver.on(o.event,o.handler,o.context)}},e.prototype.off=function(t,e){if("string"==typeof t)this.localObserver.off(t,e);else for(var i=0,r=t;i<r.length;i++){var n=r[i];this.localObserver.off(n.event,n.handler)}},e.prototype.notify=function(t,e){!0!==this.isDestroyed&&this.localObserver.notify(t,e)},e.prototype.getInjectedModules=function(){return this.injectedModules},e.Inject=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.prototype.injectedModules||(this.prototype.injectedModules=[]);for(var i=0;i<t.length;i++)-1===this.prototype.injectedModules.indexOf(t[i])&&this.prototype.injectedModules.push(t[i])},e.prototype.createElement=function(t,e,i){return w(t,e)},e.prototype.triggerStateChange=function(t,e){this.isReactHybrid&&(this.setState(),this.currentContext={calls:t,args:e})},e.prototype.injectModules=function(){this.injectedModules&&this.injectedModules.length&&this.moduleLoader.inject(this.requiredModules(),this.injectedModules)},e.prototype.detectFunction=function(t){var e=Object.keys(t);e.length&&(this[e[0]]=t[e[0]])},e.prototype.mergePersistData=function(){var t;c(t=zi?window.localStorage.getItem(this.getModuleName()+this.element.id+this.ej2StatePersistenceVersion):window.localStorage.getItem(this.getModuleName()+this.element.id))||""===t||this.setProperties(JSON.parse(t),!0)},e.prototype.setPersistData=function(){this.isDestroyed||(zi?window.localStorage.setItem(this.getModuleName()+this.element.id+this.ej2StatePersistenceVersion,this.getPersistData()):window.localStorage.setItem(this.getModuleName()+this.element.id,this.getPersistData()))},e.prototype.renderReactTemplates=function(){},e.prototype.clearTemplate=function(t,e){},e.prototype.getUniqueID=function(t){return this.isHistoryChanged()&&(Fi=0),vi=this.pageID(location.href),Vi=history.length,t+"_"+vi+"_"+Fi++},e.prototype.pageID=function(t){var e=0;if(0===t.length)return e;for(var i=0;i<t.length;i++){e=(e<<5)-e+t.charCodeAt(i),e&=e}return Math.abs(e)},e.prototype.isHistoryChanged=function(){return vi!==this.pageID(location.href)||Vi!==history.length},e.prototype.addOnPersist=function(t){for(var e=this,i={},r=0,n=t;r<n.length;r++){var a=n[r],l=void 0;p(l=o(a,this))||s(a,this.getActualProperties(l),i)}return JSON.stringify(i,function(t,i){return e.getActualProperties(i)})},e.prototype.getActualProperties=function(t){return t instanceof ki?o("properties",t):t},e.prototype.ignoreOnPersist=function(t){return JSON.stringify(this.iterateJsonProperties(this.properties,t))},e.prototype.iterateJsonProperties=function(t,e){for(var i={},r=function(r){if(-1===e.indexOf(r)){var o=t[r];if("object"!=typeof o||o instanceof Array)i[r]=o;else{var s=e.filter(function(t){return new RegExp(r+".").test(t)}).map(function(t){return t.replace(r+".","")});i[r]=n.iterateJsonProperties(n.getActualProperties(o),s)}}},n=this,o=0,s=Object.keys(t);o<s.length;o++){r(s[o])}return i},Ni([G(!1)],e.prototype,"enablePersistence",void 0),Ni([G()],e.prototype,"enableRtl",void 0),Ni([G()],e.prototype,"locale",void 0),e=Ni([U],e)}(xi);"undefined"!=typeof window&&window.addEventListener("popstate",function(){Fi=0});var _i,Hi=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Wi=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Ui={left:0,top:0,bottom:0,right:0},qi={isDragged:!1},Ki=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hi(e,t),Wi([G(0)],e.prototype,"left",void 0),Wi([G(0)],e.prototype,"top",void 0),e}(ki),Yi=function(t){function e(e,r){var n=t.call(this,r,e)||this;return n.dragLimit=i.getDefaultPosition(),n.borderWidth=i.getDefaultPosition(),n.padding=i.getDefaultPosition(),n.diffX=0,n.prevLeft=0,n.prevTop=0,n.dragProcessStarted=!1,n.eleTop=0,n.tapHoldTimer=0,n.externalInitialize=!1,n.diffY=0,n.parentScrollX=0,n.parentScrollY=0,n.droppables={},n.bind(),n}Hi(e,t),i=e,e.prototype.bind=function(){this.toggleEvents(),wi.isIE&&S([this.element],"e-block-touch"),this.droppables[this.scope]={}},e.getDefaultPosition=function(){return u({},Ui)},e.prototype.toggleEvents=function(t){var e;p(this.handle)||(e=M(this.handle,this.element));var i=this.enableTapHold&&wi.isDevice&&wi.isTouch?this.mobileInitialize:this.initialize;t?Si.remove(e||this.element,wi.touchStartEvent,i):Si.add(e||this.element,wi.touchStartEvent,i,this)},e.prototype.mobileInitialize=function(t){var e=this,i=t.currentTarget;this.tapHoldTimer=setTimeout(function(){e.externalInitialize=!0,e.removeTapholdTimer(),e.initialize(t,i)},this.tapHoldThreshold),Si.add(document,wi.touchMoveEvent,this.removeTapholdTimer,this),Si.add(document,wi.touchEndEvent,this.removeTapholdTimer,this)},e.prototype.removeTapholdTimer=function(){clearTimeout(this.tapHoldTimer),Si.remove(document,wi.touchMoveEvent,this.removeTapholdTimer),Si.remove(document,wi.touchEndEvent,this.removeTapholdTimer)},e.prototype.getScrollableParent=function(t,e){return c(t)?null:t[{vertical:"scrollHeight",horizontal:"scrollWidth"}[e]]>t[{vertical:"clientHeight",horizontal:"clientWidth"}[e]]&&("vertical"===e?t.scrollTop>0:t.scrollLeft>0)?("vertical"===e?(this.parentScrollY=this.parentScrollY+(0===this.parentScrollY?t.scrollTop:t.scrollTop-this.parentScrollY),this.tempScrollHeight=t.scrollHeight):(this.parentScrollX=this.parentScrollX+(0===this.parentScrollX?t.scrollLeft:t.scrollLeft-this.parentScrollX),this.tempScrollWidth=t.scrollWidth),c(t)?t:this.getScrollableParent(t.parentNode,e)):this.getScrollableParent(t.parentNode,e)},e.prototype.getScrollableValues=function(){this.parentScrollX=0,this.parentScrollY=0;this.element.classList.contains("e-dialog")&&this.element.classList.contains("e-dlg-modal"),this.getScrollableParent(this.element.parentNode,"vertical"),this.getScrollableParent(this.element.parentNode,"horizontal")},e.prototype.initialize=function(t,e){if(this.currentStateTarget=t.target,!this.isDragStarted()){if(this.isDragStarted(!0),this.externalInitialize=!1,this.target=t.currentTarget||e,this.dragProcessStarted=!1,this.abort){var i=this.abort;"string"==typeof i&&(i=[i]);for(var r=0;r<i.length;r++)if(!c(E(t.target,i[r])))return void(this.isDragStarted()&&this.isDragStarted(!0))}this.preventDefault&&!p(t.changedTouches)&&"touchstart"!==t.type&&t.preventDefault(),this.element.setAttribute("aria-grabbed","true");var n=this.getCoordinates(t);if(this.initialPosition={x:n.pageX,y:n.pageY},!this.clone){var o=this.element.getBoundingClientRect();this.getScrollableValues(),t.clientX===t.pageX&&(this.parentScrollX=0),t.clientY===t.pageY&&(this.parentScrollY=0),this.relativeXPosition=n.pageX-(o.left+this.parentScrollX),this.relativeYPosition=n.pageY-(o.top+this.parentScrollY)}this.externalInitialize?this.intDragStart(t):(Si.add(document,wi.touchMoveEvent,this.intDragStart,this),Si.add(document,wi.touchEndEvent,this.intDestroy,this)),this.toggleEvents(!0),"touchstart"!==t.type&&this.isPreventSelect&&document.body.classList.add("e-prevent-select"),this.externalInitialize=!1,Si.trigger(document.documentElement,wi.touchStartEvent,t)}},e.prototype.intDragStart=function(t){this.removeTapholdTimer();var e=!p(t.changedTouches);if(!e||1===t.changedTouches.length){e&&t.preventDefault();var i,r=this.getCoordinates(t),n=getComputedStyle(this.element);this.margin={left:parseInt(n.marginLeft,10),top:parseInt(n.marginTop,10),right:parseInt(n.marginRight,10),bottom:parseInt(n.marginBottom,10)};var o=this.element;if(this.clone&&this.dragTarget){var s=E(t.target,this.dragTarget);c(s)||(o=s)}this.isReplaceDragEle&&(o=this.currentStateCheck(t.target,o)),this.offset=this.calculateParentPosition(o),this.position=this.getMousePosition(t,this.isDragScroll);var a=this.initialPosition.x-r.pageX,l=this.initialPosition.y-r.pageY;if(Math.sqrt(a*a+l*l)>=this.distance||this.externalInitialize){var h=this.getHelperElement(t);if(!h||c(h))return;var u=this.helperElement=h;if(this.parentClientRect=this.calculateParentPosition(u.offsetParent),this.dragStart){var d={event:t,element:o,target:this.getProperTargetElement(t),bindEvents:b()?this.bindDragEvents.bind(this):null,dragElement:u};this.trigger("dragStart",d)}this.dragArea?this.setDragArea():(this.dragLimit={left:0,right:0,bottom:0,top:0},this.borderWidth={top:0,left:0}),i={left:this.position.left-this.parentClientRect.left,top:this.position.top-this.parentClientRect.top},this.clone&&!this.enableTailMode&&(this.diffX=this.position.left-this.offset.left,this.diffY=this.position.top-this.offset.top),this.getScrollableValues();var f=getComputedStyle(o),g=parseFloat(f.marginTop);this.clone&&0!==g&&(i.top+=g),this.eleTop=isNaN(parseFloat(f.top))?0:parseFloat(f.top)-this.offset.top,this.enableScrollHandler&&!this.clone&&(i.top-=this.parentScrollY,i.left-=this.parentScrollX);var m=this.getProcessedPositionValue({top:i.top-this.diffY+"px",left:i.left-this.diffX+"px"});this.dragElePosition={top:i.top,left:i.left},j(u,this.getDragPosition({position:"absolute",left:m.left,top:m.top})),Si.remove(document,wi.touchMoveEvent,this.intDragStart),Si.remove(document,wi.touchEndEvent,this.intDestroy),b()||this.bindDragEvents(u)}}},e.prototype.bindDragEvents=function(t){x(t)?(Si.add(document,wi.touchMoveEvent,this.intDrag,this),Si.add(document,wi.touchEndEvent,this.intDragStop,this),this.setGlobalDroppables(!1,this.element,t)):(this.toggleEvents(),document.body.classList.remove("e-prevent-select"))},e.prototype.elementInViewport=function(t){for(this.top=t.offsetTop,this.left=t.offsetLeft,this.width=t.offsetWidth,this.height=t.offsetHeight;t.offsetParent;)t=t.offsetParent,this.top+=t.offsetTop,this.left+=t.offsetLeft;return this.top>=window.pageYOffset&&this.left>=window.pageXOffset&&this.top+this.height<=window.pageYOffset+window.innerHeight&&this.left+this.width<=window.pageXOffset+window.innerWidth},e.prototype.getProcessedPositionValue=function(t){return this.queryPositionInfo?this.queryPositionInfo(t):t},e.prototype.calculateParentPosition=function(t){if(c(t))return{left:0,top:0};var e=t.getBoundingClientRect(),i=getComputedStyle(t);return{left:e.left+window.pageXOffset-parseInt(i.marginLeft,10),top:e.top+window.pageYOffset-parseInt(i.marginTop,10)}},e.prototype.intDrag=function(t){if(p(t.changedTouches)||1===t.changedTouches.length){this.clone&&t.changedTouches&&wi.isDevice&&wi.isTouch&&t.preventDefault();var e,i;this.position=this.getMousePosition(t,this.isDragScroll);var r=this.getDocumentWidthHeight("Height");r<this.position.top&&(this.position.top=r);var n=this.getDocumentWidthHeight("Width");if(n<this.position.left&&(this.position.left=n),this.drag){var o=this.getProperTargetElement(t);this.trigger("drag",{event:t,element:this.element,target:o})}var s=this.checkTargetElement(t);if(s.target&&s.instance){var a=!0;this.hoverObject&&(this.hoverObject.instance!==s.instance?this.triggerOutFunction(t,s):a=!1),a&&(s.instance.dragData[this.scope]=this.droppables[this.scope],s.instance.intOver(t,s.target),this.hoverObject=s)}else this.hoverObject&&this.triggerOutFunction(t,s);var l=this.droppables[this.scope].helper;this.parentClientRect=this.calculateParentPosition(this.helperElement.offsetParent);var h=this.parentClientRect.left,u=this.parentClientRect.top,d=this.getCoordinates(t),f=d.pageX,g=d.pageY,m=this.position.left-this.diffX,y=this.position.top-this.diffY,b=getComputedStyle(l);if(this.dragArea){if(this.pageX!==f||this.skipDistanceCheck){var v=l.offsetWidth+(parseFloat(b.marginLeft)+parseFloat(b.marginRight));e=this.dragLimit.left>m&&m>0?this.dragLimit.left:this.dragLimit.right+window.pageXOffset<m+v&&m>0?m-(m-this.dragLimit.right)+window.pageXOffset-v:m<0?this.dragLimit.left:m}if(this.pageY!==g||this.skipDistanceCheck){var w=l.offsetHeight+(parseFloat(b.marginTop)+parseFloat(b.marginBottom));i=this.dragLimit.top>y&&y>0?this.dragLimit.top:this.dragLimit.bottom+window.pageYOffset<y+w&&y>0?y-(y-this.dragLimit.bottom)+window.pageYOffset-w:y<0?this.dragLimit.top:y}}else e=m,i=y;var S=u+this.borderWidth.top,P=h+this.borderWidth.left;this.dragProcessStarted&&(c(i)&&(i=this.prevTop),c(e)&&(e=this.prevLeft));var C,x;this.dragArea?(this.dragLimit.top=this.clone?this.dragLimit.top:0,C=i-S<0?this.dragLimit.top:i-S,x=e-P<0?this.dragElePosition.left:e-P):(C=i-S,x=e-P);var O=parseFloat(getComputedStyle(this.element).marginTop);if(O>0&&(this.clone&&(C+=O,y<0&&(O+y>=0?C=O+y:C-=O),C=this.dragLimit.bottom<C?this.dragLimit.bottom:C),i-S<0))if(y+O+(l.offsetHeight-S)>=0){var B=this.dragLimit.top+y-S;B+O+S<0?C-=O+S:C=B}else C-=O+S;this.enableScrollHandler&&!this.clone&&(C-=this.parentScrollY,x-=this.parentScrollX);var L=this.getProcessedPositionValue({top:C+"px",left:x+"px"});j(l,this.getDragPosition(L)),this.elementInViewport(l)||!this.enableAutoScroll||this.helperElement.classList.contains("e-treeview")||this.helperElement.scrollIntoView();var T=document.querySelectorAll(":hover");if(this.enableAutoScroll&&this.helperElement.classList.contains("e-treeview")){0===T.length&&(T=this.getPathElements(t));var M=this.getScrollParent(T,!1);this.elementInViewport(this.helperElement)?this.getScrollPosition(M,C):this.elementInViewport(this.helperElement)||(0===(T=[].slice.call(document.querySelectorAll(":hover"))).length&&(T=this.getPathElements(t)),M=this.getScrollParent(T,!0),this.getScrollPosition(M,C))}this.dragProcessStarted=!0,this.prevLeft=e,this.prevTop=i,this.position.left=e,this.position.top=i,this.pageX=f,this.pageY=g}},e.prototype.getScrollParent=function(t,e){for(var i,r=e?t.reverse():t,n=r.length-1;n>=0;n--)if(("auto"===(i=window.getComputedStyle(r[n])["overflow-y"])||"scroll"===i)&&r[n].scrollHeight>r[n].clientHeight)return r[n];if("visible"===(i=window.getComputedStyle(document.scrollingElement)["overflow-y"]))return document.scrollingElement.style.overflow="auto",document.scrollingElement},e.prototype.getScrollPosition=function(t,e){t&&t===document.scrollingElement?t.clientHeight-t.getBoundingClientRect().top-this.helperElement.clientHeight<e&&t.getBoundingClientRect().height>e?t.scrollTop+=this.helperElement.clientHeight:t.scrollHeight-t.clientHeight>e&&(t.scrollTop-=this.helperElement.clientHeight):t&&t!==document.scrollingElement&&(t.clientHeight+t.getBoundingClientRect().top-this.helperElement.clientHeight<e?t.scrollTop+=this.helperElement.clientHeight:t.getBoundingClientRect().top>e-this.helperElement.clientHeight&&(t.scrollTop-=this.helperElement.clientHeight))},e.prototype.getPathElements=function(t){var e=t.clientX>0?t.clientX:0,i=t.clientY>0?t.clientY:0;return document.elementsFromPoint(e,i)},e.prototype.triggerOutFunction=function(t,e){this.hoverObject.instance.intOut(t,e.target),this.hoverObject.instance.dragData[this.scope]=null,this.hoverObject=null},e.prototype.getDragPosition=function(t){var e=u({},t);return this.axis&&("x"===this.axis?delete e.top:"y"===this.axis&&delete e.left),e},e.prototype.getDocumentWidthHeight=function(t){var e=document.body,i=document.documentElement;return Math.max(e["scroll"+t],i["scroll"+t],e["offset"+t],i["offset"+t],i["client"+t])},e.prototype.intDragStop=function(t){if(this.dragProcessStarted=!1,p(t.changedTouches)||1===t.changedTouches.length){if(-1!==["touchend","pointerup","mouseup"].indexOf(t.type)){if(this.dragStop){var e=this.getProperTargetElement(t);this.trigger("dragStop",{event:t,element:this.element,target:e,helper:this.helperElement})}this.intDestroy(t)}else this.element.setAttribute("aria-grabbed","false");var i=this.checkTargetElement(t);i.target&&i.instance&&(i.instance.dragStopCalled=!0,i.instance.dragData[this.scope]=this.droppables[this.scope],i.instance.intDrop(t,i.target)),this.setGlobalDroppables(!0),document.body.classList.remove("e-prevent-select")}},e.prototype.intDestroy=function(t){this.dragProcessStarted=!1,this.toggleEvents(),document.body.classList.remove("e-prevent-select"),this.element.setAttribute("aria-grabbed","false"),Si.remove(document,wi.touchMoveEvent,this.intDragStart),Si.remove(document,wi.touchEndEvent,this.intDragStop),Si.remove(document,wi.touchEndEvent,this.intDestroy),Si.remove(document,wi.touchMoveEvent,this.intDrag),this.isDragStarted()&&this.isDragStarted(!0)},e.prototype.onPropertyChanged=function(t,e){},e.prototype.getModuleName=function(){return"draggable"},e.prototype.isDragStarted=function(t){return t&&(qi.isDragged=!qi.isDragged),qi.isDragged},e.prototype.setDragArea=function(){var t,e,i,r=0,n=0;if(i="string"===typeof this.dragArea?M(this.dragArea):this.dragArea){var o=i.getBoundingClientRect();t=i.scrollWidth?i.scrollWidth:o.right-o.left,e=i.scrollHeight?i.scrollHeight:o.bottom-o.top;for(var s=["Top","Left","Bottom","Right"],a=getComputedStyle(i),l=0;l<s.length;l++){var h=s[l],u=a["border"+h+"Width"],c=a["padding"+h],p=h.toLowerCase();this.borderWidth[p]=isNaN(parseFloat(u))?0:parseFloat(u),this.padding[p]=isNaN(parseFloat(c))?0:parseFloat(c)}r=o.top,n=o.left,this.dragLimit.left=n+this.borderWidth.left+this.padding.left,this.dragLimit.top=i.offsetTop+this.borderWidth.top+this.padding.top,this.dragLimit.right=n+t-(this.borderWidth.right+this.padding.right),this.dragLimit.bottom=r+e-(this.borderWidth.bottom+this.padding.bottom)}},e.prototype.getProperTargetElement=function(t){var e,i=this.getCoordinates(t),r=this.helperElement.style.pointerEvents||"";return g(t.target,this.helperElement)||-1!==t.type.indexOf("touch")?(this.helperElement.style.pointerEvents="none",e=document.elementFromPoint(i.clientX,i.clientY),this.helperElement.style.pointerEvents=r):e=t.target,e},e.prototype.currentStateCheck=function(t,e){return c(this.currentStateTarget)||this.currentStateTarget===t?c(e)?t:e:this.currentStateTarget},e.prototype.getMousePosition=function(t,e){var i,r,n=void 0!==t.srcElement?t.srcElement:t.target,o=this.getCoordinates(t),s=c(n.offsetParent);return e?(i=this.clone?o.pageX:o.pageX+(s?0:n.offsetParent.scrollLeft)-this.relativeXPosition,r=this.clone?o.pageY:o.pageY+(s?0:n.offsetParent.scrollTop)-this.relativeYPosition):(i=this.clone?o.pageX:o.pageX+window.pageXOffset-this.relativeXPosition,r=this.clone?o.pageY:o.pageY+window.pageYOffset-this.relativeYPosition),{left:i-(this.margin.left+this.cursorAt.left),top:r-(this.margin.top+this.cursorAt.top)}},e.prototype.getCoordinates=function(t){return t.type.indexOf("touch")>-1?t.changedTouches[0]:t},e.prototype.getHelperElement=function(t){var e;return this.clone?this.helper?e=this.helper({sender:t,element:this.target}):(e=w("div",{className:"e-drag-helper e-block-touch",innerHTML:"Draggable"}),document.body.appendChild(e)):e=this.element,e},e.prototype.setGlobalDroppables=function(t,e,i){this.droppables[this.scope]=t?null:{draggable:e,helper:i,draggedElement:this.element}},e.prototype.checkTargetElement=function(t){var e=this.getProperTargetElement(t),i=this.getDropInstance(e);if(!i&&e&&!c(e.parentNode)){var r=E(e.parentNode,".e-droppable")||e.parentElement;r&&(i=this.getDropInstance(r))}return{target:e,instance:i}},e.prototype.getDropInstance=function(t){var e,i=t&&t.ej2_instances;if(i)for(var r=0,n=i;r<n.length;r++){var o=n[r];if("droppable"===o.getModuleName()){e=o;break}}return e},e.prototype.destroy=function(){this.toggleEvents(!0),t.prototype.destroy.call(this)};var i;return Wi([_({},Ki)],e.prototype,"cursorAt",void 0),Wi([G(!0)],e.prototype,"clone",void 0),Wi([G()],e.prototype,"dragArea",void 0),Wi([G()],e.prototype,"isDragScroll",void 0),Wi([G()],e.prototype,"isReplaceDragEle",void 0),Wi([G(!0)],e.prototype,"isPreventSelect",void 0),Wi([W()],e.prototype,"drag",void 0),Wi([W()],e.prototype,"dragStart",void 0),Wi([W()],e.prototype,"dragStop",void 0),Wi([G(1)],e.prototype,"distance",void 0),Wi([G()],e.prototype,"handle",void 0),Wi([G()],e.prototype,"abort",void 0),Wi([G()],e.prototype,"helper",void 0),Wi([G("default")],e.prototype,"scope",void 0),Wi([G("")],e.prototype,"dragTarget",void 0),Wi([G()],e.prototype,"axis",void 0),Wi([G()],e.prototype,"queryPositionInfo",void 0),Wi([G(!1)],e.prototype,"enableTailMode",void 0),Wi([G(!1)],e.prototype,"skipDistanceCheck",void 0),Wi([G(!0)],e.prototype,"preventDefault",void 0),Wi([G(!1)],e.prototype,"enableAutoScroll",void 0),Wi([G(!1)],e.prototype,"enableTapHold",void 0),Wi([G(750)],e.prototype,"tapHoldThreshold",void 0),Wi([G(!1)],e.prototype,"enableScrollHandler",void 0),e=i=Wi([U],e)}(xi),$i=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ji=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Xi=function(t){function e(e,i){var r=t.call(this,i,e)||this;return r.mouseOver=!1,r.dragData={},r.dragStopCalled=!1,r.bind(),r}return $i(e,t),e.prototype.bind=function(){this.wireEvents()},e.prototype.wireEvents=function(){Si.add(this.element,wi.touchEndEvent,this.intDrop,this)},e.prototype.onPropertyChanged=function(t,e){},e.prototype.getModuleName=function(){return"droppable"},e.prototype.intOver=function(t,e){if(!this.mouseOver){var i=this.dragData[this.scope];this.trigger("over",{event:t,target:e,dragData:i}),this.mouseOver=!0}},e.prototype.intOut=function(t,e){this.mouseOver&&(this.trigger("out",{evt:t,target:e}),this.mouseOver=!1)},e.prototype.intDrop=function(t,e){if(this.dragStopCalled){this.dragStopCalled=!1;var i,r=!0,n=this.dragData[this.scope],o=!!n&&(n.helper&&x(n.helper));o&&(i=this.isDropArea(t,n.helper,e),this.accept&&(r=I(n.helper,this.accept))),o&&this.drop&&i.canDrop&&r&&this.trigger("drop",{event:t,target:i.target,droppedElement:n.helper,dragData:n}),this.mouseOver=!1}},e.prototype.isDropArea=function(t,e,i){var r={canDrop:!0,target:i||t.target},n="touchend"===t.type;if(n||r.target===e){e.style.display="none";var o=n?t.changedTouches[0]:t,s=document.elementFromPoint(o.clientX,o.clientY);r.canDrop=!1,r.canDrop=g(s,this.element),r.canDrop&&(r.target=s),e.style.display=""}return r},e.prototype.destroy=function(){Si.remove(this.element,wi.touchEndEvent,this.intDrop),t.prototype.destroy.call(this)},Ji([G()],e.prototype,"accept",void 0),Ji([G("default")],e.prototype,"scope",void 0),Ji([W()],e.prototype,"drop",void 0),Ji([W()],e.prototype,"over",void 0),Ji([W()],e.prototype,"out",void 0),e=Ji([U],e)}(xi),Qi=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Zi=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},tr={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,space:32,escape:27,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,semicolon:186,plus:187,comma:188,minus:189,dot:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},er=function(t){function e(e,r){var n=t.call(this,r,e)||this;return n.keyPressHandler=function(t){for(var e=t.altKey,r=t.ctrlKey,o=t.shiftKey,s=t.which,a=0,l=Object.keys(n.keyConfigs);a<l.length;a++)for(var h=l[a],u=0,c=n.keyConfigs[h].split(",");u<c.length;u++){var p=c[u],d=i.getKeyConfigData(p.trim());e===d.altKey&&r===d.ctrlKey&&o===d.shiftKey&&s===d.keyCode&&(t.action=h,n.keyAction&&n.keyAction(t))}},n.bind(),n}Qi(e,t),i=e,e.prototype.destroy=function(){this.unwireEvents(),t.prototype.destroy.call(this)},e.prototype.onPropertyChanged=function(t,e){},e.prototype.bind=function(){this.wireEvents()},e.prototype.getModuleName=function(){return"keyboard"},e.prototype.wireEvents=function(){this.element.addEventListener(this.eventName,this.keyPressHandler)},e.prototype.unwireEvents=function(){this.element.removeEventListener(this.eventName,this.keyPressHandler)},e.getKeyConfigData=function(t){if(t in this.configCache)return this.configCache[t];var e=t.toLowerCase().split("+"),r={altKey:-1!==e.indexOf("alt"),ctrlKey:-1!==e.indexOf("ctrl"),shiftKey:-1!==e.indexOf("shift"),keyCode:null};return e[e.length-1].length>1&&Number(e[e.length-1])?r.keyCode=Number(e[e.length-1]):r.keyCode=i.getKeyCode(e[e.length-1]),i.configCache[t]=r,r},e.getKeyCode=function(t){return tr[t]||t.toUpperCase().charCodeAt(0)};var i;return e.configCache={},Zi([G({})],e.prototype,"keyConfigs",void 0),Zi([G("keyup")],e.prototype,"eventName",void 0),Zi([W()],e.prototype,"keyAction",void 0),e=i=Zi([U],e)}(xi),ir=function(){function t(t,e,i){this.controlName=t,this.localeStrings=e,this.setLocale(i||ii)}return t.prototype.setLocale=function(e){var i=this.intGetControlConstant(t.locale,e);this.currentLocale=i||this.localeStrings},t.load=function(t){this.locale=u(this.locale,t,{},!0)},t.prototype.getConstant=function(t){return c(this.currentLocale[t])?this.localeStrings[t]||"":this.currentLocale[t]},t.prototype.intGetControlConstant=function(t,e){return t[e]?t[e][this.controlName]:null},t.locale={},t}(),rr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),nr=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},or=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return rr(e,t),nr([G(50)],e.prototype,"swipeThresholdDistance",void 0),e}(ki),sr=/(Up|Down)/,ar=function(t){function e(e,i){var r=t.call(this,i,e)||this;return r.touchAction=!0,r.tapCount=0,r.startEvent=function(t){if(!0===r.touchAction){var e=r.updateChangeTouches(t);void 0!==t.changedTouches&&(r.touchAction=!1),r.isTouchMoved=!1,r.movedDirection="",r.startPoint=r.lastMovedPoint={clientX:e.clientX,clientY:e.clientY},r.startEventData=e,r.hScrollLocked=r.vScrollLocked=!1,r.tStampStart=Date.now(),r.timeOutTapHold=setTimeout(function(){r.tapHoldEvent(t)},r.tapHoldThreshold),Si.add(r.element,wi.touchMoveEvent,r.moveEvent,r),Si.add(r.element,wi.touchEndEvent,r.endEvent,r),Si.add(r.element,wi.touchCancelEvent,r.cancelEvent,r)}},r.moveEvent=function(t){var e=r.updateChangeTouches(t);r.movedPoint=e,r.isTouchMoved=!(e.clientX===r.startPoint.clientX&&e.clientY===r.startPoint.clientY);var i={};if(r.isTouchMoved){clearTimeout(r.timeOutTapHold),r.calcScrollPoints(t);i=u(i,{},{startEvents:r.startEventData,originalEvent:t,startX:r.startPoint.clientX,startY:r.startPoint.clientY,distanceX:r.distanceX,distanceY:r.distanceY,scrollDirection:r.scrollDirection,velocity:r.getVelocity(e)}),r.trigger("scroll",i),r.lastMovedPoint={clientX:e.clientX,clientY:e.clientY}}},r.cancelEvent=function(t){clearTimeout(r.timeOutTapHold),clearTimeout(r.timeOutTap),r.tapCount=0,r.swipeFn(t),Si.remove(r.element,wi.touchCancelEvent,r.cancelEvent)},r.endEvent=function(t){r.swipeFn(t),r.isTouchMoved||"function"==typeof r.tap&&(r.trigger("tap",{originalEvent:t,tapCount:++r.tapCount}),r.timeOutTap=setTimeout(function(){r.tapCount=0},r.tapThreshold)),r.modeclear()},r.swipeFn=function(t){clearTimeout(r.timeOutTapHold),clearTimeout(r.timeOutTap);var e=r.updateChangeTouches(t),i=e.clientX-r.startPoint.clientX,n=e.clientY-r.startPoint.clientY;i=Math.floor(i<0?-1*i:i),n=Math.floor(n<0?-1*n:i),r.isTouchMoved=i>1||n>1;/Firefox/.test(wi.userAgent)&&0===e.clientX&&0===e.clientY&&"mouseup"===t.type&&(r.isTouchMoved=!1),r.endPoint=e,r.calcPoints(t);var o={originalEvent:t,startEvents:r.startEventData,startX:r.startPoint.clientX,startY:r.startPoint.clientY,distanceX:r.distanceX,distanceY:r.distanceY,swipeDirection:r.movedDirection,velocity:r.getVelocity(e)};if(r.isTouchMoved){var s=void 0,a=r.swipeSettings.swipeThresholdDistance;s=u(s,r.defaultArgs,o);var l=!1,h=r.element,c=r.isScrollable(h),p=sr.test(r.movedDirection);(a<r.distanceX&&!p||a<r.distanceY&&p)&&(l=!c||r.checkSwipe(h,p)),l&&r.trigger("swipe",s)}r.modeclear()},r.modeclear=function(){r.modeClear=setTimeout(function(){r.touchAction=!0},"function"!=typeof r.tap?0:20),r.lastTapTime=(new Date).getTime(),Si.remove(r.element,wi.touchMoveEvent,r.moveEvent),Si.remove(r.element,wi.touchEndEvent,r.endEvent),Si.remove(r.element,wi.touchCancelEvent,r.cancelEvent)},r.bind(),r}return rr(e,t),e.prototype.onPropertyChanged=function(t,e){},e.prototype.bind=function(){this.wireEvents(),wi.isIE&&this.element.classList.add("e-block-touch")},e.prototype.destroy=function(){this.unwireEvents(),t.prototype.destroy.call(this)},e.prototype.wireEvents=function(){Si.add(this.element,wi.touchStartEvent,this.startEvent,this)},e.prototype.unwireEvents=function(){Si.remove(this.element,wi.touchStartEvent,this.startEvent)},e.prototype.getModuleName=function(){return"touch"},e.prototype.isScrollable=function(t){var e=getComputedStyle(t),i=e.overflow+e.overflowX+e.overflowY;return!!/(auto|scroll)/.test(i)},e.prototype.tapHoldEvent=function(t){this.tapCount=0,this.touchAction=!0;var e;Si.remove(this.element,wi.touchMoveEvent,this.moveEvent),Si.remove(this.element,wi.touchEndEvent,this.endEvent),e={originalEvent:t},this.trigger("tapHold",e),Si.remove(this.element,wi.touchCancelEvent,this.cancelEvent)},e.prototype.calcPoints=function(t){var e=this.updateChangeTouches(t);this.defaultArgs={originalEvent:t},this.distanceX=Math.abs(Math.abs(e.clientX)-Math.abs(this.startPoint.clientX)),this.distanceY=Math.abs(Math.abs(e.clientY)-Math.abs(this.startPoint.clientY)),this.distanceX>this.distanceY?this.movedDirection=e.clientX>this.startPoint.clientX?"Right":"Left":this.movedDirection=e.clientY<this.startPoint.clientY?"Up":"Down"},e.prototype.calcScrollPoints=function(t){var e=this.updateChangeTouches(t);this.defaultArgs={originalEvent:t},this.distanceX=Math.abs(Math.abs(e.clientX)-Math.abs(this.lastMovedPoint.clientX)),this.distanceY=Math.abs(Math.abs(e.clientY)-Math.abs(this.lastMovedPoint.clientY)),(this.distanceX>this.distanceY||!0===this.hScrollLocked)&&!1===this.vScrollLocked?(this.scrollDirection=e.clientX>this.lastMovedPoint.clientX?"Right":"Left",this.hScrollLocked=!0):(this.scrollDirection=e.clientY<this.lastMovedPoint.clientY?"Up":"Down",this.vScrollLocked=!0)},e.prototype.getVelocity=function(t){var e=t.clientX,i=t.clientY,r=Date.now(),n=e-this.startPoint.clientX,o=i-this.startPoint.clientX,s=r-this.tStampStart;return Math.sqrt(n*n+o*o)/s},e.prototype.checkSwipe=function(t,e){var i=["scroll","offset"],r=e?["Height","Top"]:["Width","Left"];return t[i[0]+r[0]]<=t[i[1]+r[0]]||(0===t[i[0]+r[1]]||t[i[1]+r[0]]+t[i[0]+r[1]]>=t[i[0]+r[0]])},e.prototype.updateChangeTouches=function(t){return t.changedTouches&&0!==t.changedTouches.length?t.changedTouches[0]:t},nr([W()],e.prototype,"tap",void 0),nr([W()],e.prototype,"tapHold",void 0),nr([W()],e.prototype,"swipe",void 0),nr([W()],e.prototype,"scroll",void 0),nr([G(350)],e.prototype,"tapThreshold",void 0),nr([G(750)],e.prototype,"tapHoldThreshold",void 0),nr([_({},or)],e.prototype,"swipeSettings",void 0),e=nr([U],e)}(xi),lr=new RegExp("\\n|\\r|\\s\\s+","g"),hr=new RegExp(/'|"/g),ur=new RegExp("if ?\\("),cr=new RegExp("else if ?\\("),pr=new RegExp("else"),dr=new RegExp("for ?\\("),fr=new RegExp("(/if|/for)"),gr=new RegExp("\\((.*)\\)",""),mr=new RegExp("^[0-9]+$","g"),yr=new RegExp("[\\w\"'.\\s+]+","g"),br=new RegExp('"(.*?)"',"g"),vr=new RegExp("[\\w\"'@#$.\\s-+]+","g"),wr=new RegExp("\\${([^}]*)}","g"),Sr=/^\..*/gm,Pr=/\\/gi,Cr=/\\\\/gi,xr=new RegExp("[\\w\"'@#$.\\s+]+","g"),Or=/\window\./gm,Br=/^[\n\r.]+<tr|^<tr/,Lr=/^[\n\r.]+<svg|^<path|^<g/,Tr={},Mr={compile:(new(function(){function t(){}return t.prototype.compile=function(t,e,i){return void 0===e&&(e={}),et(t,e)},t}())).compile},Dr=["script","style","iframe[src]",'link[href*="javascript:"]','object[type="text/x-scriptlet"]','object[data^="data:text/html;base64"]','img[src^="data:text/html;base64"]','[src^="javascript:"]','[dynsrc^="javascript:"]','[lowsrc^="javascript:"]','[type^="application/x-shockwave-flash"]'],kr=[{attribute:"href",selector:'[href*="javascript:"]'},{attribute:"background",selector:'[background^="javascript:"]'},{attribute:"style",selector:'[style*="javascript:"]'},{attribute:"style",selector:'[style*="expression("]'},{attribute:"href",selector:'a[href^="data:text/html;base64"]'}],Er=["onchange","onclick","onmouseover","onmouseout","onkeydown","onload","onerror","onblur","onfocus","onbeforeload","onbeforeunload","onkeyup","onsubmit","onafterprint","onbeforeonload","onbeforeprint","onblur","oncanplay","oncanplaythrough","onchange","onclick","oncontextmenu","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onerror","onfocus","onformchange","onforminput","onhaschange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onoffline","onoine","ononline","onpagehide","onpageshow","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreadystatechange","onredo","onresize","onscroll","onseeked","onseeking","onselect","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","onundo","onunload","onvolumechange","onwaiting","onmouseenter","onmouseleave","onmousewheel","onstart","onpropertychange"],jr=function(){function t(){}return t.beforeSanitize=function(){return{selectors:{tags:Dr,attributes:kr}}},t.sanitize=function(t){var e=this.beforeSanitize();return this.serializeValue(e,t)},t.serializeValue=function(t,e){this.removeAttrs=t.selectors.attributes,this.removeTags=t.selectors.tags,this.wrapElement=document.createElement("div"),this.wrapElement.innerHTML=e,this.removeXssTags(),this.removeJsEvents(),this.removeXssAttrs();var i=this.wrapElement.innerHTML;return this.removeElement(),i.replace("&","&")},t.removeElement=function(){for(var t=this.wrapElement.children,e=0;e<t.length;e++)for(var i=t[e].attributes,r=0;r<i.length;r++)this.wrapElement.children[e].removeAttribute(i[r].localName)},t.removeXssTags=function(){var t=this.wrapElement.querySelectorAll(this.removeTags.join(","));t.length>0&&t.forEach(function(t){B(t)})},t.removeJsEvents=function(){var t=this.wrapElement.querySelectorAll("["+Er.join("],[")+"]");t.length>0&&t.forEach(function(t){Er.forEach(function(e){t.hasAttribute(e)&&t.removeAttribute(e)})})},t.removeXssAttrs=function(){var t=this;this.removeAttrs.forEach(function(e,i){var r=t.wrapElement.querySelectorAll(e.selector);r.length>0&&r.forEach(function(t){t.removeAttribute(e.attribute)})})},t}(),Ir=Object.freeze({blazorCultureFormats:si,get IntlBase(){return Ae},Ajax:hi,Animation:Li,rippleEffect:function(t,e,i){var r=function(t){return{selector:t&&t.selector?t.selector:null,ignore:t&&t.ignore?t.ignore:null,rippleFlag:t&&t.rippleFlag,isCenterRipple:t&&t.isCenterRipple,duration:t&&t.duration?t.duration:350}}(e);return!1===r.rippleFlag||void 0===r.rippleFlag&&!Ti?function(){}:(t.setAttribute("data-ripple","true"),Si.add(t,"mousedown",$,{parent:t,rippleOptions:r}),Si.add(t,"mouseup",J,{parent:t,rippleOptions:r,done:i}),Si.add(t,"mouseleave",X,{parent:t,rippleOptions:r}),wi.isPointer&&Si.add(t,"transitionend",X,{parent:t,rippleOptions:r}),function(){t.removeAttribute("data-ripple"),Si.remove(t,"mousedown",$),Si.remove(t,"mouseup",J),Si.remove(t,"mouseleave",X),Si.remove(t,"transitionend",X)})},get isRippleEnabled(){return Ti},enableRipple:function(t){return Ti=t},get animationMode(){return Mi},setGlobalAnimation:function(t){Mi=t},Base:xi,getComponent:R,removeChildInstance:function(t){for(var e=[].slice.call(t.getElementsByClassName("e-control")),i=0;i<e.length;i++){var r=e[i].classList[1].split("e-")[1],n=R(e[i],r);p(n)||n.destroy()}},Browser:wi,get versionBasedStatePersistence(){return zi},enableVersionBasedPersistence:function(t){zi=t},Component:Gi,ChildProperty:ki,Position:Ki,Draggable:Yi,Droppable:Xi,EventHandler:Si,onIntlChange:Ze,get rightToLeft(){return ti},cldrData:ei,get defaultCulture(){return ii},get defaultCurrencyCode(){return ri},Internationalization:oi,setCulture:function(t){ii=t,Ze.notify("notifyExternalChange",{locale:ii})},setCurrencyCode:function(t){ri=t,Ze.notify("notifyExternalChange",{currencyCode:ri})},loadCldr:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=0,r=t;i<r.length;i++){var n=r[i];u(ei,n,{},!0)}},enableRtl:function(t){void 0===t&&(t=!0),ti=t,Ze.notify("notifyExternalChange",{enableRtl:ti})},getNumericObject:function(t,e){var i=Ae.getDependables(ei,t,"",!0)[ni[0]],r=Ae.getDependables(ei,t,"")[ni[1]],n=o("defaultNumberingSystem",i),s=b()?o("numberSymbols",i):o("symbols-numberSystem-"+n,i),a=Ae.getSymbolPattern(e||"decimal",n,i,!1);return u(s,Ae.getFormatData(a,!0,"",!0),{dateSeparator:Ae.getDateSeparator(r)})},getNumberDependable:function(t,e){var i=Ae.getDependables(ei,t,"",!0);return Ae.getCurrencySymbol(i.numericObject,e)},getDefaultDateObject:function(t){return Ae.getDependables(ei,"",t,!1)[ni[1]]},KeyboardEvents:er,L10n:ir,ModuleLoader:Di,Property:G,Complex:_,ComplexFactory:function(t){return function(e,i){var r={set:function(t,e,i){return function(r){var n=i(r,this);A(this,e,t,n).setProperties(r)}}({},i,t),get:function(t,e,i){return function(){var r=i({});return this.properties.hasOwnProperty(e)?this.properties[e]:A(this,e,t,r)}}({},i,t),enumerable:!0,configurable:!0};Object.defineProperty(e,i,r),q(e,i,"complexProp",{},t)}},Collection:H,CollectionFactory:function(t){return function(e,i){var r={set:function(t,e,i){return function(r){var n=this.properties.hasOwnProperty(e)?this.properties[e]:t,o=N(this,e,r,i,!0,!0);this.saveChanges(e,o,n),this.properties[e]=o}}([],i,t),get:function(t,e,i){return function(){var r=i({});if(!this.properties.hasOwnProperty(e)){var n=N(this,e,t,r,!1);this.properties[e]=n}return this.properties[e]}}([],i,t),enumerable:!0,configurable:!0};Object.defineProperty(e,i,r),q(e,i,"colProp",{},t)}},Event:W,NotifyPropertyChanges:U,CreateBuilder:function(t){var e=function(t){return this.element=t,this};return function(i){return e.prototype.hasOwnProperty("create")||((e.prototype=K(t)).create=function(){var e=u({},{},this.properties);return this.properties={},new t(e,this.element)}),new e(i)}},SwipeSettings:or,Touch:ar,get HijriParser(){return Oe},blazorTemplates:Tr,getRandomId:st,compile:at,updateBlazorTemplate:lt,resetBlazorTemplate:ht,setTemplateEngine:ut,getTemplateEngine:ct,disableBlazorMode:function(){Me=!1},createInstance:r,setImmediate:n,getValue:o,setValue:s,deleteObject:a,containerObject:De,isObject:l,getEnumValue:function(t,e){return t[e]},merge:h,extend:u,isNullOrUndefined:c,isUndefined:p,getUniqueID:d,debounce:f,queryParams:function(t){for(var e=[],i=0,r=Object.keys(t);i<r.length;i++){var n=r[i];e.push(encodeURIComponent(n)+"="+encodeURIComponent(""+t[n]))}return e.join("&")},isObjectArray:function(t){var e=Object.prototype.toString;return"[object Array]"===e.call(t)&&"[object Object]"===e.call(t[0])},compareElementParent:g,throwError:m,print:y,formatUnit:function(t){var e=t+"";return e.match(/auto|cm|mm|in|px|pt|pc|%|em|ex|ch|rem|vw|vh|vmin|vmax/)?e:e+"px"},enableBlazorMode:function(){Me=!0},isBlazor:b,getElement:function(t){return t instanceof Node||!b()||c(t.xPath)?t:document.evaluate(t.xPath,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue},getInstance:function(t,e){var i="string"==typeof t?document.querySelector(t):t;if(i[Le])for(var r=0,n=i[Le];r<n.length;r++){var o=n[r];if(o instanceof e)return o}return null},addInstance:function(t,e){var i="string"==typeof t?document.querySelector(t):t;i[Le]?i[Le].push(e):i[Le]=[e]},uniqueID:v,createElement:w,addClass:S,removeClass:P,isVisible:x,prepend:function(t,e,i){for(var r=document.createDocumentFragment(),n=0,o=t;n<o.length;n++){var s=o[n];r.appendChild(s)}return e.insertBefore(r,e.firstElementChild),i&&O(e),t},append:function(t,e,i){for(var r=document.createDocumentFragment(),n=0,o=t;n<o.length;n++){var s=o[n];r.appendChild(s)}return e.appendChild(r),i&&O(e),t},detach:B,remove:L,attributes:T,select:M,selectAll:D,closest:E,siblings:function(t){for(var e=[],i=0,r=Array.prototype.slice.call(t.parentNode.childNodes);i<r.length;i++){var n=r[i];n.nodeType===Node.ELEMENT_NODE&&t!==n&&e.push(n)}return e},getAttributeOrDefault:function(t,e,i){var r,n=l(t);return r=n?o("attributes."+e,t):t.getAttribute(e),c(r)&&i&&(n?t.attributes[e]=i:t.setAttribute(e,i.toString()),r=i),r},setStyleAttribute:j,classList:function(t,e,i){S([t],e),P([t],i)},matches:I,includeInnerHTML:function(t,e){t.innerHTML=e},containsClass:function(t,e){return l(t)?new RegExp("\\b"+e+"\\b","i").test(t.attributes.className):t.classList.contains(e)},cloneNode:function(t,e){return l(t)?e?u({},{},t,!0):void 0:t.cloneNode(e)},Observer:Qe,SanitizeHtmlHelper:jr,registerLicense:tt,validateLicense:Ri,getVersion:function(){return Ii.version}}),Rr=function(){function t(t){this.svgLink="http://www.w3.org/2000/svg",this.rootId=t}return t.prototype.getOptionValue=function(t,e){return t[e]},t.prototype.createSvg=function(t){return c(t.id)&&(t.id=this.rootId+"_svg"),this.svgObj=document.getElementById(t.id),c(document.getElementById(t.id))&&(this.svgObj=document.createElementNS(this.svgLink,"svg")),this.svgObj=this.setElementAttributes(t,this.svgObj),this.setSVGSize(t.width,t.height),this.svgObj},t.prototype.setSVGSize=function(t,e){var i=document.getElementById(this.rootId),r=c(i)?null:i.getBoundingClientRect();c(this.width)||this.width<=0?this.svgObj.setAttribute("width",t?t.toString():r.width.toString()):this.svgObj.setAttribute("width",this.width.toString()),c(this.height)||this.height<=0?this.svgObj.setAttribute("height",e?e.toString():"450"):this.svgObj.setAttribute("height",this.height.toString())},t.prototype.drawPath=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"path")),e=this.setElementAttributes(t,e)},t.prototype.drawLine=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"line")),e=this.setElementAttributes(t,e)},t.prototype.drawRectangle=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"rect")),e=this.setElementAttributes(t,e)},t.prototype.drawCircle=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"circle")),e=this.setElementAttributes(t,e)},t.prototype.drawPolyline=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polyline")),e=this.setElementAttributes(t,e)},t.prototype.drawEllipse=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"ellipse")),e=this.setElementAttributes(t,e)},t.prototype.drawPolygon=function(t){var e=document.getElementById(t.id);return null===e&&(e=document.createElementNS(this.svgLink,"polygon")),e=this.setElementAttributes(t,e)},t.prototype.drawImage=function(t){var e=document.createElementNS(this.svgLink,"image");return e.setAttributeNS(null,"height",t.height.toString()),e.setAttributeNS(null,"width",t.width.toString()),e.setAttributeNS("http://www.w3.org/1999/xlink","href",t.href),e.setAttributeNS(null,"x",t.x.toString()),e.setAttributeNS(null,"y",t.y.toString()),e.setAttributeNS(null,"id",t.id),e.setAttributeNS(null,"visibility",t.visibility),c(this.getOptionValue(t,"clip-path"))||e.setAttributeNS(null,"clip-path",this.getOptionValue(t,"clip-path")),c(t.preserveAspectRatio)||e.setAttributeNS(null,"preserveAspectRatio",t.preserveAspectRatio),e},t.prototype.createText=function(t,e){var i=document.createElementNS(this.svgLink,"text");return i=this.setElementAttributes(t,i),c(e)||(i.textContent=e),i},t.prototype.createTSpan=function(t,e){var i=document.createElementNS(this.svgLink,"tspan");return i=this.setElementAttributes(t,i),c(e)||(i.textContent=e),i},t.prototype.createTitle=function(t){var e=document.createElementNS(this.svgLink,"title");return e.textContent=t,e},t.prototype.createDefs=function(){return document.createElementNS(this.svgLink,"defs")},t.prototype.createClipPath=function(t){var e=document.createElementNS(this.svgLink,"clipPath");return e=this.setElementAttributes(t,e)},t.prototype.createForeignObject=function(t){var e=document.createElementNS(this.svgLink,"foreignObject");return e=this.setElementAttributes(t,e)},t.prototype.createGroup=function(t){var e=document.createElementNS(this.svgLink,"g");return e=this.setElementAttributes(t,e)},t.prototype.createPattern=function(t,e){var i=document.createElementNS(this.svgLink,e);return i=this.setElementAttributes(t,i)},t.prototype.createRadialGradient=function(t,e,i){var r;if(c(t[0].colorStop))r=t[0].color.toString();else{var n={id:this.rootId+"_"+e+"radialGradient",cx:i.cx+"%",cy:i.cy+"%",r:i.r+"%",fx:i.fx+"%",fy:i.fy+"%"};this.drawGradient("radialGradient",n,t),r="url(#"+this.rootId+"_"+e+"radialGradient)"}return r},t.prototype.createLinearGradient=function(t,e,i){var r;if(c(t[0].colorStop))r=t[0].color.toString();else{var n={id:this.rootId+"_"+e+"linearGradient",x1:i.x1+"%",y1:i.y1+"%",x2:i.x2+"%",y2:i.y2+"%"};this.drawGradient("linearGradient",n,t),r="url(#"+this.rootId+"_"+e+"linearGradient)"}return r},t.prototype.drawGradient=function(t,e,i){var r=this.createDefs(),n=document.createElementNS(this.svgLink,t);n=this.setElementAttributes(e,n);for(var o=0;o<i.length;o++){var s=document.createElementNS(this.svgLink,"stop");s.setAttribute("offset",i[o].colorStop),s.setAttribute("stop-color",i[o].color),s.setAttribute("stop-opacity",i[o].opacity?i[o].opacity:"1"),c(i[o].style)||(s.style.cssText=i[o].style),n.appendChild(s)}return r.appendChild(n),r},t.prototype.drawClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Rect";var r=this.drawRectangle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.drawCircularClipPath=function(t){var e=this.createDefs(),i=this.createClipPath({id:t.id});t.id=t.id+"_Circle";var r=this.drawCircle(t);return i.appendChild(r),e.appendChild(i),e},t.prototype.setElementAttributes=function(t,e){for(var i=Object.keys(t),r=0;r<i.length;r++)"style"===i[r]?e.style.cssText=t[i[r]]:e.setAttribute(i[r],t[i[r]]);return e},t.prototype.createCanvas=function(){return null},t}(),Ar=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Nr=function(){return function(t,e){this.width=t,this.height=e}}(),Fr=function(){return function(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}}(),Vr=function(){return function(t,e){this.isRight=e,this.isBottom=t}}(),zr=function(){return function(t){this.id=t}}(),Gr=function(t){function e(e,i,r,n,o,s,a,l){void 0===s&&(s="");var h=t.call(this,e)||this;return h.transform="",h.baseLine="auto",h.labelRotation=0,h.x=i,h.y=r,h.anchor=n,h.text=o,h.transform=s,h.baseLine=a,h.labelRotation=l,h}return Ar(e,t),e}(zr),_r=function(t){function e(e,i,r,n,o,s,a){var l=t.call(this,e)||this;return l.opacity=o,l.fill=i,l.stroke=n,l["stroke-width"]=r,l["stroke-dasharray"]=s,l.d=a,l}return Ar(e,t),e}(zr),Hr=function(){return function(t,e){this.x=t,this.y=e}}(),Wr=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ur=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},qr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Wr(e,t),Ur([G(null)],e.prototype,"size",void 0),Ur([G("")],e.prototype,"color",void 0),Ur([G("Segoe UI")],e.prototype,"fontFamily",void 0),Ur([G("Normal")],e.prototype,"fontWeight",void 0),Ur([G("Normal")],e.prototype,"fontStyle",void 0),Ur([G(1)],e.prototype,"opacity",void 0),e}(ki),Kr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Wr(e,t),Ur([G("")],e.prototype,"color",void 0),Ur([G(1)],e.prototype,"width",void 0),Ur([G("")],e.prototype,"dashArray",void 0),e}(ki),Yr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Wr(e,t),Ur([G(0)],e.prototype,"x",void 0),Ur([G(0)],e.prototype,"y",void 0),Ur([G(0)],e.prototype,"width",void 0),Ur([G(0)],e.prototype,"height",void 0),e}(ki),$r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Wr(e,t),Ur([G(0)],e.prototype,"x",void 0),Ur([G(0)],e.prototype,"y",void 0),e}(ki),Jr=function(t){function e(e,i){return t.call(this,e,i)||this}return Wr(e,t),e.prototype.preRender=function(){this.allowServerDataBinding=!1,this.initPrivateVariable(),this.isCanvas||this.removeSVG(),this.createTooltipElement()},e.prototype.initPrivateVariable=function(){this.renderer=new Rr(this.element.id),this.themeStyle=function(t){var e;switch(t){case"Highcontrast":case"HighContrast":e={tooltipFill:"#ffffff",tooltipBoldLabel:"#000000",tooltipLightLabel:"#000000",tooltipHeaderLine:"#969696"};break;case"MaterialDark":case"FabricDark":case"BootstrapDark":e={tooltipFill:"#F4F4F4",tooltipBoldLabel:"#282727",tooltipLightLabel:"#333232",tooltipHeaderLine:"#9A9A9A"};break;case"Bootstrap4":e={tooltipFill:"#020202",tooltipBoldLabel:"rgba(255, 255, 255)",tooltipLightLabel:"rgba(255, 255, 255, 0.9)",tooltipHeaderLine:"rgba(255, 255, 255, 0.2)"};break;case"Tailwind":e={tooltipFill:"#111827",tooltipBoldLabel:"#D1D5DB",tooltipLightLabel:"#F9FAFB",tooltipHeaderLine:"#6B7280"};break;case"TailwindDark":e={tooltipFill:"#F9FAFB",tooltipBoldLabel:"#6B7280",tooltipLightLabel:"#1F2937",tooltipHeaderLine:"#9CA3AF"};break;case"Bootstrap5":e={tooltipFill:"#212529",tooltipBoldLabel:"#F9FAFB",tooltipLightLabel:"#F9FAFB",tooltipHeaderLine:"#9CA3AF"};break;case"Bootstrap5Dark":e={tooltipFill:"#E9ECEF",tooltipBoldLabel:"#212529",tooltipLightLabel:"#212529",tooltipHeaderLine:"#ADB5BD"};break;case"Fluent":e={tooltipFill:"#FFFFFF",tooltipBoldLabel:"#323130",tooltipLightLabel:"#323130",tooltipHeaderLine:"#D2D0CE"};break;case"FluentDark":e={tooltipFill:"#252423",tooltipBoldLabel:"#F3F2F1",tooltipLightLabel:"#F3F2F1",tooltipHeaderLine:"#3B3A39"};break;default:e={tooltipFill:"#000816",tooltipBoldLabel:"#ffffff",tooltipLightLabel:"#dbdbdb",tooltipHeaderLine:"#ffffff"}}return e}(this.theme),this.formattedText=[],this.padding=5,this.areaMargin=10,this.isFirst=!0,this.markerPoint=[]},e.prototype.removeSVG=function(){var t=document.getElementById(this.element.id+"_svg"),e=document.getElementById(this.element.id+"parent_template");this.blazorTemplate&&ht(this.element.id+"parent_template_blazorTemplate"),t&&t.parentNode&&L(t),e&&e.parentNode&&L(e)},e.prototype.render=function(){if(this.fadeOuted=!1,this.template)this.updateTemplateFn(),this.createTemplate(this.areaBounds,this.location);else{this.renderText(this.isFirst);var t={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",t);var e=this.renderTooltipElement(this.areaBounds,this.location);this.drawMarker(e.isBottom,e.isRight,this.markerSize)}this.trigger("loaded",{tooltip:this});var i=document.getElementById("chartmeasuretext");i&&L(i),this.allowServerDataBinding=!0},e.prototype.createTooltipElement=function(){if(this.textElements=[],!this.template||this.shared){this.enableRTL&&this.element.setAttribute("dir","ltr");var t=this.renderer.createSvg({id:this.element.id+"_svg"});this.element.appendChild(t);var e=document.getElementById(this.element.id+"_group");e||(e=this.renderer.createGroup({id:this.element.id+"_group"})).setAttribute("transform","translate(0,0)"),t.appendChild(e);var i=this.renderer.drawPath({id:this.element.id+"_path","stroke-width":this.border.width,fill:this.fill||this.themeStyle.tooltipFill,opacity:"TailwindDark"!==this.theme&&"Tailwind"!==this.theme&&"Bootstrap5"!==this.theme&&"Bootstrap5Dark"!==this.theme||.75!==this.opacity?this.opacity:1,stroke:this.border.color});e.appendChild(i)}},e.prototype.drawMarker=function(t,e,i){if(this.shapes.length<=0)return null;for(var r,n=0,o=this.renderer.createGroup({id:this.element.id+"_trackball_group"}),s=mt(this.element.id+"_group"),a=(this.enableRTL?this.elementSize.width-i/2:2*this.marginX+i/2)+(e?this.arrowPadding:0),l=0,h=this.shapes;l<h.length;l++){var u=h[l];"None"!==u&&(r=new _r(this.element.id+"_Trackball_"+n,this.palette[n],1,"#cccccc",1,null),this.markerPoint[n]&&o.appendChild(bt(new Hr(a,this.markerPoint[n]-this.padding+(t?this.arrowPadding:0)),u,new Nr(i,i),"",r,null)),n++)}s.appendChild(o)},e.prototype.renderTooltipElement=function(t,e){var i,r=mt(this.element.id),n=new Hr(0,0),o=new Hr(0,0),s=mt(this.element.id+"_svg"),a=mt(this.element.id+"_group"),l=mt(this.element.id+"_path"),h=!1,u=!1,p=!1,d=0,f=0;if(""!==this.header&&(this.elementSize.height+=this.marginY),this.content.length>1?(i=this.sharedTooltipLocation(t,this.location.x,this.location.y),h=!0):(i=this.tooltipLocation(t,e,n,o),this.inverted?d=(u=i.x<e.x+this.clipBounds.x)?0:this.arrowPadding:(p=!(h=i.y<e.y+this.clipBounds.y),f=h?0:this.arrowPadding)),""!==this.header){var g=2,m=this.isWrap?this.wrappedText:this.header;if(this.isWrap&&"string"==typeof m&&(m.indexOf("<")>-1||m.indexOf(">")>-1)){g=m.split("<br>").length}var y=ft(this.isWrap?this.wrappedText:this.header,this.textStyle).height+this.marginY*g+(p?this.arrowPadding:0)+(this.isWrap?5:0),b="M "+(3*this.marginX+(u||h||p?0:this.arrowPadding))+" "+y+"L "+(i.width+(u||h||p?0:this.arrowPadding)-2*this.marginX)+" "+y,v=this.renderer.drawPath({id:this.element.id+"_header_path","stroke-width":1,fill:null,opacity:.8,stroke:this.themeStyle.tooltipHeaderLine,d:b});a.appendChild(v)}var w=this.border.width/2,S=new Fr(w+d,w+f,i.width-w,i.height-w);if(a.setAttribute("opacity","1"),!this.enableAnimation||this.isFirst||this.crosshair?this.updateDiv(r,i.x,i.y):this.animateTooltipDiv(r,i),s.setAttribute("height",(i.height+this.border.width+(this.inverted?0:this.arrowPadding)+5).toString()),s.setAttribute("width",(i.width+this.border.width+(this.inverted?this.arrowPadding:0)+5).toString()),s.setAttribute("opacity","1"),c(this.tooltipPlacement)||(h=this.tooltipPlacement.indexOf("Top")>-1,p=this.tooltipPlacement.indexOf("Bottom")>-1,u=this.tooltipPlacement.indexOf("Left")>-1),l.setAttribute("d",function(t,e,i,r,n,o,s,a,l,h,u){void 0===u&&(u="");var c="",p=i.x,d=i.y,f=i.x+i.width,g=i.y+i.height;return o?(c=(c=c.concat("M "+p+" "+(d+e)+" Q "+p+" "+d+" "+(p+t)+" "+d+" L "+(f-t)+" "+d+" Q "+f+" "+d+" "+f+" "+(d+e))).concat(" L "+f+" "+(g-e)+" Q "+f+" "+g+" "+(f-t)+" "+g),0!==n&&(c="RangeNavigator"===u?r.x-n>f/2?(c=c.concat(" L "+(r.x+n)+" "+g)).concat(" L "+(l+n)+" "+(g+n)+" L "+r.x+" "+g):(c=c.concat(" L "+r.x+" "+g)).concat(" L "+(l-n)+" "+(g+n)+" L "+(r.x-n)+" "+g):(c=c.concat(" L "+(r.x+n)+" "+g)).concat(" L "+l+" "+(g+n)+" L "+(r.x-n)+" "+g)),c=r.x-n>p?c.concat(" L "+(p+t)+" "+g+" Q "+p+" "+g+" "+p+" "+(g-e)+" z"):0===n?c.concat(" L "+(p+t)+" "+g+" Q "+p+" "+g+" "+p+" "+(g-e)+" z"):c.concat(" L "+p+" "+(g+e)+" z")):s?c=(c=(c=(c=(c=c.concat("M "+p+" "+(d+e)+" Q "+p+" "+d+" "+(p+t)+" "+d+" L "+(r.x-n)+" "+d)).concat(" L "+l+" "+r.y)).concat(" L "+(r.x+n)+" "+d)).concat(" L "+(f-t)+" "+d+" Q "+f+" "+d+" "+f+" "+(d+e))).concat(" L "+f+" "+(g-e)+" Q "+f+" "+g+" "+(f-t)+" "+g+" L "+(p+t)+" "+g+" Q "+p+" "+g+" "+p+" "+(g-e)+" z"):a?(c=(c=c.concat("M "+p+" "+(d+e)+" Q "+p+" "+d+" "+(p+t)+" "+d)).concat(" L "+(f-t)+" "+d+" Q "+f+" "+d+" "+f+" "+(d+e)+" L "+f+" "+(r.y-n)),c="RangeNavigator"===u?c.concat(" L "+(f+n)+" "+(h-n)):c.concat(" L "+(f+n)+" "+h),c=(c=(c="RangeNavigator"===u?c.concat(" L "+f+" "+r.y):c.concat(" L "+f+" "+(r.y+n))).concat(" L "+f+" "+(g-e)+" Q "+f+" "+g+" "+(f-t)+" "+g)).concat(" L "+(p+t)+" "+g+" Q "+p+" "+g+" "+p+" "+(g-e)+" z")):(c=c.concat("M "+(p+t)+" "+d+" Q "+p+" "+d+" "+p+" "+(d+e)+" L "+p+" "+(r.y-n)),c="RangeNavigator"===u?c.concat(" L "+(p-n)+" "+(h-n)):c.concat(" L "+(p-n)+" "+h),c=(c=(c="RangeNavigator"===u?c.concat(" L "+p+" "+r.y):c.concat(" L "+p+" "+(r.y+n))).concat(" L "+p+" "+(g-e)+" Q "+p+" "+g+" "+(p+t)+" "+g)).concat(" L "+(f-t)+" "+g+" Q "+f+" "+g+" "+f+" "+(g-e)+" L "+f+" "+(d+e)+" Q "+f+" "+d+" "+(f-t)+" "+d+" z")),c}(this.rx,this.ry,S,n,this.arrowPadding,h,p,u,o.x,o.y,this.controlName)),this.enableShadow&&"Bootstrap4"!==this.theme){var P=this.element.id+"_shadow";"Tailwind"===this.theme||"TailwindDark"===this.theme||"Bootstrap5"===this.theme||"Bootstrap5Dark"===this.theme?l.setAttribute("box-shadow","0px 1px 2px rgba(0, 0, 0, 0.06), 0px 1px 3px rgba(0, 0, 0, 0.1)"):l.setAttribute("filter",wi.isIE?"":"url(#"+P+")");var C='<filter id="'+P+'" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="3"/>';C+='<feOffset dx="3" dy="3" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="0.5"/>',C+='</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';var x=this.renderer.createDefs();x.setAttribute("id",this.element.id+"SVG_tooltip_definition"),a.appendChild(x),x.innerHTML=C}var O="Fluent"===this.theme?"#FFFFFF":"FluentDark"===this.theme?"#323130":this.border.color;return l.setAttribute("stroke",O),c(this.border.dashArray)||l.setAttribute("stroke-dasharray",this.border.dashArray),this.changeText(new Hr(d,f),p,!u&&!h&&!p),this.revert&&(this.inverted=!this.inverted,this.revert=!1),new Vr(p,!u&&!h&&!p)},e.prototype.changeText=function(t,e,i){var r=document.getElementById(this.element.id+"_text");e&&r.setAttribute("transform","translate(0,"+this.arrowPadding+")"),i&&r.setAttribute("transform","translate("+this.arrowPadding+" 0)")},e.prototype.findFormattedText=function(){this.formattedText=[],""!==this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim()&&(this.formattedText=this.formattedText.concat(this.header)),this.formattedText=this.formattedText.concat(this.content)},e.prototype.renderText=function(t){var e,i,r,n,o,s=0,a=0,l=0,h=u({},this.textStyle,null,!0).properties,c=mt(this.element.id+"_group"),p="";this.findFormattedText(),this.isWrap=!1;var d="rtl"===document.body.getAttribute("dir")&&!this.enableRTL?"end":"start";this.leftSpace=this.areaBounds.x+this.location.x,this.rightSpace=this.areaBounds.x+this.areaBounds.width-this.leftSpace;var f=this.header.replace(/<b>/g,"").replace(/<\/b>/g,"").trim(),g=this.header.indexOf("<b>")>-1&&this.header.indexOf("</b>")>-1,m=ft(this.formattedText[0],h).width+2*this.marginX+this.arrowPadding,y=this.location.x-m<this.location.x,b=this.areaBounds.x+this.areaBounds.width<this.location.x+m,v=""!==f?this.marginY:0,w=!0,S=!0;this.markerPoint=[];var P,C=this.shapes.length>0?10:0,x=this.shapes.length>0?5:0,O="Normal",B=this.themeStyle.tooltipLightLabel,L=22/parseFloat("13px")*parseFloat(h.size),T=[];t&&!this.isCanvas||(yt(this.element.id+"_text"),yt(this.element.id+"_header_path"),yt(this.element.id+"_trackball_group"),yt(this.element.id+"SVG_tooltip_definition"));for(var M=new Gr(this.element.id+"_text",2*this.marginX,2*this.marginY+2*this.padding+(2===this.marginY?3:0),d,""),D=function(t,e,i,r){var n={},o=new Rr("");n={id:t.id,x:t.x,y:t.y,fill:i,"font-size":e.size,"font-style":e.fontStyle,"font-family":e.fontFamily,"font-weight":e.fontWeight,"text-anchor":t.anchor,transform:t.transform,opacity:e.opacity,"dominant-baseline":t.baseLine};var s="string"==typeof t.text?t.text:t.text[0],a=o.createText(n,s);return a.style.fontFamily=e.fontFamily,a.style.fontStyle=e.fontStyle,a.style.fontSize=e.size,a.style.fontWeight=e.fontWeight,a.style.color=e.color,r.appendChild(a),a}(M,h,null,c),k=1===this.formattedText.length&&this.formattedText[0].indexOf(" : <b>")>-1,E=""!==this.header,j=E&&g?16:13,I=0,R=this.formattedText.length;I<R;I++)if(r=this.formattedText[I].replace(/<(b|strong)>/g,"<b>").replace(/<\/(b|strong)>/g,"</b>").split(/<br.*?>/g),0===I&&!k&&this.isTextWrap&&(this.leftSpace<m||y)&&(this.rightSpace<m||b)&&(P=Math.round(this.leftSpace>this.rightSpace?this.leftSpace/j:this.rightSpace/j),r=(""!==f?f:this.formattedText[I]).match(new RegExp(".{1,"+P+"}","g")),this.wrappedText=g?"<b>"+r.join("<br>")+"</b>":r.join("<br>"),this.isWrap=r.length>1),""!==r[0]){0===I&&""!==f||this.markerPoint.push((""!==f?this.marginY:0)+M.y+s);for(var A=0,N=r.length;A<N;A++){e=r[A].replace(/<b>/g,"<br><b>").replace(/<\/b>/g,"</b><br>").replace(/:/g,this.enableRTL?"<br>: <br>":"<br>:<br>").split("<br>"),this.enableRTL&&e.length>0&&r[A].match(/:/g)&&(e[0]=e[0].trim(),e.reverse()),l=0,S=!0,s+=L;for(var F=0,V=e.length;F<V;F++)n=e[F],this.enableRTL&&""!==n&&this.isRTLText(n)&&(n=n.concat("")),/\S/.test(n)||""===n||(n=" "),(!S&&" "===n||""!==n.replace(/<b>/g,"").replace(/<\/b>/g,"").trim())&&(l+=" "!==n?4:0,S&&!w?(o={x:2*this.marginX+(C+x),dy:L+(S?v:0),fill:""},v=null):o=w&&S?{x:""===f?2*this.marginX+(C+x):2*this.marginX+(this.isWrap?C+x:0)}:{},S=!1,i=this.renderer.createTSpan(o,""),D.appendChild(i),n.indexOf("<b>")>-1||g&&0===F&&0===I&&(E||this.isWrap)?(O="bold",B=this.themeStyle.tooltipBoldLabel,p="font-weight:"+O,h.fontWeight=O,i.setAttribute("fill",this.textStyle.color||B)):(p="bold"===O?"font-weight:"+O:"",h.fontWeight=O,i.setAttribute("fill",this.textStyle.color||B)),(n.indexOf("</b>")>-1||g&&F===V-1&&0===I&&(E||this.isWrap))&&(O="Normal",B=this.themeStyle.tooltipLightLabel),i.textContent=n=this.getTooltipTextContent(n),l+=ft(n,h).width,""!==p&&(i.style.fontWeight=p.split("font-weight:")[1],i.style.color=i.getAttribute("fill")),i.style.fontFamily="inherit",i.style.fontStyle="inherit",i.style.fontSize="inherit",w=!1);l-=4,a=Math.max(a,l),T.push(l)}}this.elementSize=new Nr(a+(a>0?2*this.marginX:0),s),this.elementSize.width+=C+x;var z=D.childNodes[0];if(""!==f&&z&&!this.isWrap){h.fontWeight="bold";var G=(this.elementSize.width+2*this.padding)/2-ft(f,h).width/2;z.setAttribute("x",G.toString())}this.renderContentRTL(D,E,C+x,T)},e.prototype.renderContentRTL=function(t,e,i,r){if(this.enableRTL)for(var n=void 0,o=e?1:0,s=0;s<t.childNodes.length;s++)n=t.childNodes[s],e&&!(s>0)||c(n.getAttribute("x"))||(n.setAttribute("x",(this.elementSize.width-(i+r[o])).toString()),o++)},e.prototype.getTooltipTextContent=function(t){var e=t.match(/<[a-zA-Z\/](.|\n)*?>/g);if(c(e))return t;for(var i=this.isRTLText(t),r=0;r<e.length;r++)this.isValidHTMLElement(e[r].replace("<","").replace("/","").replace(">","").trim())&&(t=t.replace(e[r],i?"":""));return t},e.prototype.isValidHTMLElement=function(t){return"[object HTMLUnknownElement]"!=document.createElement(t).toString()},e.prototype.isRTLText=function(t){return/[\u0590-\u07FF\u200F\u202B\u202E\uFB1D-\uFDFD\uFE70-\uFEFC]/.test(t)},e.prototype.createTemplate=function(t,e){var i={cancel:!1,name:"tooltipRender",tooltip:this};this.trigger("tooltipRender",i);var r=document.getElementById(this.element.id);this.isCanvas&&this.removeSVG();var n=r.firstElementChild;if(n&&L(n),i.cancel)L(mt(this.element.id+"_tooltip"));else{for(var o=w("div",{id:this.element.id+"parent_template"}),s=this.templateFn(this.data,this.controlInstance,o.id,o.id+"_blazorTemplate","");s&&s.length>0;)b()||1===s.length?(o.appendChild(s[0]),s=null):o.appendChild(s[0]);r.appendChild(o);var a=this.isCanvas?o:this.element,l=a.getBoundingClientRect();this.padding=0,this.elementSize=new Nr(l.width,l.height);var h=this.shared?this.sharedTooltipLocation(t,this.location.x,this.location.y):this.tooltipLocation(t,e,new Hr(0,0),new Hr(0,0));if(!this.enableAnimation||this.isFirst||this.crosshair?this.updateDiv(a,h.x,h.y):this.animateTooltipDiv(this.element,h),this.blazorTemplate){var u=function(){var i=mt(c.element.id).getBoundingClientRect();c.elementSize=new Nr(i.width,i.height);var r=c.tooltipLocation(t,e,new Hr(0,0),new Hr(0,0));c.updateDiv(mt(c.element.id),r.x,r.y)},c=this;u.bind(c,t,e),lt(this.element.id+"parent_template_blazorTemplate",this.blazorTemplate.name,this.blazorTemplate.parent,void 0,u)}}},e.prototype.sharedTooltipLocation=function(t,e,i){var r=this.elementSize.width+2*this.marginX,n=this.elementSize.height+2*this.marginY,o=new Fr(e+2*this.padding,i-n-this.padding,r,n);return o.y<t.y&&(o.y+=o.height+2*this.padding),o.x+o.width>t.x+t.width&&(o.x-=o.width+4*this.padding),o},e.prototype.getCurrentPosition=function(t,e,i,r){var n=this.tooltipPlacement,o=this.clipBounds.x,s=this.clipBounds.y,a=this.offset,l=this.elementSize.width+2*this.marginX,h=this.elementSize.height+2*this.marginY,u=new Hr(e.x,e.y);return"Top"===n||"Bottom"===n?(u=new Hr(u.x+o-this.elementSize.width/2-this.padding,u.y+s-this.elementSize.height-2*this.padding-this.arrowPadding-a),i.x=r.x=l/2,"Bottom"===n&&(u.y=e.y+s+a),t.x+t.width<u.x+l?(u.x=t.width>l?t.x+t.width-l+6:t.x,i.x=r.x=t.width>l?t.x+e.x-u.x:e.x):t.x>u.x&&(u.x=t.x,i.x=r.x=e.x)):(u=new Hr(u.x+o+a,u.y+s-this.elementSize.height/2-this.padding),i.y=r.y=h/2,"Left"===n&&(u.x=e.x+o-a-(l+this.arrowPadding)),t.y+t.height<u.y+h?(u.y=t.height>h?t.y+t.height-h+6:t.y,i.y=r.y=t.height>h?t.y+e.y-u.y:e.y):t.y>u.y&&(u.y=t.y,i.y=r.y=e.y)),new Fr(u.x,u.y,l,h)},e.prototype.tooltipLocation=function(t,e,i,r){if(!c(this.tooltipPlacement)){return this.getCurrentPosition(t,e,i,r)}var n=new Hr(e.x,e.y),o=this.elementSize.width+2*this.marginX,s=this.elementSize.height+2*this.marginY,a=this.offset,l=this.clipBounds.x,h=this.clipBounds.y,u=t.x,p=t.y;return this.outOfBounds=!1,this.inverted?(n=new Hr(n.x+l+a,n.y+h-this.elementSize.height/2-this.padding),i.y=r.y=s/2,(n.x+o+this.arrowPadding>u+t.width||this.isNegative)&&(n.x=(e.x>t.width+t.x?t.width:e.x)+l-a-(o+this.arrowPadding)),n.x<u&&(n.x=(e.x<0?0:e.x)+l+a),n.y<=p&&(i.y-=p-n.y,r.y-=p-n.y,n.y=p),n.y+s>=p+t.height&&(i.y+=n.y+s-(p+t.height),r.y+=n.y+s-(p+t.height),n.y-=n.y+s-(p+t.height)),i.y+this.arrowPadding>s-this.ry&&(i.y=s-this.ry-this.arrowPadding,r.y=s),i.y-this.arrowPadding<this.ry&&(i.y=r.y=this.ry+this.arrowPadding),"Chart"===this.controlName&&((n.y+i.y<this.areaMargin+this.arrowPadding||t.y+t.height-(n.y+i.y)<this.areaMargin+this.arrowPadding)&&(this.outOfBounds=!0),gt(n.x,n.y,t)&&!this.outOfBounds||(this.inverted=!this.inverted,n=new Hr(e.x+l-this.padding-this.elementSize.width/2,e.y+h-this.elementSize.height-2*this.padding-a-this.arrowPadding),this.revert=!0,r.x=i.x=o/2,r.y=i.y=0,(n.y<p||this.isNegative)&&(n.y=(e.y<0?0:e.y)+a+h),n.y+this.arrowPadding+s>p+t.height&&(n.y=Math.min(e.y,p+t.height)+h-this.elementSize.height-2*this.padding-a-this.arrowPadding),r.x=o/2,n.x<u&&(r.x-=u-n.x,i.x-=u-n.x,n.x=u),n.x+o>t.width+u&&(i.x+=n.x+o-(t.width+u),r.x+=n.x+o-(t.width+u),n.x-=n.x+o-(t.width+u)),this.arrowPadding+i.x>o-this.rx&&(r.x=o-this.rx-this.arrowPadding,i.x=o-this.rx-this.arrowPadding),i.x-this.arrowPadding<this.rx&&(i.x=r.x=this.rx+this.arrowPadding)))):(n=new Hr(n.x+l-this.elementSize.width/2-this.padding,n.y+h-this.elementSize.height-2*this.padding-this.arrowPadding-a),i.x=r.x=o/2,(n.y<p||this.isNegative)&&(n.y=(e.y<0?0:e.y)+h+a),n.y+s+this.arrowPadding>p+t.height&&(n.y=Math.min(e.y,p+t.height)+h-this.elementSize.height-2*this.padding-this.arrowPadding-a),r.x=o/2,n.x<u&&(i.x-=u-n.x,r.x-=u-n.x,n.x=u),n.x+o>u+t.width&&(i.x+=n.x+o-(u+t.width),r.x+=n.x+o-(u+t.width),n.x-=n.x+o-(u+t.width)),i.x+this.arrowPadding>o-this.rx&&(i.x=o-this.rx-this.arrowPadding,r.x=o-this.rx-this.arrowPadding),i.x-this.arrowPadding<this.rx&&(i.x=r.x=this.rx+this.arrowPadding),"Chart"===this.controlName&&((t.x+t.width-(n.x+i.x)<this.areaMargin+this.arrowPadding||n.x+i.x<this.areaMargin+this.arrowPadding)&&(this.outOfBounds=!0),gt(n.x,n.y,t)&&!this.outOfBounds||(this.inverted=!this.inverted,this.revert=!0,n=new Hr(e.x+a+l,e.y+h-this.elementSize.height/2-this.padding),r.x=i.x=0,r.y=i.y=s/2,(n.x+this.arrowPadding+o>u+t.width||this.isNegative)&&(n.x=(e.x>t.width?t.width:e.x)+l-a-(this.arrowPadding+o)),n.x<u&&(n.x=(e.x<0?0:e.x)+a+l),n.y<=p&&(r.y-=p-n.y,i.y-=p-n.y,n.y=p),n.y+s>=t.height+p&&(i.y+=n.y+s-(t.height+p),r.y+=n.y+s-(t.height+p),n.y-=n.y+s-(t.height+p)),this.arrowPadding+i.y>s-this.ry&&(i.y=s-this.arrowPadding-this.ry,r.y=s),i.y-this.arrowPadding<this.ry&&(i.y=this.arrowPadding+this.ry,r.y=0)))),new Fr(n.x,n.y,o,s)},e.prototype.animateTooltipDiv=function(t,e){var i,r=this,n=parseFloat(t.style.left),o=parseFloat(t.style.top);new Li({}).animate(t,{duration:this.duration,progress:function(s){i=s.timeStamp/s.duration,t.style.animation=null,"Chart"===r.controlName&&r.shared&&!r.enableRTL?(t.style.transition="transform 0.1s",t.style.transform="translate("+(n+i*(e.x-n))+"px,"+(o+i*(e.y-o))+"px)"):(t.style.left=n+i*(e.x-n)+"px",t.style.top=o+i*(e.y-o)+"px")},end:function(i){r.updateDiv(t,e.x,e.y),r.trigger("animationComplete",{tooltip:r})}})},e.prototype.updateDiv=function(t,e,i){"Chart"!==this.controlName||!this.shared||this.crosshair||this.enableRTL?(t.style.left=e+"px",t.style.top=i+"px"):t.style.transform="translate("+e+"px,"+i+"px)"},e.prototype.updateTemplateFn=function(){if(this.template)try{document.querySelectorAll(this.template).length?this.templateFn=at(document.querySelector(this.template).innerHTML.trim()):this.templateFn=at(this.template)}catch(t){this.templateFn=at(this.template)}},e.prototype.fadeOut=function(){var t=this,e=this.isCanvas&&!this.template?mt(this.element.id+"_svg"):mt(this.element.id),i=mt(this.element.id);if(e){var r=e.firstChild;if(r.nodeType!=Node.ELEMENT_NODE&&(r=e.firstElementChild),this.isCanvas&&!this.template&&(r=document.getElementById(this.element.id+"_group")?document.getElementById(this.element.id+"_group"):r),!r)return null;var n=parseFloat(r.getAttribute("opacity"));n=c(n)?1:n,new Li({}).animate(r,{duration:200,progress:function(e){t.progressAnimation(r,n,e.timeStamp/e.duration)},end:function(){t.fadeOuted=!0,t.endAnimation(r),i.style.transition=""}})}},e.prototype.progressAnimation=function(t,e,i){t.style.animation="",t.setAttribute("opacity",(e-i).toString())},e.prototype.endAnimation=function(t){t.setAttribute("opacity","0"),this.template&&(t.style.display="none"),this.trigger("animationComplete",{tooltip:this})},e.prototype.getPersistData=function(){return this.addOnPersist([])},e.prototype.getModuleName=function(){return"tooltip"},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.element.classList.remove("e-tooltip")},e.prototype.onPropertyChanged=function(t,e){this.blazorTemplate&&ht(this.element.id+"parent_template_blazorTemplate"),this.isFirst=!1,this.render()},Ur([G(!1)],e.prototype,"enable",void 0),Ur([G(!1)],e.prototype,"shared",void 0),Ur([G(!1)],e.prototype,"crosshair",void 0),Ur([G(!0)],e.prototype,"enableShadow",void 0),Ur([G(null)],e.prototype,"fill",void 0),Ur([G("")],e.prototype,"header",void 0),Ur([G(.75)],e.prototype,"opacity",void 0),Ur([_({size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},qr)],e.prototype,"textStyle",void 0),Ur([G(null)],e.prototype,"template",void 0),Ur([G(!0)],e.prototype,"enableAnimation",void 0),Ur([G(300)],e.prototype,"duration",void 0),Ur([G(!1)],e.prototype,"inverted",void 0),Ur([G(!1)],e.prototype,"isNegative",void 0),Ur([_({color:"#cccccc",width:.5},Kr)],e.prototype,"border",void 0),Ur([G([])],e.prototype,"content",void 0),Ur([G(10)],e.prototype,"markerSize",void 0),Ur([_({x:0,y:0},$r)],e.prototype,"clipBounds",void 0),Ur([G([])],e.prototype,"palette",void 0),Ur([G([])],e.prototype,"shapes",void 0),Ur([_({x:0,y:0},$r)],e.prototype,"location",void 0),Ur([G(0)],e.prototype,"offset",void 0),Ur([G(4)],e.prototype,"rx",void 0),Ur([G(4)],e.prototype,"ry",void 0),Ur([G(5)],e.prototype,"marginX",void 0),Ur([G(5)],e.prototype,"marginY",void 0),Ur([G(7)],e.prototype,"arrowPadding",void 0),Ur([G(null)],e.prototype,"data",void 0),Ur([G("Material")],e.prototype,"theme",void 0),Ur([_({x:0,y:0,width:0,height:0},Yr)],e.prototype,"areaBounds",void 0),Ur([G(null)],e.prototype,"availableSize",void 0),Ur([G()],e.prototype,"blazorTemplate",void 0),Ur([G(!1)],e.prototype,"isCanvas",void 0),Ur([G(!1)],e.prototype,"isTextWrap",void 0),Ur([G(null)],e.prototype,"tooltipPlacement",void 0),Ur([G(null)],e.prototype,"controlInstance",void 0),Ur([G("")],e.prototype,"controlName",void 0),Ur([W()],e.prototype,"tooltipRender",void 0),Ur([W()],e.prototype,"loaded",void 0),Ur([W()],e.prototype,"animationComplete",void 0),Ur([G(!1)],e.prototype,"enableRTL",void 0),e=Ur([U],e)}(Gi),Xr="beforePrint",Qr="itemRendering",Zr="drillStart",tn="itemSelected",en="itemHighlight",rn="tooltipRendering",nn="doubleClick",on="rightClick",sn="legendItemRendering",an="legendRendering",ln="Roboto, Segoe UI, Noto, Sans-serif",hn=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),un=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},cn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hn(e,t),un([G("#808080")],e.prototype,"color",void 0),un([G(0)],e.prototype,"width",void 0),e}(ki),pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hn(e,t),un([G(10)],e.prototype,"left",void 0),un([G(10)],e.prototype,"right",void 0),un([G(10)],e.prototype,"top",void 0),un([G(10)],e.prototype,"bottom",void 0),e}(ki),dn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hn(e,t),un([G(null)],e.prototype,"size",void 0),un([G(null)],e.prototype,"color",void 0),un([G(ln)],e.prototype,"fontFamily",void 0),un([G("Normal")],e.prototype,"fontWeight",void 0),un([G("Normal")],e.prototype,"fontStyle",void 0),un([G(1)],e.prototype,"opacity",void 0),e}(ki),fn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hn(e,t),un([G("")],e.prototype,"text",void 0),un([G("")],e.prototype,"description",void 0),e}(ki),gn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hn(e,t),un([_({fontFamily:null},dn)],e.prototype,"textStyle",void 0),un([G("Center")],e.prototype,"alignment",void 0),e}(fn),mn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hn(e,t),un([_({fontFamily:null},dn)],e.prototype,"textStyle",void 0),un([G("Center")],e.prototype,"alignment",void 0),un([_({},gn)],e.prototype,"subtitleSettings",void 0),e}(fn),yn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hn(e,t),un([G(null)],e.prototype,"from",void 0),un([G(null)],e.prototype,"to",void 0),un([G(null)],e.prototype,"color",void 0),un([G(null)],e.prototype,"label",void 0),un([G(null)],e.prototype,"value",void 0),un([G(null)],e.prototype,"minOpacity",void 0),un([G(null)],e.prototype,"maxOpacity",void 0),un([G(!0)],e.prototype,"showLegend",void 0),e}(ki),bn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hn(e,t),un([G(!1)],e.prototype,"visible",void 0),un([G("Default")],e.prototype,"mode",void 0),un([G("transparent")],e.prototype,"background",void 0),un([G("Circle")],e.prototype,"shape",void 0),un([G("")],e.prototype,"width",void 0),un([G("")],e.prototype,"height",void 0),un([_({fontFamily:null},dn)],e.prototype,"textStyle",void 0),un([G(null)],e.prototype,"fill",void 0),un([G(1)],e.prototype,"opacity",void 0),un([G(15)],e.prototype,"shapeWidth",void 0),un([G(15)],e.prototype,"shapeHeight",void 0),un([G(10)],e.prototype,"shapePadding",void 0),un([G(null)],e.prototype,"imageUrl",void 0),un([_({color:"#000000",width:0},cn)],e.prototype,"border",void 0),un([_({color:"#000000",width:0},cn)],e.prototype,"shapeBorder",void 0),un([_({},fn)],e.prototype,"title",void 0),un([_({size:"14px"},dn)],e.prototype,"titleStyle",void 0),un([G("Bottom")],e.prototype,"position",void 0),un([G("None")],e.prototype,"orientation",void 0),un([G(!1)],e.prototype,"invertedPointer",void 0),un([G("After")],e.prototype,"labelPosition",void 0),un([G("None")],e.prototype,"labelDisplayMode",void 0),un([G("Center")],e.prototype,"alignment",void 0),un([G({x:0,y:0})],e.prototype,"location",void 0),un([G(null)],e.prototype,"showLegendPath",void 0),un([G(null)],e.prototype,"valuePath",void 0),un([G(!1)],e.prototype,"removeDuplicateLegend",void 0),e}(ki),vn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hn(e,t),un([G(null)],e.prototype,"groupIndex",void 0),un([G(null)],e.prototype,"groupName",void 0),e}(ki),wn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hn(e,t),un([G(null)],e.prototype,"fill",void 0),un([G(!1)],e.prototype,"autoFill",void 0),un([_({},cn)],e.prototype,"border",void 0),un([G(0)],e.prototype,"gap",void 0),un([G(10)],e.prototype,"padding",void 0),un([G(1)],e.prototype,"opacity",void 0),un([G(!0)],e.prototype,"showLabels",void 0),un([G(null)],e.prototype,"labelPath",void 0),un([G(null)],e.prototype,"labelFormat",void 0),un([G("TopLeft")],e.prototype,"labelPosition",void 0),un([_({color:null,size:"12px"},dn)],e.prototype,"labelStyle",void 0),un([G(null)],e.prototype,"labelTemplate",void 0),un([G("Center")],e.prototype,"templatePosition",void 0),un([G("Trim")],e.prototype,"interSectAction",void 0),un([H([],yn)],e.prototype,"colorMapping",void 0),e}(ki),Sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hn(e,t),un([G(!1)],e.prototype,"visible",void 0),un([G("")],e.prototype,"template",void 0),un([G(null)],e.prototype,"format",void 0),un([G(null)],e.prototype,"fill",void 0),un([G(.75)],e.prototype,"opacity",void 0),un([G(["Circle"])],e.prototype,"markerShapes",void 0),un([_({},cn)],e.prototype,"border",void 0),un([_({fontFamily:ln,size:"13px"},dn)],e.prototype,"textStyle",void 0),e}(ki),Pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hn(e,t),un([G(!1)],e.prototype,"enable",void 0),un([G(null)],e.prototype,"fill",void 0),un([G("0.5")],e.prototype,"opacity",void 0),un([_({},cn)],e.prototype,"border",void 0),un([G("Item")],e.prototype,"mode",void 0),e}(ki),Cn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hn(e,t),un([G(!1)],e.prototype,"enable",void 0),un([G("#808080")],e.prototype,"fill",void 0),un([G("0.5")],e.prototype,"opacity",void 0),un([_({},cn)],e.prototype,"border",void 0),un([G("Item")],e.prototype,"mode",void 0),e}(ki),xn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hn(e,t),un([G(null)],e.prototype,"groupPath",void 0),un([G(0)],e.prototype,"groupGap",void 0),un([G(10)],e.prototype,"groupPadding",void 0),un([_({},cn)],e.prototype,"border",void 0),un([G(null)],e.prototype,"fill",void 0),un([G(!1)],e.prototype,"autoFill",void 0),un([G(1)],e.prototype,"opacity",void 0),un([G(!0)],e.prototype,"showHeader",void 0),un([G(20)],e.prototype,"headerHeight",void 0),un([G(null)],e.prototype,"headerTemplate",void 0),un([G(null)],e.prototype,"headerFormat",void 0),un([G("Near")],e.prototype,"headerAlignment",void 0),un([_({color:null,size:"13px"},dn)],e.prototype,"headerStyle",void 0),un([G("TopLeft")],e.prototype,"templatePosition",void 0),un([H([],yn)],e.prototype,"colorMapping",void 0),e}(ki),On=function(){return function(t,e){this.width=t,this.height=e}}(),Bn=function(){return function(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}}(),Ln=function(){return function(t,e,i,r,n,o){this.y=n.y,this.x=n.x,this.height=n.height,this.width=n.width,this.id=t,this.fill=e,this.opacity=r,this.stroke=i.color,this["stroke-width"]=i.width,this["stroke-dasharray"]=o}}(),Tn=function(){return function(t,e,i,r,n,o,s){this.id=t,this.opacity=n,this.fill=e,this.stroke=r,this["stroke-width"]=i,this["stroke-dasharray"]=o,this.d=s}}(),Mn=function(){return function(t,e,i,r,n,o,s,a){void 0===o&&(o=""),this.transform="",this.baseLine="auto",this.id=t,this.text=n,this.transform=o,this.anchor=r,this.x=e,this.y=i,this.baseLine=s,this.connectorText=a}}(),Dn=function(){return function(t,e){this.x=t,this.y=e}}(),kn=function(){return function(t,e,i){this.r=t,this.g=e,this.b=i}}(),En=function(){return function(t,e,i,r,n){this.dataOptions=t,this.type=e||"GET",this.async=i||!0,this.contentType=r,this.sendData=n}}(),jn=function(){function t(t){this.treemap=t}return t.prototype.processLayoutPanel=function(){var t,e;if(lu.levelsData&&lu.levelsData.length>0)if(t=c(this.treemap.initialDrillDown.groupIndex)||c(this.treemap.initialDrillDown.groupName)||(c(this.treemap.drilledItems)?!c(this.treemap.drilledItems):0!==this.treemap.drilledItems.length)?lu.levelsData[0]:this.getDrilldownData(lu.levelsData[0],[])[0],e=u({},this.treemap.areaRect,e,!1),c(this.treemap.treeMapLegendModule)||c(this.treemap.totalRect)||"Float"!==this.treemap.legendSettings.position&&(e=this.treemap.totalRect),c(this.treemap.currentLevel)||(c(this.treemap.drilledItems)?c(this.treemap.drilledItems):0===this.treemap.drilledItems.length))!c(this.treemap.initialDrillDown.groupIndex)&&(c(this.treemap.drilledItems)?c(this.treemap.drilledItems):0===this.treemap.drilledItems.length)&&(this.treemap.currentLevel=this.treemap.initialDrillDown.groupIndex),this.calculateLayoutItems(t||lu.levelsData[0],e),this.renderLayoutItems(t||lu.levelsData[0]);else{var i=this.treemap.drilledItems.length-1,r=this.treemap.drilledItems[i].data,n={};n[this.treemap.drilledItems[i].data.groupName]=[r],c(this.treemap.initialDrillDown.groupIndex)||this.treemap.enableBreadcrumb||(this.treemap.currentLevel=this.treemap.drilledItems[i].data.groupIndex),this.calculateLayoutItems(n||lu.levelsData[0],e),this.renderLayoutItems(n||lu.levelsData[0])}},t.prototype.getDrilldownData=function(t,e){var i=this.treemap,r={},n=Mt(t).values;if(n&&n.length>0&&0===e.length){for(var o=0;o<n.length;o++)n[o].groupIndex===i.initialDrillDown.groupIndex&&n[o].name===i.initialDrillDown.groupName&&(n[o].isDrilled=!0,r[n[o].groupName]=[n[o]],e.push(r));for(var s=0;s<n.length;s++)this.getDrilldownData(n[s],e)}return e},t.prototype.calculateLayoutItems=function(t,e){this.renderItems=[],this.parentData=[],c(this.treemap.weightValuePath)||(this.treemap.layoutType.indexOf("SliceAndDice")>-1?this.computeSliceAndDiceDimensional(t,e):(e.height=e.height+e.y,e.width=e.width+e.x,this.computeSquarifyDimensional(t,e)))},t.prototype.computeSliceAndDiceDimensional=function(t,e){var i,r,n,o,s=this.treemap.leafItemSettings,a=this.treemap.levels,l=Mt(t).values;if(l&&l.length>0&&(this.sliceAndDiceProcess(l,e),this.treemap.levels.length>0))for(var h=0;h<l.length;h++)r=l[h].groupIndex,n=0===a.length||r===a.length?s.gap:a[r].groupGap,o=0===a.length?0:a[r]?a[r].showHeader?a[r].headerHeight:0:a[r-1].showHeader?a[r-1].headerHeight:0,i=l[h].rect,i=new Bn(i.x+n/2,i.y+(o+n/2),i.width-n,Math.abs(i.height-(n+o))),this.computeSliceAndDiceDimensional(l[h],i);return t},t.prototype.sliceAndDiceProcess=function(t,e){var i,r=e.height*e.width,n=this.treemap.levels,o=0,s=0;t.forEach(function(t){s+=t.weight}),t.forEach(function(t){t.weightArea=r*t.weight/s});var a="SliceAndDiceAuto"===this.treemap.layoutType?e.width>e.height:"SliceAndDiceHorizontal"===this.treemap.layoutType;t.sort(Lt);for(var l=0;l<t.length;l++){var h=t[l];h.isLeafItem=0===n.length||(this.treemap.isHierarchicalData||c(this.treemap.leafItemSettings.labelPath)?h.groupIndex===n.length-1:h.groupIndex===this.treemap.levels.length),a?(i=r/s*t[l].weight/e.height,o<=e.width&&(t[l].rect=new Bn(o+e.x,e.y,i,e.height))):(i=r/s*t[l].weight/e.width,o<=e.height&&(t[l].rect=new Bn(e.x,o+e.y,e.width,i))),o+=i,this.renderItems.push(t[l])}},t.prototype.computeSquarifyDimensional=function(t,e){var i,r,n,o,s,a=this.treemap.leafItemSettings,l=this.treemap.levels,h=Mt(t).values;if(h&&h.length>0&&(0===this.parentData.length&&(this.parentData=[],this.parentData.push(h)),this.calculateChildrenLayout(t,h,e),this.treemap.levels.length>0))for(var u=0;u<h.length;u++)n=(r=h[u]).groupIndex,i=r.rect,o=(r.isLeafItem?a.padding:l[n].groupPadding)/2,s=this.treemap.isHierarchicalData?0===n&&r.isLeafItem?0:l[n]&&l[n].showHeader?l[n].headerHeight:0:0===l.length?0:l[n]&&l[n].showHeader?l[n].headerHeight:0,i=new Bn(i.x+o,i.y+(s+o),i.width-o,i.height-o),!r.isLeafItem&&r.weight>0&&this.computeSquarifyDimensional(h[u],i)},t.prototype.calculateChildrenLayout=function(t,e,i){this.computeTotalArea(e,Rt(i)),e.sort(Xt),this.performRowsLayout(e,[],i,[])},t.prototype.performRowsLayout=function(t,e,i,r){var n=t.length;if(0===n){var o=this.getCoordinates(e,i);return f=r.concat(o)}var s=At(i),a=t[0],l=t.slice(1,n);if(this.aspectRatio(e,a,s)){var h=e.concat(a);return this.performRowsLayout(l,h,i,r)}for(var u=e.length,c=0,p=0;p<u;p+=1)c+=e[p].itemArea;var d=this.cutArea(i,c),f=(o=this.getCoordinates(e,i),r.concat(o));return this.performRowsLayout(t,[],d,f)},t.prototype.aspectRatio=function(t,e,i){if(0===t.length)return!0;var r=t.concat(e);return this.findMaxAspectRatio(t,i)>=this.findMaxAspectRatio(r,i)},t.prototype.findMaxAspectRatio=function(t,e){for(var i=t.length,r=1/0,n=-1/0,o=0,s=0;s<i;s+=1){var a=t[s].itemArea;a<r&&(r=a),a>n&&(n=a),o+=a}return Math.max(Math.pow(e,2)*n/Math.pow(o,2),Math.pow(o,2)/(Math.pow(e,2)*r))},t.prototype.cutArea=function(t,e){var i=Nt(t),r=i.width,n=i.height,o=i.x,s=i.y;if(r>=n){var a=e/n;return Ft({x:o+a,y:s,width:r-a,height:n})}var l=e/r;return Ft({x:o,y:s+l,width:r,height:n-l})},t.prototype.getCoordinates=function(t,e){for(var i,r=Nt(e),n=r.width,o=r.height,s=r.x,a=r.y,l=t.length,h=this.treemap.levels,u=this.treemap.leafItemSettings,p=0,d=0;d<l;d+=1)p+=t[d].itemArea;var f,g,m,y=p/o,b=p/n,v=s,w=a,S=[];for(d=0;d<l;d+=1){var P=t[d];if(i=P.groupIndex,P.isLeafItem=0===h.length||(this.treemap.isHierarchicalData?i===h.length:!c(u.labelPath)&&i===h.length),g=ue(this.parentData[0],P),m=g?this.treemap.areaRect:P.parent.rect,f=P.isLeafItem?u.padding:h[i].groupPadding,n>=o){var C=w+P.itemArea/y;P.rect={x:v,y:w,width:v+y,height:C},w=C}else{var x=v+P.itemArea/b;P.rect={x:v,y:w,width:x,height:w+b},v=x}P.weight>0&&(g||Math.round(e.y+f/2)<=Math.round(m.y+(m.height-m.y))&&Math.round(e.x+f/2)<=Math.round(m.x+(m.width-m.x)))&&(this.renderItems.push(P),S.push(P))}return S},t.prototype.computeTotalArea=function(t,e){for(var i=t.length,r=[],n=0;n<i;n+=1){for(var o=t.length,s=0,a=0;a<o;a+=1)s+=t[a].weight;for(var l=e/s,h=void 0,u=0;u<o;u++)(h=t[u]).itemArea=h.weight*l,r.push(h)}return r},t.prototype.onDemandProcess=function(t){var e,i={};i=t[0].parent,this.treemap.currentLevel=i.isDrilled?i.groupIndex:null;var r={};c(i.groupName)?r=i:r[i.groupName]=[i],e=u({},this.treemap.areaRect,e,!1),c(this.treemap.treeMapLegendModule)||c(this.treemap.totalRect)||(e=this.treemap.totalRect);for(var n=this.treemap.levels.length,o=0;o<n;o++){n===t[0].groupIndex?this.treemap.levels[n]=this.treemap.levels[o]:this.treemap.levels.splice(n-1,1)}this.calculateLayoutItems(r,e),this.renderLayoutItems(r)},t.prototype.renderLayoutItems=function(t){var e,i,r,n,o=this,s=this.treemap;this.renderer=s.renderer;var a,l,h,u,p,d,f,g,m,y,b,v,S,P=s.element.id,C=s.layoutType,x=this.treemap.leafItemSettings.interSectAction,O="",B=document.getElementById(s.element.id+"_Secondary_Element"),L=s.levels;this.layoutGroup=this.renderer.createGroup({id:P+"_TreeMap_"+C+"_Layout"});for(var T,M,D,k,E,j=w("div",{id:s.element.id+"_Label_Template_Group",className:"template",styles:"overflow: hidden; position: absolute;pointer-events: none;top:"+s.areaRect.y+"px;left:"+s.areaRect.x+"px;height:"+s.areaRect.height+"px;width:"+s.areaRect.width+"px;"}),I=!1,R=s.leafItemSettings,A=function(t){if(f=N.renderItems[t],l=f.groupIndex,N.treemap.drillDownView&&c(N.treemap.currentLevel)&&l>0||N.treemap.drillDownView&&l>N.treemap.currentLevel+1)return"continue";u=f.rect,I=f.isLeafItem,y=P+"_Level_Index_"+l+"_Item_Index_"+t,T=N.renderer.createGroup({id:y+"_Group"}),v=(I?R.gap:L[l].groupGap)/2;var w=N.treemap.totalRect?Nt(N.treemap.totalRect):N.treemap.areaRect;"Squarified"===s.layoutType&&(u.width=Math.abs(u.x-u.width)-v,u.height=Math.abs(u.y-u.height)-v),"TopRightBottomLeft"===s.renderDirection?u.x=w.x+w.width-u.width-Math.abs(w.x-u.x):"BottomLeftTopRight"===s.renderDirection?u.y=w.y+w.height-u.height-Math.abs(w.y-u.y):"BottomRightTopLeft"===s.renderDirection&&(u.x=w.x+w.width-u.width-Math.abs(w.x-u.x),u.y=w.y+w.height-u.height-Math.abs(w.y-u.y)),I?R.colorMapping:L[l].colorMapping,r=N.getItemColor(I,f),d=r.fill,m=r.opacity,p=I?R.labelFormat:L[l].headerFormat;var C;if(i=I?R.showLabels:L[l].showHeader,l===N.treemap.currentLevel)if(N.treemap.enableBreadcrumb){E="#"+N.treemap.breadcrumbConnector+"#",C=f.levelOrderName.replace(/#/gi,E),C=0!==l?"#"+C:C}else C=f.name;else N.treemap.enableBreadcrumb&&(f.isDrilled=!1),C=f.name;g=ie(p,f.data,N.treemap)||C||"undefined",k=Mt(f).values,g=!I&&k&&k.length>0&&N.treemap.enableDrillDown?f.isDrilled?s.enableRtl?g+" [-]":"[-] "+g:s.enableRtl?g+" [+]":"[+] "+g:g,(S=I?R.labelStyle:L[l].headerStyle).fontFamily=N.treemap.themeStyle.labelFontFamily||S.fontFamily,D=I?R.border:L[l].border,e=I?R.labelPosition:"Near"===L[l].headerAlignment?"TopLeft":"Center"===L[l].headerAlignment?"TopCenter":"TopRight",h=I?R.templatePosition:L[l].templatePosition,M=I?R.labelTemplate:L[l].headerTemplate,f.options={border:D,opacity:m,fill:d},n={cancel:!1,name:Qr,treemap:N.treemap,text:g,currentItem:f,RenderItems:N.renderItems,options:f.options},N.treemap.trigger(Qr,n,function(r){if(!r.cancel){O=" M "+u.x+" "+u.y+" L "+(u.x+u.width)+" "+u.y+" L "+(u.x+u.width)+" "+(u.y+u.height)+" L "+u.x+" "+(u.y+u.height)+"z",a=new Tn(y+"_RectPath",d,D.width,D.color,m,null,O);var s=o.renderer.drawPath(a);T.appendChild(s),i&&(n.text!==g&&(n.text=ie(n.text,f.data,o.treemap)||C),o.renderItemText(n.text.toString(),T,S,u,x,y,d,e,E)),M&&(c(b=o.renderTemplate(B,y,u,h,M,f,I))||(j.appendChild(b),o.treemap.renderReactTemplates())),T.setAttribute("aria-label",f.name),T.setAttribute("tabindex",(o.treemap.tabIndex+t+2).toString()),Qt(o.treemap,T,"treeMapSelection"),o.layoutGroup.appendChild(T)}})},N=this,F=0;F<this.renderItems.length;F++)A(F);j.childNodes.length>0&&B.appendChild(j),this.treemap.svgObject.appendChild(this.layoutGroup)},t.prototype.renderItemText=function(t,e,i,r,n,o,s,a,l){document.getElementById(this.treemap.element.id+"_Secondary_Element"),this.treemap.leafItemSettings;var h,u,p,d=[],f=[],g=0;if(d=-1!==t.indexOf("<br>")?t.split("<br>"):null,u=this.labelInterSectAction(r,t,i,n),h=wt(d&&d[0]||u[0],i),this.treemap.enableRtl){var m=wt(t,i),y=t.search("[+]")||t.search("[-]");if(r.width<m.width&&y>0){var b=t.substring(y-1,t.length),v=wt("[+]",i);u[0]=St(r.width-v.width-5,u[0],i)+b}}var w=jt(r,a,h,"Text",this.treemap);if(!c(d)){for(var S=[],P=null,C=[],x=0;x<d.length;x++)g+=(h=wt(P=St(r.width-5,d[x],i),i)).height,C.push(h.width),S.push(P);u=S,h.width=Math.max.apply(null,C),h.height=g}if("WrapByWord"===n||"Wrap"===n||"Trim"===n){for(var O=0;O<u.length;O++)g+=(h=wt(u[O],i)).height,r.height-5>g&&f.push(u[O]);if("Wrap"===n&&u.length!==f.length&&f.length){var B=f.length-1,L=f[B];L=L.substring(0,L.length-1)+"...",f.splice(B),"..."!==L&&f.push(L)}}else p=u,f.push(p);xt(new Mn(o+"_Text",w.x,w.y,"start",f,"","",l),i,i.color||this.getSaturatedColor(s),e)},t.prototype.getItemColor=function(t,e){var i=this.treemap,r=t?i.leafItemSettings.fill:i.levels[e.groupIndex].fill,n=t?i.leafItemSettings.opacity:i.levels[e.groupIndex].opacity;c(lu.defaultLevelsData)||lu.defaultLevelsData.length>0&&(lu.levelsData=lu.defaultLevelsData);var o=Mt(lu.levelsData[0]).values,s=t?i.leafItemSettings.colorMapping:i.levels[e.groupIndex].colorMapping;if(s.length>0){var a=zt(s,e.data[this.treemap.equalColorValuePath],e.data[this.treemap.rangeColorValuePath],e.data[this.treemap.weightValuePath]);r=c(a.fill)?i.leafItemSettings.fill:a.fill,n=a.opacity}else for(var l=0;l<o.length;l++)o[l].levelOrderName===e.levelOrderName.split("#")[0]&&(r=c(r)?c(i.colorValuePath)?i.palette.length>0?i.palette[l%i.palette.length]:"#808080":o[l].data[i.colorValuePath]:r);return{fill:r,opacity:n}},t.prototype.getSaturatedColor=function(t){var e=t,i=se(ae(e="transparent"===e?window.getComputedStyle(document.body,null).backgroundColor:e));return Math.round((299*i.r+587*i.g+114*i.b)/1e3)>=128?"black":"white"},t.prototype.renderTemplate=function(t,e,i,r,n,o,s){var a=s?e+"_LabelTemplate":e+"_HeaderTemplate",l=s?"_LabelTemplate":"_HeaderTemplate";if(c(n.prototype))for(var h=Object.keys(o.data),u=0;u<h.length;u++)n=n.replace(new RegExp("{{:"+h[u]+"}}","g"),o.data[h[u].toString()]);var p;if(!c(document.getElementById(this.treemap.element.id+"_Secondary_Element"))){var d=jt(i,r,It(p=Et(kt(n)(o.data,this.treemap,n,this.treemap.element.id+l,!1),a,o.data),t),"Template",this.treemap);p.style.left=d.x+"px",p.style.top=d.y+"px"}return p},t.prototype.labelInterSectAction=function(t,e,i,r){var n,o=t.width-10;switch(r){case"Hide":n=[Jt(o,t.height,e,i)];break;case"Trim":n=[St(o+3,e,i)];break;case"WrapByWord":n=Yt(o,e,i);break;case"Wrap":n=$t(o,e,i)}return n},t}(),In=function(){function t(t){return this.subQuery=null,this.isChild=!1,this.distincts=[],this.queries=[],this.key="",this.fKey="","string"==typeof t?this.fromTable=t:t&&t instanceof Array&&(this.lookups=t),this.expands=[],this.sortedColumns=[],this.groupedColumns=[],this.subQuery=null,this.isChild=!1,this.params=[],this.lazyLoad=[],this}return t.prototype.setKey=function(t){return this.key=t,this},t.prototype.using=function(t){return this.dataManager=t,this},t.prototype.execute=function(t,e,i,r){return(t=t||this.dataManager)?t.executeQuery(this,e,i,r):Nn.throwError('Query - execute() : dataManager needs to be is set using "using" function or should be passed as argument')},t.prototype.executeLocal=function(t){return(t=t||this.dataManager)?t.executeLocal(this):Nn.throwError('Query - executeLocal() : dataManager needs to be is set using "using" function or should be passed as argument')},t.prototype.clone=function(){var e=new t;return e.queries=this.queries.slice(0),e.key=this.key,e.isChild=this.isChild,e.dataManager=this.dataManager,e.fromTable=this.fromTable,e.params=this.params.slice(0),e.expands=this.expands.slice(0),e.sortedColumns=this.sortedColumns.slice(0),e.groupedColumns=this.groupedColumns.slice(0),e.subQuerySelector=this.subQuerySelector,e.subQuery=this.subQuery,e.fKey=this.fKey,e.isCountRequired=this.isCountRequired,e.distincts=this.distincts.slice(0),e.lazyLoad=this.lazyLoad.slice(0),e},t.prototype.from=function(t){return this.fromTable=t,this},t.prototype.addParams=function(t,e){return"function"==typeof e?this.params.push({key:t,fn:e}):this.params.push({key:t,value:e}),this},t.prototype.distinct=function(t){return this.distincts="string"==typeof t?[].slice.call([t],0):t.slice(0),this},t.prototype.expand=function(t){return this.expands="string"==typeof t?[].slice.call([t],0):t.slice(0),this},t.prototype.where=function(t,e,i,r,n){e=e?e.toLowerCase():null;var o=null;return"string"==typeof t?o=new Rn(t,e,i,r,n):t instanceof Rn&&(o=t),this.queries.push({fn:"onWhere",e:o}),this},t.prototype.search=function(t,e,i,r,n){"string"==typeof e&&(e=[e]),i&&"none"!==i||(i="contains");var o=Nn.fnOperators[i];return this.queries.push({fn:"onSearch",e:{fieldNames:e,operator:i,searchKey:t,ignoreCase:r,ignoreAccent:n,comparer:o}}),this},t.prototype.sortBy=function(t,e,i){return this.sortByForeignKey(t,e,i)},t.prototype.sortByForeignKey=function(e,i,r,n){var o,s,a=c(n)?"ascending":n;if("string"==typeof e&&Nn.endsWith(e.toLowerCase()," desc")&&(e=e.replace(/ desc$/i,""),i="descending"),i&&"string"!=typeof i||(a=i?i.toLowerCase():"ascending",i=Nn.fnSort(i)),r){o=t.filterQueries(this.queries,"onSortBy");for(var l=0;l<o.length;l++)if("string"==typeof(s=o[l].e.fieldName)){if(s===e)return this}else if(s instanceof Array)for(var h=0;h<s.length;h++)if(s[h]===e||e.toLowerCase()===s[h]+" desc")return this}return this.queries.push({fn:"onSortBy",e:{fieldName:e,comparer:i,direction:a}}),this},t.prototype.sortByDesc=function(t){return this.sortBy(t,"descending")},t.prototype.group=function(t,e,i){return this.sortBy(t,null,!0),this.queries.push({fn:"onGroup",e:{fieldName:t,comparer:e||null,format:i||null}}),this},t.prototype.page=function(t,e){return this.queries.push({fn:"onPage",e:{pageIndex:t,pageSize:e}}),this},t.prototype.range=function(t,e){return this.queries.push({fn:"onRange",e:{start:t,end:e}}),this},t.prototype.take=function(t){return this.queries.push({fn:"onTake",e:{nos:t}}),this},t.prototype.skip=function(t){return this.queries.push({fn:"onSkip",e:{nos:t}}),this},t.prototype.select=function(t){return"string"==typeof t&&(t=[].slice.call([t],0)),this.queries.push({fn:"onSelect",e:{fieldNames:t}}),this},t.prototype.hierarchy=function(t,e){return this.subQuerySelector=e,this.subQuery=t,this},t.prototype.foreignKey=function(t){return this.fKey=t,this},t.prototype.requiresCount=function(){return this.isCountRequired=!0,this},t.prototype.aggregate=function(t,e){return this.queries.push({fn:"onAggregates",e:{field:e,type:t}}),this},t.filterQueries=function(t,e){return t.filter(function(t){return t.fn===e})},t.filterQueryLists=function(t,e){for(var i=t.filter(function(t){return-1!==e.indexOf(t.fn)}),r={},n=0;n<i.length;n++)r[i[n].fn]||(r[i[n].fn]=i[n].e);return r},t}(),Rn=function(){function t(e,i,r,n,o){return void 0===n&&(n=!1),this.ignoreAccent=!1,this.isComplex=!1,"string"==typeof e?(this.field=e,this.operator=i.toLowerCase(),this.value=r,this.ignoreCase=n,this.ignoreAccent=o,this.isComplex=!1,this.comparer=Nn.fnOperators.processOperator(this.operator)):(e instanceof t&&r instanceof t||r instanceof Array)&&(this.isComplex=!0,this.condition=i.toLowerCase(),this.predicates=[e],r instanceof Array?[].push.apply(this.predicates,r):this.predicates.push(r)),this}return t.and=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.combinePredicates([].slice.call(e,0),"and")},t.prototype.and=function(e,i,r,n,o){return t.combine(this,e,i,r,"and",n,o)},t.or=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return t.combinePredicates([].slice.call(e,0),"or")},t.prototype.or=function(e,i,r,n,o){return t.combine(this,e,i,r,"or",n,o)},t.fromJson=function(t){if(t instanceof Array){for(var e=[],i=0,r=t.length;i<r;i++)e.push(this.fromJSONData(t[i]));return e}var n=t;return this.fromJSONData(n)},t.prototype.validate=function(t){var e,i,r=this.predicates?this.predicates:[];if(!this.isComplex&&this.comparer)return this.comparer.call(this,Nn.getObject(this.field,t),this.value,this.ignoreCase,this.ignoreAccent);e="and"===this.condition;for(var n=0;n<r.length;n++)if(i=r[n].validate(t),e){if(!i)return!1}else if(i)return!0;return e},t.prototype.toJson=function(){var t,e;if(this.isComplex){t=[],e=this.predicates;for(var i=0;i<e.length;i++)t.push(e[i].toJson())}return{isComplex:this.isComplex,field:this.field,operator:this.operator,value:this.value,ignoreCase:this.ignoreCase,ignoreAccent:this.ignoreAccent,condition:this.condition,predicates:t}},t.combinePredicates=function(e,i){if(1===e.length){if(!(e[0]instanceof Array))return e[0];e=e[0]}return new t(e[0],i,e.slice(1))},t.combine=function(e,i,r,n,o,s,a){return i instanceof t?t[o](e,i):"string"==typeof i?t[o](e,new t(i,r,n,s,a)):Nn.throwError("Predicate - "+o+" : invalid arguments")},t.fromJSONData=function(e){for(var i=e.predicates||[],r=i.length,n=[],o=0;o<r;o++)n.push(this.fromJSONData(i[o]));return e.isComplex?new t(n[0],e.condition,n.slice(1)):new t(e.field,e.operator,e.value,e.ignoreCase,e.ignoreAccent)},t}(),An={GroupGuid:"{271bbba0-1ee7}"},Nn=function(){function t(){}return t.getValue=function(t,e){return"function"==typeof t?t.call(e||{}):t},t.endsWith=function(t,e){return t.slice&&t.slice(-e.length)===e},t.startsWith=function(t,e){return t.slice(0,e.length)===e},t.fnSort=function(e){return"ascending"===(e=e?t.toLowerCase(e):"ascending")?this.fnAscending:this.fnDescending},t.fnAscending=function(t,e){return c(t)&&c(e)?-1:null===e||void 0===e?-1:"string"==typeof t?t.localeCompare(e):null===t||void 0===t?1:t-e},t.fnDescending=function(t,e){return c(t)&&c(e)?-1:null===e||void 0===e?1:"string"==typeof t?-1*t.localeCompare(e):null===t||void 0===t?-1:e-t},t.extractFields=function(t,e){for(var i={},r=0;r<e.length;r++)i=this.setValue(e[r],this.getObject(e[r],t),i);return i},t.select=function(t,e){for(var i=[],r=0;r<t.length;r++)i.push(this.extractFields(t[r],e));return i},t.group=function(e,i,r,n,o,s,a){n=n||1;var l=e;if(l.GroupGuid===An.GroupGuid){for(var h=function(t){if(c(o))l[t].items=u.group(l[t].items,i,r,l.level+1,null,s,a),l[t].count=l[t].items.length;else{var e=-1,n=o.filter(function(e){return e.key===l[t].key});e=o.indexOf(n[0]),l[t].items=u.group(l[t].items,i,r,l.level+1,o[e].items,s,a),l[t].count=o[e].count}},u=this,p=0;p<l.length;p++)h(p);return l.childLevels+=1,l}var d={},f=[];f.GroupGuid=An.GroupGuid,f.level=n,f.childLevels=0,f.records=l;for(var g=function(t){var e=m.getVal(l,t,i);if(c(s)||(e=s(e,i)),!d[e]&&(d[e]={key:e,count:0,items:[],aggregates:{},field:i},f.push(d[e]),!c(o))){var n=o.filter(function(t){return t.key===d[e].key});d[e].count=n[0].count}d[e].count=c(o)?d[e].count+=1:d[e].count,(!a||a&&r.length)&&d[e].items.push(l[t])},m=this,y=0;y<l.length;y++)g(y);if(r&&r.length){var b=function(e){for(var i={},n=void 0,s=r,a=0;a<r.length;a++)if(n=t.aggregates[r[a].type],c(o))n&&(i[s[a].field+" - "+s[a].type]=n(f[e].items,s[a].field));else{var l=o.filter(function(t){return t.key===f[e].key});n&&(i[s[a].field+" - "+s[a].type]=n(l[0].items,s[a].field))}f[e].aggregates=i};for(y=0;y<f.length;y++)b(y)}if(a&&f.length&&r.length)for(y=0;y<f.length;y++)f[y].items=[];return l.length&&f||l},t.buildHierarchy=function(t,e,i,r,n){var o,s={};for(r.result&&(r=r.result),r.GroupGuid&&this.throwError("DataManager: Do not have support Grouping in hierarchy"),o=0;o<r.length;o++){(s[a=this.getObject(t,r[o])]||(s[a]=[])).push(r[o])}for(o=0;o<i.length;o++){var a=this.getObject(n||t,i[o]);i[o][e]=s[a]}},t.getFieldList=function(t,e,i){if(void 0===i&&(i=""),void 0===e||null===e)return this.getFieldList(t,[],i);for(var r=t,n=0,o=Object.keys(t);n<o.length;n++){var s=o[n];"object"!=typeof r[s]||r[s]instanceof Array?e.push(i+s):this.getFieldList(r[s],e,i+s+".")}return e},t.getObject=function(t,e){if(!t)return e;if(e){if(-1===t.indexOf("."))return e[t];for(var i=e,r=t.split("."),n=0;n<r.length&&null!=i;n++)i=i[r[n]];return i}},t.setValue=function(t,e,i){var r,n,o=t.toString().split("."),s=i||{},a=s,l=o.length;for(r=0;r<l;r++)n=o[r],r+1===l?a[n]=void 0===e?void 0:e:c(a[n])&&(a[n]={}),a=a[n];return s},t.sort=function(t,e,i){if(t.length<=1)return t;var r=parseInt((t.length/2).toString(),10),n=t.slice(0,r),o=t.slice(r);return n=this.sort(n,e,i),o=this.sort(o,e,i),this.merge(n,o,e,i)},t.ignoreDiacritics=function(e){if("string"!=typeof e)return e;return e.split("").map(function(e){return e in t.diacritics?t.diacritics[e]:e}).join("")},t.merge=function(t,e,i,r){for(var n,o=[];t.length>0||e.length>0;)n=t.length>0&&e.length>0?r?r(this.getVal(t,0,i),this.getVal(e,0,i),t[0],e[0])<=0?t:e:t[0][i]<t[0][i]?t:e:t.length>0?t:e,o.push(n.shift());return o},t.getVal=function(t,e,i){return i?this.getObject(i,t[e]):t[e]},t.toLowerCase=function(t){return t?"string"==typeof t?t.toLowerCase():t.toString():0===t||!1===t?t.toString():""},t.callAdaptorFunction=function(t,e,i,r){if(e in t){var n=t[e](i,r);c(n)||(i=n)}return i},t.getAddParams=function(e,i,r){var n={};return t.callAdaptorFunction(e,"addParams",{dm:i,query:r,params:r.params,reqParams:n}),n},t.isPlainObject=function(t){return!!t&&t.constructor===Object},t.isCors=function(){var t=null;try{t=new window.XMLHttpRequest}catch(t){}return!!t&&"withCredentials"in t},t.getGuid=function(t){var e;return(t||"")+"00000000-0000-4000-0000-000000000000".replace(/0/g,function(t,i){if("crypto"in window&&"getRandomValues"in crypto){var r=new Uint8Array(1);window.crypto.getRandomValues(r),e=r[0]%16|0}else e=16*Math.random()|0;return"0123456789abcdef"[19===i?3&e|8:e]})},t.isNull=function(t){return void 0===t||null===t},t.getItemFromComparer=function(e,i,r){var n,o,s,a=0,l="string"==typeof t.getVal(e,0,i);if(e.length)for(;c(n)&&a<e.length;)n=t.getVal(e,a,i),s=e[a++];for(;a<e.length;a++)c(o=t.getVal(e,a,i))||(l&&(n=+n,o=+o),r(n,o)>0&&(n=o,s=e[a]));return s},t.distinct=function(e,i,r){r=!c(r)&&r;var n,o=[],s={};return e.forEach(function(a,l){(n="object"==typeof e[l]?t.getVal(e,l,i):e[l])in s||(o.push(r?e[l]:n),s[n]=1)}),o},t.processData=function(t,e){var i=this.prepareQuery(t),r=new Kn(e);t.requiresCounts&&i.requiresCount();var n=r.executeLocal(i),o={result:t.requiresCounts?n.result:n,count:n.count,aggregates:JSON.stringify(n.aggregates)};return t.requiresCounts?o:n},t.prepareQuery=function(e){var i=this,r=new In;if(e.select&&r.select(e.select),e.where){t.parse.parseJson(e.where).filter(function(t){if(c(t.condition))r.where(t.field,t.operator,t.value,t.ignoreCase,t.ignoreAccent);else{var e=[];t.field?e.push(new Rn(t.field,t.operator,t.value,t.ignoreCase,t.ignoreAccent)):e=e.concat(i.getPredicate(t.predicates)),"or"==t.condition?r.where(Rn.or(e)):"and"==t.condition&&r.where(Rn.and(e))}})}if(e.search){t.parse.parseJson(e.search).filter(function(t){return r.search(t.key,t.fields,t.operator,t.ignoreCase,t.ignoreAccent)})}return e.aggregates&&e.aggregates.filter(function(t){return r.aggregate(t.type,t.field)}),e.sorted&&e.sorted.filter(function(t){return r.sortBy(t.name,t.direction)}),e.skip&&r.skip(e.skip),e.take&&r.take(e.take),e.group&&e.group.filter(function(t){return r.group(t)}),r},t.getPredicate=function(t){for(var e=[],i=0;i<t.length;i++){var r=t[i];if(r.field)e.push(new Rn(r.field,r.operator,r.value,r.ignoreCase,r.ignoreAccent));else{for(var n=[],o=this.getPredicate(r.predicates),s=0,a=Object.keys(o);s<a.length;s++){var l=a[s];n.push(o[l])}e.push("or"==r.condition?Rn.or(n):Rn.and(n))}}return e},t.serverTimezoneOffset=null,t.timeZoneHandling=!0,t.throwError=function(t){try{throw new Error(t)}catch(t){throw t.message+"\n"+t.stack}},t.aggregates={sum:function(e,i){for(var r,n=0,o="number"!=typeof t.getVal(e,0,i),s=0;s<e.length;s++)r=t.getVal(e,s,i),isNaN(r)||null===r||(o&&(r=+r),n+=r);return n},average:function(e,i){return t.aggregates.sum(e,i)/e.length},min:function(e,i){var r;return"function"==typeof i&&(r=i,i=null),t.getObject(i,t.getItemFromComparer(e,i,r||t.fnAscending))},max:function(e,i){var r;return"function"==typeof i&&(r=i,i=null),t.getObject(i,t.getItemFromComparer(e,i,r||t.fnDescending))},truecount:function(t,e){return new Kn(t).executeLocal((new In).where(e,"equal",!0,!0)).length},falsecount:function(t,e){return new Kn(t).executeLocal((new In).where(e,"equal",!1,!0)).length},count:function(t,e){return t.length}},t.operatorSymbols={"<":"lessthan",">":"greaterthan","<=":"lessthanorequal",">=":"greaterthanorequal","==":"equal","!=":"notequal","*=":"contains","$=":"endswith","^=":"startswith"},t.odBiOperator={"<":" lt ",">":" gt ","<=":" le ",">=":" ge ","==":" eq ","!=":" ne ",lessthan:" lt ",lessthanorequal:" le ",greaterthan:" gt ",greaterthanorequal:" ge ",equal:" eq ",notequal:" ne "},t.odUniOperator={"$=":"endswith","^=":"startswith","*=":"substringof",endswith:"endswith",startswith:"startswith",contains:"substringof"},t.odv4UniOperator={"$=":"endswith","^=":"startswith","*=":"contains",endswith:"endswith",startswith:"startswith",contains:"contains"},t.diacritics={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"},t.fnOperators={equal:function(e,i,r,n){return n&&(e=t.ignoreDiacritics(e),i=t.ignoreDiacritics(i)),r?t.toLowerCase(e)===t.toLowerCase(i):e===i},notequal:function(e,i,r,n){return n&&(e=t.ignoreDiacritics(e),i=t.ignoreDiacritics(i)),!t.fnOperators.equal(e,i,r)},lessthan:function(e,i,r){return r?t.toLowerCase(e)<t.toLowerCase(i):(c(e)&&(e=void 0),e<i)},greaterthan:function(e,i,r){return r?t.toLowerCase(e)>t.toLowerCase(i):e>i},lessthanorequal:function(e,i,r){return r?t.toLowerCase(e)<=t.toLowerCase(i):(c(e)&&(e=void 0),e<=i)},greaterthanorequal:function(e,i,r){return r?t.toLowerCase(e)>=t.toLowerCase(i):e>=i},contains:function(e,i,r,n){return n&&(e=t.ignoreDiacritics(e),i=t.ignoreDiacritics(i)),r?!c(e)&&!c(i)&&-1!==t.toLowerCase(e).indexOf(t.toLowerCase(i)):!c(e)&&!c(i)&&-1!==e.toString().indexOf(i)},notnull:function(t){return null!==t},isnull:function(t){return null===t},startswith:function(e,i,r,n){return n&&(e=t.ignoreDiacritics(e),i=t.ignoreDiacritics(i)),r?e&&i&&t.startsWith(t.toLowerCase(e),t.toLowerCase(i)):e&&i&&t.startsWith(e,i)},endswith:function(e,i,r,n){return n&&(e=t.ignoreDiacritics(e),i=t.ignoreDiacritics(i)),r?e&&i&&t.endsWith(t.toLowerCase(e),t.toLowerCase(i)):e&&i&&t.endsWith(e,i)},processSymbols:function(e){var i=t.operatorSymbols[e];if(i){return t.fnOperators[i]}return t.throwError("Query - Process Operator : Invalid operator")},processOperator:function(e){var i=t.fnOperators[e];return i||t.fnOperators.processSymbols(e)}},t.parse={parseJson:function(e){return"string"==typeof e?e=JSON.parse(e,t.parse.jsonReviver):e instanceof Array?t.parse.iterateAndReviveArray(e):"object"==typeof e&&null!==e&&t.parse.iterateAndReviveJson(e),e},iterateAndReviveArray:function(e){for(var i=0;i<e.length;i++)"object"==typeof e[i]&&null!==e[i]?t.parse.iterateAndReviveJson(e[i]):"string"!=typeof e[i]||/^[\s]*\[|^[\s]*\{(.)+:|\"/g.test(e[i])?e[i]=t.parse.parseJson(e[i]):e[i]=t.parse.jsonReviver("",e[i])},iterateAndReviveJson:function(e){for(var i,r=0,n=Object.keys(e);r<n.length;r++){var o=n[r];t.startsWith(o,"__")||("object"==typeof(i=e[o])?i instanceof Array?t.parse.iterateAndReviveArray(i):i&&t.parse.iterateAndReviveJson(i):e[o]=t.parse.jsonReviver(e[o],i))}},jsonReviver:function(e,i){if("string"==typeof i){var r=/^\/Date\(([+-]?[0-9]+)([+-][0-9]{4})?\)\/$/.exec(i),n=t.timeZoneHandling?t.serverTimezoneOffset:null;if(r)return t.dateParse.toTimeZone(new Date(parseInt(r[1],10)),n,!0);if(/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*){1})([zZ]|([+\-])(\d\d):?(\d\d))?$/.test(i)){var o=i.indexOf("Z")>-1||i.indexOf("z")>-1,s=i.split(/[^0-9.]/);if(o)i=t.dateParse.toTimeZone(new Date(parseInt(s[0],10),parseInt(s[1],10)-1,parseInt(s[2],10),parseInt(s[3],10),parseInt(s[4],10),parseInt(s[5],10)),t.serverTimezoneOffset,!1);else{var a=new Date(parseInt(s[0],10),parseInt(s[1],10)-1,parseInt(s[2],10),parseInt(s[3],10),parseInt(s[4],10),parseInt(s[5],10)),l=parseInt(s[6],10),h=parseInt(s[7],10);if(isNaN(l)&&isNaN(h))return a;i.indexOf("+")>-1?a.setHours(a.getHours()-l,a.getMinutes()-h):a.setHours(a.getHours()+l,a.getMinutes()+h),i=t.dateParse.toTimeZone(a,t.serverTimezoneOffset,!1)}null==t.serverTimezoneOffset&&(i=t.dateParse.addSelfOffset(i))}}return i},isJson:function(e){return"string"==typeof e[0]?e:t.parse.parseJson(e)},isGuid:function(t){return null!=/[A-Fa-f0-9]{8}(?:-[A-Fa-f0-9]{4}){3}-[A-Fa-f0-9]{12}/i.exec(t)},replacer:function(e,i){return t.isPlainObject(e)?t.parse.jsonReplacer(e,i):e instanceof Array?t.parse.arrayReplacer(e):e instanceof Date?t.parse.jsonReplacer({val:e},i).val:e},jsonReplacer:function(e,i){for(var r,n=0,o=Object.keys(e);n<o.length;n++){var s=o[n];if((r=e[s])instanceof Date){var a=r;null==t.serverTimezoneOffset?e[s]=t.dateParse.toTimeZone(a,null).toJSON():(a=new Date(+a+36e5*t.serverTimezoneOffset),e[s]=t.dateParse.toTimeZone(t.dateParse.addSelfOffset(a),null).toJSON())}}return e},arrayReplacer:function(e){for(var i=0;i<e.length;i++)t.isPlainObject(e[i])?e[i]=t.parse.jsonReplacer(e[i]):e[i]instanceof Date&&(e[i]=t.parse.jsonReplacer({date:e[i]}).date);return e},jsonDateReplacer:function(e,i){if("value"===e&&i){if("string"==typeof i){var r=/^\/Date\(([+-]?[0-9]+)([+-][0-9]{4})?\)\/$/.exec(i);if(r)i=t.dateParse.toTimeZone(new Date(parseInt(r[1],10)),null,!0);else if(/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*){1})([zZ]|([+\-])(\d\d):?(\d\d))?$/.test(i)){var n=i.split(/[^0-9]/);i=t.dateParse.toTimeZone(new Date(parseInt(n[0],10),parseInt(n[1],10)-1,parseInt(n[2],10),parseInt(n[3],10),parseInt(n[4],10),parseInt(n[5],10)),null,!0)}}if(i instanceof Date)return i=t.dateParse.addSelfOffset(i),null===t.serverTimezoneOffset?t.dateParse.toTimeZone(t.dateParse.addSelfOffset(i),null).toJSON():(i=t.dateParse.toTimeZone(i,i.getTimezoneOffset()/60*2-t.serverTimezoneOffset,!1)).toJSON()}return i}},t.dateParse={addSelfOffset:function(t){return new Date(+t-6e4*t.getTimezoneOffset())},toUTC:function(t){return new Date(+t+6e4*t.getTimezoneOffset())},toTimeZone:function(e,i,r){if(null===i)return e;var n=r?t.dateParse.toUTC(e):e;return new Date(+n-36e5*i)},toLocalTime:function(t){var e=t,i=-e.getTimezoneOffset(),r=i>=0?"+":"-",n=function(t){var e=Math.floor(Math.abs(t));return(e<10?"0":"")+e};return e.getFullYear()+"-"+n(e.getMonth()+1)+"-"+n(e.getDate())+"T"+n(e.getHours())+":"+n(e.getMinutes())+":"+n(e.getSeconds())+r+n(i/60)+":"+n(i%60)}},t}(),Fn=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Vn={GroupGuid:"{271bbba0-1ee7}"},zn=function(){function t(e){this.options={from:"table",requestType:"json",sortBy:"sorted",select:"select",skip:"skip",group:"group",take:"take",search:"search",count:"requiresCounts",where:"where",aggregates:"aggregates",expand:"expand"},this.type=t,this.dataSource=e,this.pvt={}}return t.prototype.processResponse=function(t,e,i,r){return t},t}(),Gn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Fn(e,t),e.prototype.processQuery=function(t,e){for(var i,r,n,o=t.dataSource.json.slice(0),s=o.length,a=!0,l={},h=0,u=[],c=0;c<e.lazyLoad.length;c++)h++,l[e.lazyLoad[c].key]=e.lazyLoad[c].value;var p={};for(c=0;c<e.queries.length;c++)"onPage"!==(r=e.queries[c]).fn&&"onGroup"!==r.fn||!e.lazyLoad.length?(i=this[r.fn].call(this,o,r.e,e),"onAggregates"===r.fn?p[r.e.field+" - "+r.e.type]=i:o=void 0!==i?i:o,"onPage"!==r.fn&&"onSkip"!==r.fn&&"onTake"!==r.fn&&"onRange"!==r.fn||(a=!1),a&&(s=o.length)):("onGroup"===r.fn&&u.push(r.e),"onPage"===r.fn&&(n=r.e));if(h){var d={query:e,lazyLoad:l,result:o,group:u,page:n},f=this.lazyLoadGroup(d);o=f.result,s=f.count}return e.isCountRequired&&(o={result:o,count:s,aggregates:p}),o},e.prototype.lazyLoadGroup=function(t){var e=0,i=this.getAggregate(t.query),r=t.result;if(c(t.lazyLoad.onDemandGroupInfo)){s=t.group[0].fieldName;e=(r=Nn.group(r,s,i,null,null,t.group[0].comparer,!0)).length;a=r;t.page&&(r=this.onPage(r,t.page,t.query)),this.formGroupResult(r,a)}else{for(var n=t.lazyLoad.onDemandGroupInfo,o=n.where.length-1;o>=0;o--)r=this.onWhere(r,n.where[o]);if(t.group.length!==n.level){var s=t.group[n.level].fieldName;r=Nn.group(r,s,i,null,null,t.group[0].comparer,!0)}e=r.length;var a=r;r=(r=r.slice(n.skip)).slice(0,n.take),t.group.length!==n.level&&this.formGroupResult(r,a)}return{result:r,count:e}},e.prototype.formGroupResult=function(t,e){if(t.length&&e.length){t.GroupGuid=e.GroupGuid,t.childLevels=e.childLevels,t.level=e.level,t.records=e.records}return t},e.prototype.getAggregate=function(t){var e=In.filterQueries(t.queries,"onAggregates"),i=[];if(e.length)for(var r=void 0,n=0;n<e.length;n++)r=e[n].e,i.push({type:r.type,field:Nn.getValue(r.field,t)});return i},e.prototype.batchRequest=function(t,e,i){var r,n=e.deletedRecords.length;for(r=0;r<e.addedRecords.length;r++)this.insert(t,e.addedRecords[r]);for(r=0;r<e.changedRecords.length;r++)this.update(t,i.key,e.changedRecords[r]);for(r=0;r<n;r++)this.remove(t,i.key,e.deletedRecords[r]);return e},e.prototype.onWhere=function(t,e){return t&&t.length?t.filter(function(t){if(e)return e.validate(t)}):t},e.prototype.onAggregates=function(t,e){var i=Nn.aggregates[e.type];return t&&i&&0!==t.length?i(t,e.field):null},e.prototype.onSearch=function(t,e){return t&&t.length?(0===e.fieldNames.length&&Nn.getFieldList(t[0],e.fieldNames),t.filter(function(t){for(var i=0;i<e.fieldNames.length;i++)if(e.comparer.call(t,Nn.getObject(e.fieldNames[i],t),e.searchKey,e.ignoreCase,e.ignoreAccent))return!0;return!1})):t},e.prototype.onSortBy=function(t,e,i){if(!t||!t.length)return t;var r,n=Nn.getValue(e.fieldName,i);if(!n)return t.sort(e.comparer);if(n instanceof Array){for(var o=(n=n.slice(0)).length-1;o>=0;o--)n[o]&&(r=e.comparer,Nn.endsWith(n[o]," desc")&&(r=Nn.fnSort("descending"),n[o]=n[o].replace(" desc","")),t=Nn.sort(t,n[o],r));return t}return Nn.sort(t,n,e.comparer)},e.prototype.onGroup=function(t,e,i){if(!t||!t.length)return t;var r=this.getAggregate(i);return Nn.group(t,Nn.getValue(e.fieldName,i),r,null,null,e.comparer)},e.prototype.onPage=function(t,e,i){var r=Nn.getValue(e.pageSize,i),n=(Nn.getValue(e.pageIndex,i)-1)*r,o=n+r;return t&&t.length?t.slice(n,o):t},e.prototype.onRange=function(t,e){return t&&t.length?t.slice(Nn.getValue(e.start),Nn.getValue(e.end)):t},e.prototype.onTake=function(t,e){return t&&t.length?t.slice(0,Nn.getValue(e.nos)):t},e.prototype.onSkip=function(t,e){return t&&t.length?t.slice(Nn.getValue(e.nos)):t},e.prototype.onSelect=function(t,e){return t&&t.length?Nn.select(t,Nn.getValue(e.fieldNames)):t},e.prototype.insert=function(t,e,i,r,n){return c(n)?t.dataSource.json.push(e):t.dataSource.json.splice(n,0,e)},e.prototype.remove=function(t,e,i,r){var n,o=t.dataSource.json;for("object"!=typeof i||i instanceof Date||(i=Nn.getObject(e,i)),n=0;n<o.length&&Nn.getObject(e,o[n])!==i;n++);return n!==o.length?o.splice(n,1):null},e.prototype.update=function(t,e,i,r){var n,s,a=t.dataSource.json;for(c(e)||(s=o(e,i)),n=0;n<a.length&&(c(e)||o(e,a[n])!==s);n++);return n<a.length?h(a[n],i):null},e}(zn),_n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Fn(e,t),e.prototype.processQuery=function(t,e,i){var r,n,o=this.getQueryRequest(e),s=In.filterQueryLists(e.queries,["onSelect","onPage","onSkip","onTake","onRange"]),a=e.params,l=t.dataSource.url,h=null,u=this.options,p={sorts:[],groups:[],filters:[],searches:[],aggregates:[]};"onPage"in s?(r=s.onPage,n=((n=Nn.getValue(r.pageIndex,e))-1)*(h=Nn.getValue(r.pageSize,e))):"onRange"in s&&(n=(r=s.onRange).start,h=r.end-r.start);for(var d=0;d<o.sorts.length;d++)r=Nn.getValue(o.sorts[d].e.fieldName,e),p.sorts.push(Nn.callAdaptorFunction(this,"onEachSort",{name:r,direction:o.sorts[d].e.direction},e));i&&(r=this.getFiltersFrom(i,e))&&p.filters.push(Nn.callAdaptorFunction(this,"onEachWhere",r.toJson(),e));for(d=0;d<o.filters.length;d++){var f=Nn.callAdaptorFunction(this,"onEachWhere",o.filters[d].e.toJson(),e);this.getModuleName&&"ODataV4Adaptor"===this.getModuleName()&&!c(o.filters[d].e.key)&&o.filters.length>1&&(f="("+f+")"),p.filters.push(f);for(var g=0,m="object"==typeof p.filters[d]?Object.keys(p.filters[d]):[];g<m.length;g++){var y=m[g];Nn.isNull(p[y])&&delete p[y]}}for(d=0;d<o.searches.length;d++)r=o.searches[d].e,p.searches.push(Nn.callAdaptorFunction(this,"onEachSearch",{fields:r.fieldNames,operator:r.operator,key:r.searchKey,ignoreCase:r.ignoreCase},e));for(d=0;d<o.groups.length;d++)p.groups.push(Nn.getValue(o.groups[d].e.fieldName,e));for(d=0;d<o.aggregates.length;d++)r=o.aggregates[d].e,p.aggregates.push({type:r.type,field:Nn.getValue(r.field,e)});var b={};if(this.getRequestQuery(u,e,s,p,b),Nn.callAdaptorFunction(this,"addParams",{dm:t,query:e,params:a,reqParams:b}),e.lazyLoad.length)for(d=0;d<e.lazyLoad.length;d++)b[e.lazyLoad[d].key]=e.lazyLoad[d].value;for(var v=0,w=Object.keys(b);v<w.length;v++){y=w[v];(Nn.isNull(b[y])||""===b[y]||0===b[y].length)&&delete b[y]}u.skip in b&&u.take in b||null===h||(b[u.skip]=Nn.callAdaptorFunction(this,"onSkip",n,e),b[u.take]=Nn.callAdaptorFunction(this,"onTake",h,e));var S=this.pvt;return this.pvt={},"json"===this.options.requestType?{data:JSON.stringify(b,Nn.parse.jsonDateReplacer),url:l,pvtData:S,type:"POST",contentType:"application/json; charset=utf-8"}:(r=this.convertToQueryString(b,e,t),r=(-1!==t.dataSource.url.indexOf("?")?"&":"/")+r,{type:"GET",url:r.length?l.replace(/\/*$/,r):l,pvtData:S})},e.prototype.getRequestQuery=function(t,e,i,r,n){var o=n;o[t.from]=e.fromTable,t.apply&&e.distincts.length&&(o[t.apply]="onDistinct"in this?Nn.callAdaptorFunction(this,"onDistinct",e.distincts):""),!e.distincts.length&&t.expand&&(o[t.expand]="onExpand"in this&&"onSelect"in i?Nn.callAdaptorFunction(this,"onExpand",{selects:Nn.getValue(i.onSelect.fieldNames,e),expands:e.expands},e):e.expands),o[t.select]="onSelect"in i&&!e.distincts.length?Nn.callAdaptorFunction(this,"onSelect",Nn.getValue(i.onSelect.fieldNames,e),e):"",o[t.count]=e.isCountRequired?Nn.callAdaptorFunction(this,"onCount",e.isCountRequired,e):"",o[t.search]=r.searches.length?Nn.callAdaptorFunction(this,"onSearch",r.searches,e):"",o[t.skip]="onSkip"in i?Nn.callAdaptorFunction(this,"onSkip",Nn.getValue(i.onSkip.nos,e),e):"",o[t.take]="onTake"in i?Nn.callAdaptorFunction(this,"onTake",Nn.getValue(i.onTake.nos,e),e):"",o[t.where]=r.filters.length||r.searches.length?Nn.callAdaptorFunction(this,"onWhere",r.filters,e):"",o[t.sortBy]=r.sorts.length?Nn.callAdaptorFunction(this,"onSortBy",r.sorts,e):"",o[t.group]=r.groups.length?Nn.callAdaptorFunction(this,"onGroup",r.groups,e):"",o[t.aggregates]=r.aggregates.length?Nn.callAdaptorFunction(this,"onAggregates",r.aggregates,e):"",o.param=[]},e.prototype.convertToQueryString=function(t,e,i){return""},e.prototype.processResponse=function(t,e,i,r,n,o){if(r&&r.getResponseHeader("Content-Type")&&-1!==r.getResponseHeader("Content-Type").indexOf("application/json")){var s=Nn.timeZoneHandling;e&&!e.timeZoneHandling&&(Nn.timeZoneHandling=!1),t=Nn.parse.parseJson(t),Nn.timeZoneHandling=s}var a=n,l=a.pvtData||{},h=t?t.groupDs:[];if(r&&r.getResponseHeader("Content-Type")&&-1!==r.getResponseHeader("Content-Type").indexOf("xml"))return i.isCountRequired?{result:[],count:0}:[];var u=JSON.parse(a.data);if(u&&"batch"===u.action&&t&&t.addedRecords)return o.addedRecords=t.addedRecords,o;t&&t.d&&(t=t.d);var p={};t&&"count"in t&&(p.count=t.count),p.result=t&&t.result?t.result:t;var d=!1;if(Array.isArray(t.result)&&t.result.length){if(c(t.result[0].key)||(p.result=this.formRemoteGroupedData(p.result,1,l.groups.length-1)),i&&i.lazyLoad.length&&l.groups.length)for(var f=0;f<i.lazyLoad.length;f++)if("onDemandGroupInfo"===i.lazyLoad[f].key){var g=i.lazyLoad[f].value.level;l.groups.length===g&&(d=!0)}}return d||this.getAggregateResult(l,t,p,h,i),Nn.isNull(p.count)?p.result:{result:p.result,count:p.count,aggregates:p.aggregates}},e.prototype.formRemoteGroupedData=function(t,e,i){for(var r=0;r<t.length;r++)t[r].items.length&&Object.keys(t[r].items[0]).indexOf("key")>-1&&this.formRemoteGroupedData(t[r].items,e+1,i-1);return t.GroupGuid=Vn.GroupGuid,t.level=e,t.childLevels=i,t.records=t[0].items.length?this.getGroupedRecords(t,!c(t[0].items.records)):[],t},e.prototype.getGroupedRecords=function(t,e){for(var i=[],r=0;r<t.length;r++)if(e)i=i.concat(t[r].items.records);else for(var n=0;n<t[r].items.length;n++)i.push(t[r].items[n]);return i},e.prototype.onGroup=function(t){return this.pvt.groups=t,t},e.prototype.onAggregates=function(t){this.pvt.aggregates=t},e.prototype.batchRequest=function(t,e,i,r,n){return{type:"POST",url:t.dataSource.batchUrl||t.dataSource.crudUrl||t.dataSource.removeUrl||t.dataSource.url,contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(u({},{changed:e.changedRecords,added:e.addedRecords,deleted:e.deletedRecords,action:"batch",table:i[void 0],key:i[void 0]},Nn.getAddParams(this,t,r)))}},e.prototype.beforeSend=function(t,e){},e.prototype.insert=function(t,e,i,r){return{url:t.dataSource.insertUrl||t.dataSource.crudUrl||t.dataSource.url,data:JSON.stringify(u({},{value:e,table:i,action:"insert"},Nn.getAddParams(this,t,r)))}},e.prototype.remove=function(t,e,i,r,n){return{type:"POST",url:t.dataSource.removeUrl||t.dataSource.crudUrl||t.dataSource.url,data:JSON.stringify(u({},{key:i,keyColumn:e,table:r,action:"remove"},Nn.getAddParams(this,t,n)))}},e.prototype.update=function(t,e,i,r,n){return{type:"POST",url:t.dataSource.updateUrl||t.dataSource.crudUrl||t.dataSource.url,data:JSON.stringify(u({},{value:i,action:"update",keyColumn:e,key:Nn.getObject(e,i),table:r},Nn.getAddParams(this,t,n)))}},e.prototype.getFiltersFrom=function(t,e){var i,r=e.fKey,n=r,o=e.key,s=[];"object"!=typeof t[0]&&(n=null);for(var a=0;a<t.length;a++)i="object"==typeof t[0]?Nn.getObject(o||n,t[a]):t[a],s.push(new Rn(r,"equal",i));return Rn.or(s)},e.prototype.getAggregateResult=function(t,e,i,r,n){var o=e;if(e&&e.result&&(o=e.result),t&&t.aggregates&&t.aggregates.length){var s=t.aggregates,a=void 0,l=o,h={};e.aggregate&&(l=e.aggregate);for(var u=0;u<s.length;u++)(a=Nn.aggregates[s[u].type])&&(h[s[u].field+" - "+s[u].type]=a(l,s[u].field));i.aggregates=h}var p=Array.isArray(e.result)&&e.result.length&&!c(e.result[0].key);if(t&&t.groups&&t.groups.length&&!p){var d=t.groups;for(u=0;u<d.length;u++){c(r)||(r=Nn.group(r,d[u]));var f=In.filterQueries(n.queries,"onGroup")[u].e;o=Nn.group(o,d[u],t.aggregates,null,r,f.comparer)}i.result=o}return i},e.prototype.getQueryRequest=function(t){var e={sorts:[],groups:[],filters:[],searches:[],aggregates:[]};return e.sorts=In.filterQueries(t.queries,"onSortBy"),e.groups=In.filterQueries(t.queries,"onGroup"),e.filters=In.filterQueries(t.queries,"onWhere"),e.searches=In.filterQueries(t.queries,"onSearch"),e.aggregates=In.filterQueries(t.queries,"onAggregates"),e},e.prototype.addParams=function(t){var e=t.reqParams;t.params.length&&(e.params={});for(var i=0,r=t.params;i<r.length;i++){var n=r[i];if(e[n.key])throw new Error("Query() - addParams: Custom Param is conflicting other request arguments");e[n.key]=n.value,n.fn&&(e[n.key]=n.fn.call(t.query,n.key,t.query,t.dm)),e.params[n.key]=e[n.key]}},e}(zn),Hn=function(t){function e(e){var i=t.call(this)||this;return i.options=u({},i.options,{requestType:"get",accept:"application/json;odata=light;q=1,application/json;odata=verbose;q=0.5",multipartAccept:"multipart/mixed",sortBy:"$orderby",select:"$select",skip:"$skip",take:"$top",count:"$inlinecount",where:"$filter",expand:"$expand",batch:"$batch",changeSet:"--changeset_",batchPre:"batch_",contentId:"Content-Id: ",batchContent:"Content-Type: multipart/mixed; boundary=",changeSetContent:"Content-Type: application/http\nContent-Transfer-Encoding: binary ",batchChangeSetContentType:"Content-Type: application/json; charset=utf-8 ",updateType:"PUT"}),u(i.options,e||{}),i}return Fn(e,t),e.prototype.getModuleName=function(){return"ODataAdaptor"},e.prototype.onPredicate=function(t,i,r){var n,o,s="",a=t.value,l=typeof a,h=t.field?e.getField(t.field):null;if(a instanceof Date&&(a="datetime'"+Nn.parse.replacer(a)+"'"),"string"===l&&(a=a.replace(/'/g,"''"),t.ignoreCase&&(a=a.toLowerCase()),a="'"+(a=encodeURIComponent(a))+"'",r&&(h="cast("+h+", 'Edm.String')"),Nn.parse.isGuid(a)&&(o="guid"),t.ignoreCase&&(o||(h="tolower("+h+")"),a=a.toLowerCase())),n=Nn.odBiOperator[t.operator])return s+=h,s+=n,o&&(s+=o),s+a;if("substringof"===(n=c(this.getModuleName)||"ODataV4Adaptor"!==this.getModuleName()?Nn.odUniOperator[t.operator]:Nn.odv4UniOperator[t.operator])){var u=a;a=h,h=u}return s+=n+"(",s+=h+",",o&&(s+=o),s+=a+")"},e.prototype.addParams=function(e){t.prototype.addParams.call(this,e),delete e.reqParams.params},e.prototype.onComplexPredicate=function(t,e,i){for(var r=[],n=0;n<t.predicates.length;n++)r.push("("+this.onEachWhere(t.predicates[n],e,i)+")");return r.join(" "+t.condition+" ")},e.prototype.onEachWhere=function(t,e,i){return t.isComplex?this.onComplexPredicate(t,e,i):this.onPredicate(t,e,i)},e.prototype.onWhere=function(t){return this.pvt.search&&t.push(this.onEachWhere(this.pvt.search,null,!0)),t.join(" and ")},e.prototype.onEachSearch=function(t){t.fields&&0===t.fields.length&&Nn.throwError("Query() - Search : oData search requires list of field names to search");for(var e=this.pvt.search||[],i=0;i<t.fields.length;i++)e.push(new Rn(t.fields[i],t.operator,t.key,t.ignoreCase));this.pvt.search=e},e.prototype.onSearch=function(t){return this.pvt.search=Rn.or(this.pvt.search),""},e.prototype.onEachSort=function(t){var i=[];if(t.name instanceof Array)for(var r=0;r<t.name.length;r++)i.push(e.getField(t.name[r])+("descending"===t.direction?" desc":""));else i.push(e.getField(t.name)+("descending"===t.direction?" desc":""));return i.join(",")},e.prototype.onSortBy=function(t){return t.reverse().join(",")},e.prototype.onGroup=function(t){return this.pvt.groups=t,[]},e.prototype.onSelect=function(t){for(var i=0;i<t.length;i++)t[i]=e.getField(t[i]);return t.join(",")},e.prototype.onAggregates=function(t){return this.pvt.aggregates=t,""},e.prototype.onCount=function(t){return!0===t?"allpages":""},e.prototype.beforeSend=function(t,e,i){Nn.endsWith(i.url,this.options.batch)&&"post"===i.type.toLowerCase()?(e.setRequestHeader("Accept",this.options.multipartAccept),e.setRequestHeader("DataServiceVersion","2.0"),e.overrideMimeType("text/plain; charset=x-user-defined")):e.setRequestHeader("Accept",this.options.accept),e.setRequestHeader("DataServiceVersion","2.0"),e.setRequestHeader("MaxDataServiceVersion","2.0")},e.prototype.processResponse=function(t,e,i,r,n,o){if(n&&"GET"===n.type&&!this.rootUrl&&t["odata.metadata"]){var s=t["odata.metadata"].split("/$metadata#");this.rootUrl=s[0],this.resourceTableName=s[1]}if(!c(t.d)){var a=i&&i.isCountRequired?t.d.results:t.d;if(!c(a))for(var l=0;l<a.length;l++)c(a[l].__metadata)||delete a[l].__metadata}var h=n&&n.pvtData,u=this.processBatchResponse(t,i,r,n,o);if(u)return u;var p=r&&n.getResponseHeader("DataServiceVersion"),d=null,f=p&&parseInt(p,10)||2;if(i&&i.isCountRequired){(t.__count||t["odata.count"])&&(d=t.__count||t["odata.count"]),t.d&&(t=t.d),(t.__count||t["odata.count"])&&(d=t.__count||t["odata.count"])}3===f&&t.value&&(t=t.value),t.d&&(t=t.d),f<3&&t.results&&(t=t.results);var g={};return g.count=d,g.result=t,this.getAggregateResult(h,t,g,null,i),Nn.isNull(d)?g.result:{result:g.result,count:g.count,aggregates:g.aggregates}},e.prototype.convertToQueryString=function(t,e,i){var r=[],n=t.table||"";delete t.table,i.dataSource.requiresFormat&&(t.$format="json");for(var o=0,s=Object.keys(t);o<s.length;o++){var a=s[o];r.push(a+"="+t[a])}return r=r.join("&"),i.dataSource.url&&-1!==i.dataSource.url.indexOf("?")&&!n?r:r.length?n+"?"+r:n||""},e.prototype.localTimeReplacer=function(t,e){for(var i=0,r=c(e)?[]:Object.keys(e);i<r.length;i++){var n=r[i];e[n]instanceof Date&&(e[n]=Nn.dateParse.toLocalTime(e[n]))}return e},e.prototype.insert=function(t,e,i){return{url:(t.dataSource.insertUrl||t.dataSource.url).replace(/\/*$/,i?"/"+i:""),data:JSON.stringify(e,this.options.localTime?this.localTimeReplacer:null)}},e.prototype.remove=function(t,e,i,r){var n;return n="string"!=typeof i||Nn.parse.isGuid(i)?"("+i+")":"('"+i+"')",{type:"DELETE",url:(t.dataSource.removeUrl||t.dataSource.url).replace(/\/*$/,r?"/"+r:"")+n}},e.prototype.update=function(t,e,i,r,n,o){"PATCH"!==this.options.updateType||c(o)||(i=this.compareAndRemove(i,o,e));var s;return s="string"!=typeof i[e]||Nn.parse.isGuid(i[e])?"("+i[e]+")":"('"+i[e]+"')",{type:this.options.updateType,url:(t.dataSource.updateUrl||t.dataSource.url).replace(/\/*$/,r?"/"+r:"")+s,data:JSON.stringify(i,this.options.localTime?this.localTimeReplacer:null),accept:this.options.accept}},e.prototype.batchRequest=function(t,e,i,r,n){var o=i.guid=Nn.getGuid(this.options.batchPre),s=this.rootUrl?this.rootUrl+"/"+this.options.batch:t.dataSource.url.replace(/\/*$/,"/"+this.options.batch);i.url=this.resourceTableName?this.resourceTableName:i.url;var a={url:i.url,key:i.key,cid:1,cSet:Nn.getGuid(this.options.changeSet)},l="--"+o+"\n";return l+="Content-Type: multipart/mixed; boundary="+a.cSet.replace("--","")+"\n",this.pvt.changeSet=0,l+=this.generateInsertRequest(e.addedRecords,a,t),l+=this.generateUpdateRequest(e.changedRecords,a,t,n?n.changedRecords:[]),l+=this.generateDeleteRequest(e.deletedRecords,a,t),l+=a.cSet+"--\n",l+="--"+o+"--",{type:"POST",url:s,dataType:"json",contentType:"multipart/mixed; charset=UTF-8;boundary="+o,data:l}},e.prototype.generateDeleteRequest=function(t,e,i){if(!t)return"";var r={method:"DELETE ",url:function(t,e,i){var r=Nn.getObject(i,t[e]);if("number"==typeof r||Nn.parse.isGuid(r))return"("+r+")";if(r instanceof Date){return"("+t[e][i].toJSON()+")"}return"('"+r+"')"},data:function(t,e){return""}};return this.generateBodyContent(t,e,r,i)+"\n"},e.prototype.generateInsertRequest=function(t,e,i){if(!t)return"";var r={method:"POST ",url:function(t,e,i){return""},data:function(t,e){return JSON.stringify(t[e])+"\n\n"}};return this.generateBodyContent(t,e,r,i)},e.prototype.generateUpdateRequest=function(t,e,i,r){var n=this;if(!t)return"";t.forEach(function(t){return t=n.compareAndRemove(t,r.filter(function(i){return Nn.getObject(e.key,i)===Nn.getObject(e.key,t)})[0],e.key)});var o={method:this.options.updateType+" ",url:function(t,e,i){if("number"==typeof t[e][i]||Nn.parse.isGuid(t[e][i]))return"("+t[e][i]+")";if(t[e][i]instanceof Date){return"("+t[e][i].toJSON()+")"}return"('"+t[e][i]+"')"},data:function(t,e){return JSON.stringify(t[e])+"\n\n"}};return this.generateBodyContent(t,e,o,i)},e.getField=function(t){return t.replace(/\./g,"/")},e.prototype.generateBodyContent=function(t,e,i,r){for(var n="",o=0;o<t.length;o++)n+="\n"+e.cSet+"\n",n+=this.options.changeSetContent+"\n\n",n+=i.method,"POST "===i.method?n+=(r.dataSource.insertUrl||r.dataSource.crudUrl||e.url)+i.url(t,o,e.key)+" HTTP/1.1\n":"PUT "===i.method||"PATCH "===i.method?n+=(r.dataSource.updateUrl||r.dataSource.crudUrl||e.url)+i.url(t,o,e.key)+" HTTP/1.1\n":"DELETE "===i.method&&(n+=(r.dataSource.removeUrl||r.dataSource.crudUrl||e.url)+i.url(t,o,e.key)+" HTTP/1.1\n"),n+="Accept: "+this.options.accept+"\n",n+="Content-Id: "+this.pvt.changeSet+++"\n",n+=this.options.batchChangeSetContentType+"\n",c(t[o]["@odata.etag"])?n+="\n":(n+="If-Match: "+t[o]["@odata.etag"]+"\n\n",delete t[o]["@odata.etag"]),n+=i.data(t,o);return n},e.prototype.processBatchResponse=function(t,e,i,r,n){if(i&&i.getResponseHeader("Content-Type")&&-1!==i.getResponseHeader("Content-Type").indexOf("xml"))return e.isCountRequired?{result:[],count:0}:[];if(r&&this.options.batch&&Nn.endsWith(r.url,this.options.batch)&&"post"===r.type.toLowerCase()){var o=i.getResponseHeader("Content-Type"),s=void 0,a=void 0,l=t+"";if(o=o.substring(o.indexOf("=batchresponse")+1),(l=l.split(o)).length<2)return{};l=l[1];var h=/(?:\bContent-Type.+boundary=)(changesetresponse.+)/i.exec(l);h&&l.replace(h[0],"");for(var c=h?h[1]:"",p=(l=l.split(c)).length;p>-1;p--)/\bContent-ID:/i.test(l[p])&&/\bHTTP.+201/.test(l[p])&&(s=parseInt(/\bContent-ID: (\d+)/i.exec(l[p])[1],10),n.addedRecords[s]&&(a=Nn.parse.parseJson(/^\{.+\}/m.exec(l[p])[0]),u({},n.addedRecords[s],this.processResponse(a))));return n}return null},e.prototype.compareAndRemove=function(t,e,i){var r=this;return c(e)?t:(Object.keys(t).forEach(function(n){if(n!==i&&"@odata.etag"!==n)if(Nn.isPlainObject(t[n])){r.compareAndRemove(t[n],e[n]);0===Object.keys(t[n]).filter(function(t){return"@odata.etag"!==t}).length&&delete t[n]}else t[n]===e[n]?delete t[n]:t[n]&&e[n]&&t[n].valueOf()===e[n].valueOf()&&delete t[n]}),t)},e}(_n),Wn=(function(t){function e(e){var i=t.call(this,e)||this;return i.options=u({},i.options,{requestType:"get",accept:"application/json, text/javascript, */*; q=0.01",multipartAccept:"multipart/mixed",sortBy:"$orderby",select:"$select",skip:"$skip",take:"$top",count:"$count",search:"$search",where:"$filter",expand:"$expand",batch:"$batch",changeSet:"--changeset_",batchPre:"batch_",contentId:"Content-Id: ",batchContent:"Content-Type: multipart/mixed; boundary=",changeSetContent:"Content-Type: application/http\nContent-Transfer-Encoding: binary ",batchChangeSetContentType:"Content-Type: application/json; charset=utf-8 ",updateType:"PATCH",localTime:!1,apply:"$apply"}),u(i.options,e||{}),i}Fn(e,t),e.prototype.getModuleName=function(){return"ODataV4Adaptor"},e.prototype.onCount=function(t){return!0===t?"true":""},e.prototype.onPredicate=function(e,i,r){var n="",o=e.value,s=o instanceof Date;if(i instanceof In)for(var a=this.getQueryRequest(i),l=0;l<a.filters.length;l++)a.filters[l].e.key===e.value&&(r=!0);return n=t.prototype.onPredicate.call(this,e,i,r),s&&(n=n.replace(/datetime'(.*)'$/,"$1")),Nn.parse.isGuid(o)&&(n=n.replace("guid","").replace(/'/g,"")),n},e.prototype.onEachSearch=function(t){var e=this.pvt.searches||[];e.push(t.key),this.pvt.searches=e},e.prototype.onSearch=function(t){return this.pvt.searches.join(" OR ")},e.prototype.onExpand=function(t){var e=this,i={},r={},n=t.expands.slice(),o=[];return t.selects.filter(function(t){return t.indexOf(".")>-1}).forEach(function(t){var r=t.split(".");if(r[0]in i||(i[r[0]]=[]),2==r.length)i[r[0]].length&&-1!==Object.keys(i).indexOf(r[0])?-1!==i[r[0]][0].indexOf("$expand")&&-1===i[r[0]][0].indexOf(";$select=")?i[r[0]][0]=i[r[0]][0]+";$select="+r[1]:i[r[0]][0]=i[r[0]][0]+","+r[1]:i[r[0]].push("$select="+r[1]);else{for(var n="$select="+r[r.length-1],o="",s="",a=1;a<r.length-1;a++)o=o+"$expand="+r[a]+"(",s+=")";var l=o+n+s;if(i[r[0]].length&&-1!==Object.keys(i).indexOf(r[0])&&e.expandQueryIndex(i[r[0]],!0)){var h=e.expandQueryIndex(i[r[0]]);i[r[0]][h]=i[r[0]][h]+l.replace("$expand=",",")}else i[r[0]].push(l)}}),Object.keys(i).forEach(function(t){-1===n.indexOf(t)&&n.push(t)}),n.forEach(function(t){r[t]=t in i?t+"("+i[t].join(";")+")":t}),Object.keys(r).forEach(function(t){return o.push(r[t])}),o.join(",")},e.prototype.expandQueryIndex=function(t,e){for(var i=0;i<t.length;i++)if(-1!==t[i].indexOf("$expand"))return!!e||i;return!e&&0},e.prototype.onDistinct=function(t){return"groupby(("+t.map(function(t){return Hn.getField(t)}).join(",")+"))"},e.prototype.onSelect=function(e){return t.prototype.onSelect.call(this,e.filter(function(t){return-1===t.indexOf(".")}))},e.prototype.beforeSend=function(t,e,i){"POST"!==i.type&&"PUT"!==i.type&&"PATCH"!==i.type||e.setRequestHeader("Prefer","return=representation"),e.setRequestHeader("Accept",this.options.accept)},e.prototype.processResponse=function(e,i,r,n,o,s){if(o&&"GET"===o.type&&!this.rootUrl&&e["@odata.context"]){var a=e["@odata.context"].split("/$metadata#");this.rootUrl=a[0],this.resourceTableName=a[1]}var l=o&&o.pvtData,h=t.prototype.processBatchResponse.call(this,e,r,n,o,s);if(h)return h;var u=null;r&&r.isCountRequired&&"@odata.count"in e&&(u=e["@odata.count"]),e=c(e.value)?e:e.value;var p={};return p.count=u,p.result=e,this.getAggregateResult(l,e,p,null,r),Nn.isNull(u)?p.result:{result:p.result,count:u,aggregates:p.aggregates}}}(Hn),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Fn(e,t),e.prototype.getModuleName=function(){return"WebApiAdaptor"},e.prototype.insert=function(t,e,i){return{type:"POST",url:t.dataSource.url,data:JSON.stringify(e)}},e.prototype.remove=function(t,e,i,r){return{type:"DELETE",url:t.dataSource.url+"/"+i,data:JSON.stringify(i)}},e.prototype.update=function(t,e,i,r){return{type:"PUT",url:t.dataSource.url,data:JSON.stringify(i)}},e.prototype.batchRequest=function(t,e,i){var r=this,n=i.guid=Nn.getGuid(this.options.batchPre),o=t.dataSource.url.replace(/\/*$/,"/"+this.options.batch);i.url=this.resourceTableName?this.resourceTableName:i.url;for(var s=[],a=function(r,o){e.addedRecords.forEach(function(o,a){var l=function(t,e,i){return""};s.push("--"+n),s.push("Content-Type: application/http; msgtype=request",""),s.push("POST /api/"+(t.dataSource.insertUrl||t.dataSource.crudUrl||i.url)+l(e.addedRecords,r,i.key)+" HTTP/1.1"),s.push("Content-Type: application/json; charset=utf-8"),s.push("Host: "+location.host),s.push("",o?JSON.stringify(o):"")})},l=0,h=e.addedRecords.length;l<h;l++)a(l);var u=function(o,a){e.changedRecords.forEach(function(a,l){r.options.updateType;var h=function(t,e,i){return""};s.push("--"+n),s.push("Content-Type: application/http; msgtype=request",""),s.push("PUT /api/"+(t.dataSource.updateUrl||t.dataSource.crudUrl||i.url)+h(e.changedRecords,o,i.key)+" HTTP/1.1"),s.push("Content-Type: application/json; charset=utf-8"),s.push("Host: "+location.host),s.push("",a?JSON.stringify(a):"")})};for(l=0,h=e.changedRecords.length;l<h;l++)u(l);var c=function(r,o){e.deletedRecords.forEach(function(o,a){var l=function(t,e,i){var r=Nn.getObject(i,t[e]);if("number"==typeof r||Nn.parse.isGuid(r))return"/"+r;if(r instanceof Date){return"/"+t[e][i].toJSON()}return"/'"+r+"'"};s.push("--"+n),s.push("Content-Type: application/http; msgtype=request",""),s.push("DELETE /api/"+(t.dataSource.removeUrl||t.dataSource.crudUrl||i.url)+l(e.deletedRecords,r,i.key)+" HTTP/1.1"),s.push("Content-Type: application/json; charset=utf-8"),s.push("Host: "+location.host),s.push("",o?JSON.stringify(o):"")})};for(l=0,h=e.deletedRecords.length;l<h;l++)c(l);return s.push("--"+n+"--",""),{type:"POST",url:o,contentType:"multipart/mixed; boundary="+n,data:s.join("\r\n")}},e.prototype.beforeSend=function(t,e,i){e.setRequestHeader("Accept","application/json, text/javascript, */*; q=0.01")},e.prototype.processResponse=function(t,e,i,r,n,o){var s=n&&n.pvtData,a=null,l={};if(n&&"post"!==n.type.toLowerCase()){var h=r&&n.getResponseHeader("DataServiceVersion"),u=h&&parseInt(h,10)||2;i&&i.isCountRequired&&(Nn.isNull(t.Count)||(a=t.Count)),u<3&&t.Items&&(t=t.Items),l.count=a,l.result=t,this.getAggregateResult(s,t,l,null,i)}return l.result=l.result||t,Nn.isNull(a)?l.result:{result:l.result,count:l.count,aggregates:l.aggregates}}}(Hn),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Fn(e,t),e.prototype.processQuery=function(t,e,i){var r=(new _n).processQuery(t,e,i),n=Nn.parse.parseJson(r.data),o={};if(n.param)for(var s=0;s<n.param.length;s++){var a=n.param[s],l=Object.keys(a)[0];o[l]=a[l]}o.value=n;return{data:JSON.stringify(o),url:r.url,pvtData:r.pvtData,type:"POST",contentType:"application/json; charset=utf-8"}}}(_n),function(t){function e(){var e=t.call(this)||this;return s("beforeSend",_n.prototype.beforeSend,e),e}return Fn(e,t),e.prototype.insert=function(t,e,i,r,n){return this.pvt.position=n,this.updateType="add",{url:t.dataSource.insertUrl||t.dataSource.crudUrl||t.dataSource.url,data:JSON.stringify(u({},{value:e,table:i,action:"insert"},Nn.getAddParams(this,t,r)))}},e.prototype.remove=function(e,i,r,n,o){return t.prototype.remove.call(this,e,i,r),{type:"POST",url:e.dataSource.removeUrl||e.dataSource.crudUrl||e.dataSource.url,data:JSON.stringify(u({},{key:r,keyColumn:i,table:n,action:"remove"},Nn.getAddParams(this,e,o)))}},e.prototype.update=function(t,e,i,r,n){return this.updateType="update",this.updateKey=e,{type:"POST",url:t.dataSource.updateUrl||t.dataSource.crudUrl||t.dataSource.url,data:JSON.stringify(u({},{value:i,action:"update",keyColumn:e,key:i[e],table:r},Nn.getAddParams(this,t,n)))}},e.prototype.processResponse=function(e,i,r,n,o,s,a){var l;if(e="batch"===(o?JSON.parse(o.data):e).action?Nn.parse.parseJson(e):e,"add"===this.updateType&&t.prototype.insert.call(this,i,e,null,null,this.pvt.position),"update"===this.updateType&&t.prototype.update.call(this,i,this.updateKey,e),this.updateType=void 0,e.added)for(l=0;l<e.added.length;l++)t.prototype.insert.call(this,i,e.added[l]);if(e.changed)for(l=0;l<e.changed.length;l++)t.prototype.update.call(this,i,a.key,e.changed[l]);if(e.deleted)for(l=0;l<e.deleted.length;l++)t.prototype.remove.call(this,i,a.key,e.deleted[l]);return e},e.prototype.batchRequest=function(t,e,i,r,n){return{type:"POST",url:t.dataSource.batchUrl||t.dataSource.crudUrl||t.dataSource.url,contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(u({},{changed:e.changedRecords,added:e.addedRecords,deleted:e.deletedRecords,action:"batch",table:i.url,key:i.key},Nn.getAddParams(this,t,r)))}},e.prototype.addParams=function(t){(new _n).addParams(t)},e}(Gn)),Un=function(t){function e(e){var i=t.call(this)||this;return i.options=u({},i.options,{getData:new Function,addRecord:new Function,updateRecord:new Function,deleteRecord:new Function,batchUpdate:new Function}),u(i.options,e||{}),i}return Fn(e,t),e.prototype.getModuleName=function(){return"CustomDataAdaptor"},e}(_n),qn=(function(t){function e(e){var i=t.call(this)||this;return i.opt=e,i.schema=i.opt.response,i.query=i.opt.query,i.getVariables=i.opt.getVariables?i.opt.getVariables:function(){},i.getQuery=function(){return i.query},i}Fn(e,t),e.prototype.getModuleName=function(){return"GraphQLAdaptor"},e.prototype.processQuery=function(e,i){var r=t.prototype.processQuery.apply(this,arguments),n=JSON.parse(r.data),o={};["skip","take","sorted","table","select","where","search","requiresCounts","aggregates","params"].filter(function(t){o[t]="searchwhereparams".indexOf(t)>-1?JSON.stringify(n[t]):n[t]});var s=this.getVariables()||{};s.datamanager=o;var a=JSON.stringify({query:this.getQuery(),variables:s});return r.data=a,r},e.prototype.processResponse=function(t,e,i,r,n){var s,a,l=t,h=o(this.schema.result,l.data);this.schema.count&&(s=o(this.schema.count,l.data)),this.schema.aggregates&&(a=c(a=o(this.schema.aggregates,l.data))?a:Nn.parse.parseJson(a));var u=n.pvtData||{},p={result:h,aggregates:a},d=p;return u&&u.groups&&u.groups.length&&this.getAggregateResult(u,d,p,null,i),c(s)?p.result:{result:p.result,count:s,aggregates:a}},e.prototype.insert=function(){var e=t.prototype.insert.apply(this,arguments);return this.generateCrudData(e,"insert")},e.prototype.update=function(){var e=t.prototype.update.apply(this,arguments);return this.generateCrudData(e,"update")},e.prototype.remove=function(){var e=t.prototype.remove.apply(this,arguments);return this.generateCrudData(e,"remove")},e.prototype.batchRequest=function(e,i,r,n,o){var s=t.prototype.batchRequest.apply(this,arguments),a=JSON.parse(s.data);return a.key=r.key,s.data=JSON.stringify(a),this.generateCrudData(s,"batch")},e.prototype.generateCrudData=function(t,e){var i=JSON.parse(t.data);return t.data=JSON.stringify({query:this.opt.getMutation(e),variables:i}),t}}(_n),function(t){function e(e,i,r){var n=t.call(this)||this;n.isCrudAction=!1,n.isInsertAction=!1,c(e)||(n.cacheAdaptor=e),n.pageSize=r,n.guidId=Nn.getGuid("cacheAdaptor");window.localStorage.setItem(n.guidId,JSON.stringify({keys:[],results:[]}));var o=n.guidId;return c(i)||setInterval(function(){var t;t=Nn.parse.parseJson(window.localStorage.getItem(o));for(var e=[],r=0;r<t.results.length;r++){var n=+new Date,s=+new Date(t.results[r].timeStamp);t.results[r].timeStamp=n-s,n-s>i&&e.push(r)}for(r=0;r<e.length;r++)t.results.splice(e[r],1),t.keys.splice(e[r],1);window.localStorage.removeItem(o),window.localStorage.setItem(o,JSON.stringify(t))},i),n}return Fn(e,t),e.prototype.generateKey=function(t,e){var i=this.getQueryRequest(e),r=In.filterQueryLists(e.queries,["onSelect","onPage","onSkip","onTake","onRange"]),n=t;"onPage"in r&&(n+=r.onPage.pageIndex),i.sorts.forEach(function(t){n+=t.e.direction+t.e.fieldName}),i.groups.forEach(function(t){n+=t.e.fieldName}),i.searches.forEach(function(t){n+=t.e.searchKey});for(var o=0;o<i.filters.length;o++){var s=i.filters[o];if(s.e.isComplex){var a=e.clone();a.queries=[];for(var l=0;l<s.e.predicates.length;l++)a.queries.push({fn:"onWhere",e:s.e.predicates[l],filter:e.queries.filter});n+=s.e.condition+this.generateKey(t,a)}else n+=s.e.field+s.e.operator+s.e.value}return n},e.prototype.processQuery=function(t,e,i){var r,n=this.generateKey(t.dataSource.url,e),o=(r=Nn.parse.parseJson(window.localStorage.getItem(this.guidId)))?r.results[r.keys.indexOf(n)]:null;return null==o||this.isCrudAction||this.isInsertAction?(this.isCrudAction=null,this.isInsertAction=null,this.cacheAdaptor.processQuery.apply(this.cacheAdaptor,[].slice.call(arguments,0))):o},e.prototype.processResponse=function(t,e,i,r,n,o){if(this.isInsertAction||n&&this.cacheAdaptor.options.batch&&Nn.endsWith(n.url,this.cacheAdaptor.options.batch)&&"post"===n.type.toLowerCase())return this.cacheAdaptor.processResponse(t,e,i,r,n,o);t=this.cacheAdaptor.processResponse.apply(this.cacheAdaptor,[].slice.call(arguments,0));var s=i?this.generateKey(e.dataSource.url,i):e.dataSource.url,a={},l=(a=Nn.parse.parseJson(window.localStorage.getItem(this.guidId))).keys.indexOf(s);for(-1!==l&&(a.results.splice(l,1),a.keys.splice(l,1)),a.results[a.keys.push(s)-1]={keys:s,result:t.result,timeStamp:new Date,count:t.count};a.results.length>this.pageSize;)a.results.splice(0,1),a.keys.splice(0,1);return window.localStorage.setItem(this.guidId,JSON.stringify(a)),t},e.prototype.beforeSend=function(t,e,i){!c(this.cacheAdaptor.options.batch)&&Nn.endsWith(i.url,this.cacheAdaptor.options.batch)&&"post"===i.type.toLowerCase()&&e.setRequestHeader("Accept",this.cacheAdaptor.options.multipartAccept),t.dataSource.crossDomain||e.setRequestHeader("Accept",this.cacheAdaptor.options.accept)},e.prototype.update=function(t,e,i,r){return this.isCrudAction=!0,this.cacheAdaptor.update(t,e,i,r)},e.prototype.insert=function(t,e,i){return this.isInsertAction=!0,this.cacheAdaptor.insert(t,e,i)},e.prototype.remove=function(t,e,i,r){return this.isCrudAction=!0,this.cacheAdaptor.remove(t,e,i,r)},e.prototype.batchRequest=function(t,e,i){return this.cacheAdaptor.batchRequest(t,e,i)},e}(_n)),Kn=function(){function t(t,e,i){var r=this;this.dateParse=!0,this.timeZoneHandling=!0,this.requests=[],t||this.dataSource||(t=[]),i=i||t.adaptor,t&&!1===t.timeZoneHandling&&(this.timeZoneHandling=t.timeZoneHandling);var n;return t instanceof Array?n={json:t,offline:!0}:"object"==typeof t?(t.json||(t.json=[]),n={url:t.url,insertUrl:t.insertUrl,removeUrl:t.removeUrl,updateUrl:t.updateUrl,crudUrl:t.crudUrl,batchUrl:t.batchUrl,json:t.json,headers:t.headers,accept:t.accept,data:t.data,timeTillExpiration:t.timeTillExpiration,cachingPageSize:t.cachingPageSize,enableCaching:t.enableCaching,requestType:t.requestType,key:t.key,crossDomain:t.crossDomain,jsonp:t.jsonp,dataType:t.dataType,offline:void 0!==t.offline?t.offline:!(t.adaptor instanceof Wn||t.adaptor instanceof Un)&&!t.url,requiresFormat:t.requiresFormat}):Nn.throwError("DataManager: Invalid arguments"),void 0!==n.requiresFormat||Nn.isCors()||(n.requiresFormat=!!c(n.crossDomain)||n.crossDomain),void 0===n.dataType&&(n.dataType="json"),this.dataSource=n,this.defaultQuery=e,n.url&&n.offline&&!n.json.length?(this.isDataAvailable=!1,this.adaptor=i||new Hn,this.dataSource.offline=!1,this.ready=this.executeQuery(e||new In),this.ready.then(function(t){r.dataSource.offline=!0,r.isDataAvailable=!0,n.json=t.result,r.adaptor=new Gn})):this.adaptor=n.offline?new Gn:new Hn,!n.jsonp&&this.adaptor instanceof Hn&&(n.jsonp="callback"),this.adaptor=i||this.adaptor,n.enableCaching&&(this.adaptor=new qn(this.adaptor,n.timeTillExpiration,n.cachingPageSize)),this}return t.prototype.setDefaultQuery=function(t){return this.defaultQuery=t,this},t.prototype.executeLocal=function(e){this.defaultQuery||e instanceof In||Nn.throwError("DataManager - executeLocal() : A query is required to execute"),this.dataSource.json||Nn.throwError("DataManager - executeLocal() : Json data is required to execute"),e=e||this.defaultQuery;var i=this.adaptor.processQuery(this,e);if(e.subQuery){var r=e.subQuery.fromTable,n=e.subQuery.lookups,o=e.isCountRequired?i.result:i;n&&n instanceof Array&&Nn.buildHierarchy(e.subQuery.fKey,r,o,n,e.subQuery.key);for(var s=0;s<o.length;s++)o[s][r]instanceof Array&&(o[s]=u({},{},o[s]),o[s][r]=this.adaptor.processResponse(e.subQuery.using(new t(o[s][r].slice(0))).executeLocal(),this,e))}return this.adaptor.processResponse(i,this,e)},t.prototype.executeQuery=function(e,i,r,n){var o=this,s="makeRequest";"function"==typeof e&&(n=r,r=i,i=e,e=null),e||(e=this.defaultQuery),e instanceof In||Nn.throwError("DataManager - executeQuery() : A query is required to execute");var a=new Yn,l={query:e};if(!this.dataSource.offline&&void 0!==this.dataSource.url&&""!==this.dataSource.url||!c(this.adaptor[s])||this.isCustomDataAdaptor(this.adaptor)){var h=this.adaptor.processQuery(this,e);c(this.adaptor[s])?!c(h.url)||this.isCustomDataAdaptor(this.adaptor)?this.makeRequest(h,a,l,e):(l=t.getDeferedArgs(e,h,l),a.resolve(l)):this.adaptor[s](h,a,l,e)}else t.nextTick(function(){var i=o.executeLocal(e);l=t.getDeferedArgs(e,i,l),a.resolve(l)});return(i||r)&&a.promise.then(i,r),n&&a.promise.then(n,n),a.promise},t.getDeferedArgs=function(t,e,i){return t.isCountRequired?(i.result=e.result,i.count=e.count,i.aggregates=e.aggregates):i.result=e,i},t.nextTick=function(t){(window.setImmediate||window.setTimeout)(t,0)},t.prototype.extendRequest=function(t,e,i){return u({},{type:"GET",dataType:this.dataSource.dataType,crossDomain:this.dataSource.crossDomain,jsonp:this.dataSource.jsonp,cache:!0,processData:!1,onSuccess:e,onFailure:i},t)},t.prototype.makeRequest=function(t,e,i,r){var n=this,o=!!r.subQuerySelector,s=function(t){i.error=t,e.reject(i)},a=function(t,r,n,o,s,a,l){i.xhr=n,i.count=r?parseInt(r.toString(),10):0,i.result=t,i.request=o,i.aggregates=a,i.actual=s,i.virtualSelectRecords=l,e.resolve(i)},l=function(t,e){var l=new Yn,h={parent:i};r.subQuery.isChild=!0;var u=n.adaptor.processQuery(n,r.subQuery,t?n.adaptor.processResponse(t):e),c=n.makeRequest(u,l,h,r.subQuery);return o||l.then(function(e){t&&(Nn.buildHierarchy(r.subQuery.fKey,r.subQuery.fromTable,t,e,r.subQuery.key),a(t,e.count,e.xhr))},s),c},h=this.extendRequest(t,function(t,e){if(n.isGraphQLAdaptor(n.adaptor)&&!c(t.errors))return s(t.errors);n.isCustomDataAdaptor(n.adaptor)&&(e=u({},n.ajaxReqOption,e)),-1===e.httpRequest.getResponseHeader("Content-Type").indexOf("xml")&&n.dateParse&&(t=Nn.parse.parseJson(t));var i=n.adaptor.processResponse(t,n,r,e.httpRequest,e),h=0,p=null,d=t.virtualSelectRecords;r.isCountRequired&&(h=i.count,p=i.aggregates,i=i.result),r.subQuery?o||l(i,e):a(i,h,e.httpRequest,e.type,t,p,d)},s);if(this.isCustomDataAdaptor(this.adaptor)){this.ajaxReqOption=h;var p=h;this.adaptor.options.getData({data:p.data,onSuccess:p.onSuccess,onFailure:p.onFailure})}else{var d=new hi(h);d.beforeSend=function(){n.beforeSend(d.httpRequest,d)},(h=d.send()).catch(function(t){return!0}),this.requests.push(d)}if(o){var f=r.subQuerySelector.call(this,{query:r.subQuery,parent:r});f&&f.length?Promise.all([h,l(null,f)]).then(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=t[0],s=n.adaptor.processResponse(i[0],n,r,n.requests[0].httpRequest,n.requests[0]),l=0;r.isCountRequired&&(l=s.count,s=s.result);var h=n.adaptor.processResponse(i[1],n,r.subQuery,n.requests[1].httpRequest,n.requests[1]);l=0,r.subQuery.isCountRequired&&(l=h.count,h=h.result),Nn.buildHierarchy(r.subQuery.fKey,r.subQuery.fromTable,s,h,r.subQuery.key),o=!1,a(s,l,n.requests[0].httpRequest)}):o=!1}return h},t.prototype.beforeSend=function(t,e){this.adaptor.beforeSend(this,t,e);for(var i,r=this.dataSource.headers,n=0;r&&n<r.length;n++){i=[];for(var o=0,s=Object.keys(r[n]);o<s.length;o++){var a=s[o];i.push(a),t.setRequestHeader(a,r[n][a])}}},t.prototype.saveChanges=function(t,e,i,r,n){var o=this;i instanceof In&&(r=i,i=null);var s={url:i,key:e||this.dataSource.key},a=this.adaptor.batchRequest(this,t,s,r||new In,n);if(this.dataSource.offline)return a;if(c(this.adaptor.doAjaxRequest)){if(this.isCustomDataAdaptor(this.adaptor))return this.doAjaxRequest(a,this.adaptor.options.batchUpdate);var l=new Yn,h=new hi(a);return h.beforeSend=function(){o.beforeSend(h.httpRequest,h)},h.onSuccess=function(e,i){o.isGraphQLAdaptor(o.adaptor)&&(c(e.errors)||h.onFailure(JSON.stringify(e.errors))),l.resolve(o.adaptor.processResponse(e,o,null,i.httpRequest,i,t,s))},h.onFailure=function(t){l.reject([{error:t}])},h.send().catch(function(t){return!0}),l.promise}return this.adaptor.doAjaxRequest(a)},t.prototype.insert=function(t,e,i,r){e instanceof In&&(i=e,e=null);var n=this.adaptor.insert(this,t,e,i,r);return this.dataSource.offline?n:c(this.adaptor.doAjaxRequest)?this.doAjaxRequest(n,this.adaptor.options.addRecord):this.adaptor.doAjaxRequest(n)},t.prototype.remove=function(t,e,i,r){"object"==typeof e&&(e=Nn.getObject(t,e)),i instanceof In&&(r=i,i=null);var n=this.adaptor.remove(this,t,e,i,r);if(this.dataSource.offline)return n;if(c(this.adaptor.doAjaxRequest)){var o=this.adaptor.options.deleteRecord;return this.doAjaxRequest(n,o)}return this.adaptor.doAjaxRequest(n)},t.prototype.update=function(t,e,i,r,n){i instanceof In&&(r=i,i=null);var o=this.adaptor.update(this,t,e,i,r,n);if(this.dataSource.offline)return o;if(c(this.adaptor.doAjaxRequest)){var s=this.adaptor.options.updateRecord;return this.doAjaxRequest(o,s)}return this.adaptor.doAjaxRequest(o)},t.prototype.isCustomDataAdaptor=function(t){return this.adaptor.getModuleName&&"CustomDataAdaptor"===this.adaptor.getModuleName()},t.prototype.isGraphQLAdaptor=function(t){return this.adaptor.getModuleName&&"GraphQLAdaptor"===this.adaptor.getModuleName()},t.prototype.successFunc=function(t,e){if(this.isGraphQLAdaptor(this.adaptor)){var i=JSON.parse(t);c(i.errors)||this.failureFunc(JSON.stringify(i.errors))}this.isCustomDataAdaptor(this.adaptor)&&(e=u({},this.ajaxReqOption,e));try{Nn.parse.parseJson(t)}catch(e){t=[]}t=this.adaptor.processResponse(Nn.parse.parseJson(t),this,null,e.httpRequest,e),this.ajaxDeffered.resolve(t)},t.prototype.failureFunc=function(t){this.ajaxDeffered.reject([{error:t}])},t.prototype.doAjaxRequest=function(t,e){var i=this;if(t=u({},{type:"POST",contentType:"application/json; charset=utf-8",processData:!1},t),this.ajaxDeffered=new Yn,this.isCustomDataAdaptor(this.adaptor))this.ajaxReqOption=t,e.call(this,{data:t.data,onSuccess:this.successFunc.bind(this),onFailure:this.failureFunc.bind(this)});else{var r=new hi(t);r.beforeSend=function(){i.beforeSend(r.httpRequest,r)},r.onSuccess=this.successFunc.bind(this),r.onFailure=this.failureFunc.bind(this),r.send().catch(function(t){return!0})}return this.ajaxDeffered.promise},t}(),Yn=function(){return function(){var t=this;this.promise=new Promise(function(e,i){t.resolve=e,t.reject=i}),this.then=this.promise.then.bind(this.promise),this.catch=this.promise.catch.bind(this.promise)}}();(_i||(_i={})).mapsTitleFont={size:"14px",fontWeight:"Medium",color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"};var $n,Jn=function(){function t(t){this.control=t}return t.prototype.print=function(t){var e=this;this.printWindow=window.open("","print","height="+window.outerHeight+",width="+window.outerWidth+",tabbar=no"),this.printWindow.moveTo(0,0),this.printWindow.resizeTo(screen.availWidth,screen.availHeight);var i={cancel:!1,htmlContent:this.getHTMLContent(t),name:Xr};this.control.trigger(Xr,i,function(){i.cancel||y(i.htmlContent,e.printWindow)})},t.prototype.getHTMLContent=function(t){var e=w("div");return t?t instanceof Array?t.forEach(function(t){e.appendChild(Bt(t).cloneNode(!0))}):t instanceof Element?e.appendChild(t.cloneNode(!0)):e.appendChild(Bt(t).cloneNode(!0)):e.appendChild(this.control.element.cloneNode(!0)),e},t.prototype.getModuleName=function(){return"Print"},t.prototype.destroy=function(t){},t}(),Xn=function(){function t(t){this.control=t}return t.prototype.export=function(t,e,i){var r=this;return new Promise(function(n,o){var s=w("canvas",{id:"ej2-canvas",attrs:{height:r.control.availableSize.height.toString(),width:r.control.availableSize.width.toString()}}),a=!(wi.userAgent.toString().indexOf("HeadlessChrome")>-1),l='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+r.control.svgObject.outerHTML+"</svg>",h=window.URL.createObjectURL(new Blob("SVG"===t?[l]:[(new XMLSerializer).serializeToString(r.control.svgObject)],{type:"image/svg+xml"}));if("SVG"===t)i?ye(e,t,h,a):n(null);else{var u=new Image,c=s.getContext("2d");u.onload=function(){c.drawImage(u,0,0),window.URL.revokeObjectURL(h),i?ye(e,t,s.toDataURL("image/png").replace("image/png","image/octet-stream"),a):"JPEG"===t?n(s.toDataURL("image/jpeg")):"PNG"===t&&n(s.toDataURL("image/png"))},u.src=h}})},t.prototype.getModuleName=function(){return"ImageExport"},t.prototype.destroy=function(t){},t}(),Qn=function(){function t(t){this.table={},this.nElements=0,this.toStr=t||function(t){return"[object String]"===Object.prototype.toString.call(t)?"$s"+t:"$o"+t.toString()}}return t.prototype.getValue=function(t){var e=this.table["$"+this.toStr(t)];if(void 0!==e)return e.value},t.prototype.setValue=function(t,e){var i="$"+this.toStr(t);this.table[i];this.nElements++,this.table[i]={key:t,value:e}},t.prototype.remove=function(t){var e="$"+this.toStr(t),i=this.table[e];return delete this.table[e],this.nElements--,i.value},t.prototype.keys=function(){for(var t=[],e=Object.keys(this.table),i=0;i<e.length;i++){var r=this.table[e[i]];t.push(r.key)}return t},t.prototype.values=function(){for(var t=[],e=Object.keys(this.table),i=0;i<e.length;i++){var r=this.table[e[i]];t.push(r.value)}return t},t.prototype.containsKey=function(t){return!(void 0===this.getValue(t))},t.prototype.clear=function(){this.table={},this.nElements=0},t.prototype.size=function(){return this.nElements},t}(),Zn=function(){function t(t){this.stringStartMark="/",this.internalValue="",this.isSaving6=!1,this.position6=-1,this.internalValue=this.normalizeValue(t)}return Object.defineProperty(t.prototype,"status",{get:function(){return this.status6},set:function(t){this.status6=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving6},set:function(t){this.isSaving6=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index6},set:function(t){this.index6=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position6},set:function(t){this.position6=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.internalValue},set:function(t){var e=t;null!==t&&t.length>0?(e=t,this.internalValue=this.normalizeValue(e)):this.internalValue=e},enumerable:!0,configurable:!0}),t.prototype.save=function(t){t.write(this.toString())},t.prototype.toString=function(){return this.stringStartMark+this.escapeString(this.value)},t.prototype.clone=function(e){var i=new t;return i.value=this.internalValue,i},t.prototype.escapeString=function(e){for(var i="",r=0,n=e.length;r<n;r++){var o=e[r];t.delimiters.indexOf(o);i+=o}return i},t.prototype.normalizeValue=function(t,e){return t},t.delimiters="()<>[]{}/%}",t.replacements=[" ","\t","\n","\r"],t}(),to=function(){function t(){this.forTest="test",this.forTest=t.obj}return t.obj="obj",t.endObj="endobj",t.r="R",t.whiteSpace=" ",t.slash="/",t.newLine="\r\n",t.stream="stream",t.endStream="endstream",t.xref="xref",t.f="f",t.n="n",t.trailer="trailer",t.startxref="startxref",t.eof="%%EOF",t.header="%PDF-1.5",t.beginText="BT",t.endText="ET",t.beginPath="m",t.appendLineSegment="l",t.stroke="S",t.fill="f",t.fillEvenOdd="f*",t.fillStroke="B",t.fillStrokeEvenOdd="B*",t.appendbeziercurve="c",t.appendRectangle="re",t.saveState="q",t.restoreState="Q",t.paintXObject="Do",t.modifyCtm="cm",t.modifyTM="Tm",t.setLineWidth="w",t.setLineCapStyle="J",t.setLineJoinStyle="j",t.setDashPattern="d",t.setFlatnessTolerance="i",t.closePath="h",t.closeStrokePath="s",t.closeFillStrokePath="b",t.setCharacterSpace="Tc",t.setWordSpace="Tw",t.setHorizontalScaling="Tz",t.setTextLeading="TL",t.setFont="Tf",t.setRenderingMode="Tr",t.setTextRise="Ts",t.setTextScaling="Tz",t.setCoords="Td",t.goToNextLine="T*",t.setText="Tj",t.setTextWithFormatting="TJ",t.setTextOnNewLine="'",t.selectcolorspaceforstroking="CS",t.selectcolorspacefornonstroking="cs",t.setrbgcolorforstroking="RG",t.setrbgcolorfornonstroking="rg",t.setcmykcolorforstroking="K",t.setcmykcolorfornonstroking="k",t.setgraycolorforstroking="G",t.setgraycolorfornonstroking="g",t.clipPath="W",t.clipPathEvenOdd="W*",t.endPath="n",t.setGraphicsState="gs",t.comment="%",t.evenOdd="*",t.setMiterLimit="M",t.setColorAndPattern="scn",t.setColorAndPatternStroking="SCN",t}(),eo=function(){return function(){this.pages="Pages",this.kids="Kids",this.count="Count",this.resources="Resources",this.type="Type",this.size="Size",this.mediaBox="MediaBox",this.parent="Parent",this.root="Root",this.decodeParms="DecodeParms",this.filter="Filter",this.font="Font",this.type1="Type1",this.baseFont="BaseFont",this.encoding="Encoding",this.subtype="Subtype",this.contents="Contents",this.procset="ProcSet",this.colorSpace="ColorSpace",this.extGState="ExtGState",this.pattern="Pattern",this.xObject="XObject",this.length="Length",this.width="Width",this.height="Height",this.bitsPerComponent="BitsPerComponent",this.image="Image",this.dctdecode="DCTDecode",this.columns="Columns",this.blackIs1="BlackIs1",this.k="K",this.s="S",this.predictor="Predictor",this.deviceRgb="DeviceRGB",this.next="Next",this.action="Action",this.link="Link",this.a="A",this.annot="Annot",this.p="P",this.c="C",this.rect="Rect",this.uri="URI",this.annots="Annots",this.ca="ca",this.CA="CA",this.xyz="XYZ",this.fit="Fit",this.dest="Dest",this.BM="BM",this.flatedecode="FlateDecode",this.rotate="Rotate",this.bBox="BBox",this.form="Form",this.w="W",this.cIDFontType2="CIDFontType2",this.cIDToGIDMap="CIDToGIDMap",this.identity="Identity",this.dw="DW",this.fontDescriptor="FontDescriptor",this.cIDSystemInfo="CIDSystemInfo",this.fontName="FontName",this.flags="Flags",this.fontBBox="FontBBox",this.missingWidth="MissingWidth",this.stemV="StemV",this.italicAngle="ItalicAngle",this.capHeight="CapHeight",this.ascent="Ascent",this.descent="Descent",this.leading="Leading",this.avgWidth="AvgWidth",this.fontFile2="FontFile2",this.maxWidth="MaxWidth",this.xHeight="XHeight",this.stemH="StemH",this.registry="Registry",this.ordering="Ordering",this.supplement="Supplement",this.type0="Type0",this.identityH="Identity-H",this.toUnicode="ToUnicode",this.descendantFonts="DescendantFonts",this.background="Background",this.shading="Shading",this.matrix="Matrix",this.antiAlias="AntiAlias",this.function="Function",this.extend="Extend",this.shadingType="ShadingType",this.coords="Coords",this.domain="Domain",this.range="Range",this.functionType="FunctionType",this.bitsPerSample="BitsPerSample",this.patternType="PatternType",this.paintType="PaintType",this.tilingType="TilingType",this.xStep="XStep",this.yStep="YStep"}}(),io=function(){function t(t){if(this.position7=-1,this.primitiveItems=new Qn,this.prefix="<<",this.suffix=">>",this.resources=[],this.object=null,this.archive=!0,this.isFont=!1,void 0===t)this.primitiveItems=new Qn,this.encrypt=!0,this.dictionaryProperties=new eo;else{this.primitiveItems=new Qn;for(var e=t.items.keys(),i=t.items.values(),r=0;r<t.items.size();r++)this.primitiveItems.setValue(e[r],i[r]);this.status=t.status,this.freezeChanges(this),this.encrypt=!0,this.dictionaryProperties=new eo}}return Object.defineProperty(t.prototype,"items",{get:function(){return this.primitiveItems},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this.status7},set:function(t){this.status7=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving7},set:function(t){this.isSaving7=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index7},set:function(t){this.index7=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return this.object},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position7},set:function(t){this.position7=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Count",{get:function(){return this.primitiveItems.size()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Dictionary",{get:function(){return this},enumerable:!0,configurable:!0}),t.prototype.getArchive=function(){return this.archive},t.prototype.setArchive=function(t){this.archive=t},t.prototype.setEncrypt=function(t){this.encrypt=t,this.modify()},t.prototype.getEncrypt=function(){return this.encrypt},t.prototype.freezeChanges=function(t){this.bChanged=!1},t.prototype.clone=function(e){return new t},t.prototype.modify=function(){this.bChanged=!0},t.prototype.remove=function(t){"string"!=typeof t?(this.primitiveItems.remove(t.value),this.modify()):this.remove(new Zn(t))},t.prototype.containsKey=function(t){return this.primitiveItems.containsKey(t.toString())},t.prototype.onBeginSave=function(){this.beginSave.sender.beginSave()},t.prototype.onFontDictionaryBeginSave=function(){this.fontDictionaryBeginSave.sender.fontDictionaryBeginSave()},t.prototype.onDescendantFontBeginSave=function(){this.descendantFontBeginSave.sender.descendantFontBeginSave()},t.prototype.onTemplateBeginSave=function(){this.pageBeginDrawTemplate.sender.pageBeginSave()},t.prototype.onBeginAnnotationSave=function(){this.annotationBeginSave.sender.beginSave()},t.prototype.onSectionBeginSave=function(t){var e=this.sectionBeginSave;e.sender.beginSave(e.state,t)},t.prototype.save=function(t,e){void 0===e?this.save(t,!0):(t.write(this.prefix),void 0!==this.beginSave&&this.onBeginSave(),void 0!==this.descendantFontBeginSave&&this.onDescendantFontBeginSave(),void 0!==this.fontDictionaryBeginSave&&this.onFontDictionaryBeginSave(),void 0!==this.annotationBeginSave&&this.onBeginAnnotationSave(),void 0!==this.sectionBeginSave&&this.onSectionBeginSave(t),void 0!==this.pageBeginDrawTemplate&&this.onTemplateBeginSave(),this.Count>0&&this.saveItems(t),t.write(this.suffix),t.write(to.newLine))},t.prototype.saveItems=function(t){t.write(to.newLine);for(var e=this.primitiveItems.keys(),i=this.primitiveItems.values(),r=0;r<e.length;r++){var n=e[r];new Zn(n).save(t),t.write(to.whiteSpace);i[r].save(t),t.write(to.newLine)}},t}(),ro=function(){return function(t){this.sender=t}}(),no=function(){return function(t){this.sender=t}}(),oo=function(){return function(t){this.sender=t}}(),so=function(){return function(t){this.sender=t}}(),ao=function(){return function(t,e){this.sender=t,this.state=e}}(),lo=function(){return function(t){this.sender=t}}(),ho=function(){function t(t){this.position5=-1,this.value=t}return Object.defineProperty(t.prototype,"intValue",{get:function(){return this.value},set:function(t){this.value=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInteger",{get:function(){return this.integer},set:function(t){this.integer=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this.status5},set:function(t){this.status5=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving5},set:function(t){this.isSaving5=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index5},set:function(t){this.index5=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position5},set:function(t){this.position5=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return null},enumerable:!0,configurable:!0}),t.prototype.save=function(t){t.write(this.intValue.toString())},t.prototype.clone=function(e){return new t(this.value)},t.floatToString=function(t){var e=t.toFixed(2);return"0.00"===e&&(e=".00"),e},t.min=function(t,e,i){var r=Math.min(t,e);return Math.min(i,r)},t}(),uo=function(){function t(e){if(this.startMark="[",this.endMark="]",this.position9=-1,this.clonedObject9=null,this.isFont=!1,void 0===e)this.internalElements=[];else if(void 0===e||e instanceof t){var i=e;this.internalElements=[];for(n=0;n<i.elements.length;n++)this.internalElements.push(i.elements[n])}else for(var r=e,n=0;n<r.length;n++){var o=new ho(r[n]);this.add(o)}}return t.prototype.items=function(t){return this.internalElements[t]},Object.defineProperty(t.prototype,"count",{get:function(){return this.internalElements.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this.status9},set:function(t){this.status9=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving9},set:function(t){this.isSaving9=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return this.clonedObject9},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position9},set:function(t){this.position9=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index9},set:function(t){this.index9=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"CrossTable",{get:function(){return this.pdfCrossTable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"elements",{get:function(){return this.internalElements},enumerable:!0,configurable:!0}),t.prototype.add=function(t){void 0===this.internalElements&&(this.internalElements=[]),this.internalElements.push(t),this.markedChange()},t.prototype.markedChange=function(){this.bChanged=!0},t.prototype.contains=function(t){for(var e=0;e<this.internalElements.length;e++){var i=this.internalElements[e],r=t;if(null!=i&&void 0!==i&&null!=r&&void 0!==r&&i.value===r.value)return!0}return!1},t.prototype.getItems=function(t){return this.internalElements[t]},t.prototype.save=function(t){t.write(this.startMark);for(var e=0,i=this.count;e<i;e++)this.getItems(e).save(t),e+1!==i&&t.write(to.whiteSpace);t.write(this.endMark)},t.prototype.clone=function(e){this.clonedObject9=null;for(var i=new t,r=0;r<this.internalElements.length;r++){var n=this.internalElements[r];i.add(n.clone(e))}return i.pdfCrossTable=e,this.clonedObject9=i,i},t.fromRectangle=function(e){return new t([e.x,e.y,e.width,e.height])},t.prototype.insert=function(t,e){if(t<this.internalElements.length&&t>0){for(var i=[],r=0;r<t;r++)i.push(this.internalElements[r]);i.push(e);for(r=t;r<this.internalElements.length;r++)i.push(this.internalElements[r]);this.internalElements=i}else this.internalElements.push(e);this.markChanged()},t.prototype.indexOf=function(t){return this.internalElements.indexOf(t)},t.prototype.remove=function(t){var e=this.internalElements.indexOf(t);this.internalElements[e]=null,this.markChanged()},t.prototype.removeAt=function(t){if(this.internalElements.length>t){for(var e=[],i=0;i<t;i++)e.push(this.internalElements[i]);for(i=t+1;i<this.internalElements.length;i++)e.push(this.internalElements[i]);this.internalElements=e}this.markChanged()},t.prototype.clear=function(){this.internalElements=[],this.markChanged()},t.prototype.markChanged=function(){this.bChanged=!0},t}(),co=function(){function t(){}return t.save=function(t,e){if(null===t||void 0===t||""===t)throw new Error("ArgumentException: fileName cannot be undefined, null or empty");var i=t.substring(t.lastIndexOf(".")+1,t.length),r=this.getMimeType(i);if(""!==r&&(e=new Blob([e],{type:r})),this.isMicrosoftBrowser)navigator.msSaveBlob(e,t);else{var n=document.createElementNS("http://www.w3.org/1999/xhtml","a");this.saveInternal(t,i,e,n,"download"in n)}},t.saveInternal=function(t,e,i,r,n){if(n){r.download=t;var o=window.URL.createObjectURL(i);r.href=o;var s=document.createEvent("MouseEvent");s.initEvent("click",!0,!0),r.dispatchEvent(s),setTimeout(function(){window.URL.revokeObjectURL(o),o=void 0})}else if("docx"!==e&&"xlsx"!==e){var a=window.URL.createObjectURL(i);window.open(a,"_blank")||(window.location.href=a)}else{var l=new FileReader;l.onloadend=function(){window.open(l.result,"_blank")||(window.location.href=l.result)},l.readAsDataURL(i)}},t.getMimeType=function(t){var e="";switch(t){case"html":e="text/html";break;case"pdf":e="application/pdf";break;case"docx":e="application/vnd.openxmlformats-officedocument.wordprocessingml.document";break;case"xlsx":e="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";break;case"txt":e="text/plain"}return e},t}(),po=(function(){function t(){this.contentPos=0,this.bufferText="",this.bufferBlob=new Blob([""],{type:"text/plain"}),this.currentState="Initial",this.namespaceStack=[],this.namespaceStack.push(new po),this.namespaceStack[0].set("xmlns","http://www.w3.org/2000/xmlns/","Special"),this.namespaceStack.push(new po),this.namespaceStack[1].set("xml","http://www.w3.org/XML/1998/namespace","Special"),this.namespaceStack.push(new po),this.namespaceStack[2].set("","","Implied"),this.elementStack=[],this.elementStack.push(new fo),this.elementStack[0].set("","","",this.namespaceStack.length-1),this.attributeStack=[],co.isMicrosoftBrowser=!!navigator.msSaveBlob}Object.defineProperty(t.prototype,"buffer",{get:function(){return this.flush(),this.bufferBlob},enumerable:!0,configurable:!0}),t.prototype.writeProcessingInstruction=function(t,e){if(void 0===t||null===t||0===t.length)throw new Error("ArgumentException: name should not be undefined, null or empty");if(this.checkName(t),void 0!==e&&null!==e||(e=""),3===t.length&&"xml"===t&&"Initial"!==this.currentState)throw new Error("InvalidArgumentException: Cannot write XML declaration.WriteStartDocument method has already written it");if("Initial"!==this.currentState||void 0===this.bufferBlob)throw new Error("InvalidOperationException: Wrong Token");this.writeStartDocument(),this.writeProcessingInstructionInternal(t,e)},t.prototype.writeStartDocument=function(t){if("Initial"!==this.currentState||void 0===this.bufferBlob)throw new Error("InvalidOperationException: Wrong Token");this.currentState="StartDocument",this.rawText('<?xml version="1.0" encoding="utf-8'),null!==t&&void 0!==t&&(this.rawText('" standalone="'),this.rawText(t?"yes":"no")),this.rawText('"?>')},t.prototype.writeEndDocument=function(){for(;this.elementStack.length-1>0;)this.writeEndElement();this.currentState="EndDocument",this.flush()},t.prototype.writeStartElement=function(t,e,i){if(void 0===this.bufferBlob)throw new Error("InvalidOperationException: Wrong Token");if(void 0===e||null===e||0===e.length)throw new Error("ArgumentException: localName cannot be undefined, null or empty");if(this.checkName(e),"Initial"===this.currentState&&this.writeStartDocument(),"StartElement"===this.currentState&&this.startElementContent(),this.currentState="StartElement",void 0===t||null===t)void 0!==i&&null!==i&&(t=this.lookupPrefix(i)),void 0!==t&&null!==t||(t="");else if(t.length>0&&(void 0!==i&&null!==i||(i=this.lookupNamespace(t)),void 0===i||null===i||void 0!==i&&0===i.length))throw new Error("ArgumentException: Cannot use a prefix with an empty namespace");void 0!==i&&null!==i||(i=this.lookupNamespace(t)),this.writeStartElementInternal(t,e,i)},t.prototype.writeEndElement=function(){"StartElement"===this.currentState?(this.startElementContent(),this.currentState="ElementContent"):"ElementContent"===this.currentState&&(this.currentState="ElementContent"),this.currentState="EndElement";var t=this.elementStack.length-1;this.writeEndElementInternal(this.elementStack[t].prefix,this.elementStack[t].localName),this.namespaceStack.splice(this.elementStack[t].previousTop+1),this.elementStack.splice(t),this.bufferText.length>10240&&this.flush()},t.prototype.writeElementString=function(t,e,i,r){this.writeStartElement(t,e,i),void 0!==r&&null!==r&&0!==r.length&&this.writeString(r),this.writeEndElement()},t.prototype.writeAttributeString=function(t,e,i,r){this.writeStartAttribute(t,e,i,r),this.writeStringInternal(r,!0),this.writeEndAttribute()},t.prototype.writeString=function(t){this.writeInternal(t,!1)},t.prototype.writeRaw=function(t){this.writeInternal(t,!0)},t.prototype.writeInternal=function(t,e){if(void 0!==t&&null!==t){if("StartElement"!==this.currentState&&"ElementContent"!==this.currentState)throw new Error("InvalidOperationException: Wrong Token");"StartElement"===this.currentState&&this.startElementContent(),this.currentState="ElementContent",e?this.rawText(t):this.writeStringInternal(t,!1)}},t.prototype.save=function(t){for(;this.elementStack.length-1>0;)this.writeEndElement();""!==this.bufferText&&this.flush(),co.save(t,this.buffer)},t.prototype.destroy=function(){this.bufferBlob=void 0;for(var t=0;t<this.namespaceStack.length;t++)this.namespaceStack[t].destroy();this.namespaceStack=[];for(t=0;t<this.elementStack.length;t++)this.elementStack[t].destroy();this.elementStack=[],this.bufferText="",this.contentPos=0},t.prototype.flush=function(){void 0!==this.bufferBlob&&(this.bufferBlob=new Blob([this.bufferBlob,this.bufferText],{type:"text/plain"}),this.bufferText="")},t.prototype.writeProcessingInstructionInternal=function(t,e){this.bufferText+="<?",this.rawText(t),e.length>0&&(this.bufferText+=" ",e=e.replace(/\?\>/g,"? >"),this.bufferText+=e),this.bufferText+="?",this.bufferText+=">"},t.prototype.writeStartAttribute=function(t,e,i,r){if(void 0===e||null===e||0===e.length){if("xmlns"!==t)throw new Error("ArgumentException: localName cannot be undefined, null or empty");e="xmlns",t=""}if("StartElement"!==this.currentState)throw new Error("InvalidOperationException: Wrong Token");this.checkName(e),this.writeStartAttributePrefixAndNameSpace(t,e,i,r)},t.prototype.writeStartAttributePrefixAndNameSpace=function(t,e,i,r){void 0!==t&&null!==t||(void 0!==i&&null!==i&&("xmlns"===e&&"http://www.w3.org/2000/xmlns/"===i||(t=this.lookupPrefix(i))),void 0!==t&&null!==t||(t="")),void 0!==i&&null!==i||(void 0!==t&&null!==t&&t.length>0&&(i=this.lookupNamespace(t)),void 0!==i&&null!==i||(i="")),this.writeStartAttributeSpecialAttribute(t,e,i,r)},t.prototype.writeStartAttributeSpecialAttribute=function(t,e,i,r){if(0===t.length){if("x"===e[0]&&"xmlns"===e)return this.skipPushAndWrite(t,e,i),void this.pushNamespaceExplicit("",r);i.length>0&&(t=this.lookupPrefix(i))}else{if("x"===t[0]){if("xmlns"===t)return this.skipPushAndWrite(t,e,i),void this.pushNamespaceExplicit(e,r);if("xml"===t&&("space"===e||"lang"===e))return void this.skipPushAndWrite(t,e,i)}0===i.length&&(t="")}void 0!==t&&null!==t&&0!==t.length&&this.pushNamespaceImplicit(t,i),this.skipPushAndWrite(t,e,i)},t.prototype.writeEndAttribute=function(){this.currentState="StartElement",this.bufferText+='"'},t.prototype.writeStartElementInternal=function(t,e,i){this.bufferText+="<",t.length>0&&(this.rawText(t),this.bufferText+=":"),this.rawText(e);var r=this.elementStack.length;this.elementStack.push(new fo),this.elementStack[r].set(t,e,i,this.namespaceStack.length-1),this.pushNamespaceImplicit(t,i);for(var n=0;n<this.attributeStack.length;n++)this.attributeStack[n].destroy();this.attributeStack=[]},t.prototype.writeEndElementInternal=function(t,e){this.contentPos!==this.bufferText.length+1?(this.bufferText+="</",void 0!==t&&null!==t&&0!==t.length&&(this.rawText(t),this.bufferText+=":"),this.rawText(e),this.bufferText+=">"):(this.bufferText=this.bufferText.substring(0,this.bufferText.length-1),this.bufferText+=" />")},t.prototype.writeStartAttributeInternal=function(t,e,i){this.bufferText+=" ",void 0!==t&&null!==t&&t.length>0&&(this.rawText(t),this.bufferText+=":"),this.rawText(e),this.bufferText+="=",this.bufferText+='"'},t.prototype.writeNamespaceDeclaration=function(t,e){this.writeStartNamespaceDeclaration(t),this.writeStringInternal(e,!0),this.bufferText+='"'},t.prototype.writeStartNamespaceDeclaration=function(t){void 0===t||null===t||0===t.length?this.rawText(' xmlns="'):(this.rawText(" xmlns:"),this.rawText(t),this.bufferText+="=",this.bufferText+='"')},t.prototype.writeStringInternal=function(t,e){null!==t&&void 0!==t||(t=""),t=(t=(t=t.replace(/\&/g,"&")).replace(/\</g,"<")).replace(/\>/g,">"),e&&(t=t.replace(/\"/g,""")),this.bufferText+=t,e||(this.contentPos=0)},t.prototype.startElementContent=function(){for(var t=this.elementStack[this.elementStack.length-1].previousTop,e=this.namespaceStack.length-1;e>t;e--)"NeedToWrite"===this.namespaceStack[e].kind&&this.writeNamespaceDeclaration(this.namespaceStack[e].prefix,this.namespaceStack[e].namespaceUri);this.bufferText+=">",this.contentPos=this.bufferText.length+1},t.prototype.rawText=function(t){this.bufferText+=t},t.prototype.addNamespace=function(t,e,i){var r=this.namespaceStack.length;this.namespaceStack.push(new po),this.namespaceStack[r].set(t,e,i)},t.prototype.lookupPrefix=function(t){for(var e=this.namespaceStack.length-1;e>=0;e--)if(this.namespaceStack[e].namespaceUri===t)return this.namespaceStack[e].prefix},t.prototype.lookupNamespace=function(t){for(var e=this.namespaceStack.length-1;e>=0;e--)if(this.namespaceStack[e].prefix===t)return this.namespaceStack[e].namespaceUri},t.prototype.lookupNamespaceIndex=function(t){for(var e=this.namespaceStack.length-1;e>=0;e--)if(this.namespaceStack[e].prefix===t)return e;return-1},t.prototype.pushNamespaceImplicit=function(t,e){var i,r=this.lookupNamespaceIndex(t);if(-1!==r){if(r>this.elementStack[this.elementStack.length-1].previousTop){if(this.namespaceStack[r].namespaceUri!==e)throw new Error("XmlException namespace Uri needs to be the same as the one that is already declared");return}if("Special"===this.namespaceStack[r].kind){if("xml"!==t)throw new Error('InvalidArgumentException: Prefix "xmlns" is reserved for use by XML.');if(e!==this.namespaceStack[r].namespaceUri)throw new Error("InvalidArgumentException: Xml String");i="Implied"}else i=this.namespaceStack[r].namespaceUri===e?"Implied":"NeedToWrite"}else{if("http://www.w3.org/XML/1998/namespace"===e&&"xml"!==t||"http://www.w3.org/2000/xmlns/"===e&&"xmlns"!==t)throw new Error("InvalidArgumentException");i="NeedToWrite"}this.addNamespace(t,e,i)},t.prototype.pushNamespaceExplicit=function(t,e){var i=this.lookupNamespaceIndex(t);-1!==i&&i>this.elementStack[this.elementStack.length-1].previousTop?this.namespaceStack[i].kind="Written":this.addNamespace(t,e,"Written")},t.prototype.addAttribute=function(t,e,i){var r=this.attributeStack.length;this.attributeStack.push(new go),this.attributeStack[r].set(t,e,i);for(var n=0;n<r;n++)if(this.attributeStack[n].isDuplicate(t,e,i))throw new Error("XmlException: duplicate attribute name")},t.prototype.skipPushAndWrite=function(t,e,i){this.addAttribute(t,e,i),this.writeStartAttributeInternal(t,e,i)},t.prototype.checkName=function(t){if(/[ !@#$%^&*()+\=\[\]{};':"\\|,<>\/?]/.test(t))throw new Error("InvalidArgumentException: invalid name character")}}(),function(){function t(){}return t.prototype.set=function(t,e,i){this.prefix=t,this.namespaceUri=e,this.kind=i},t.prototype.destroy=function(){this.prefix=void 0,this.namespaceUri=void 0,this.kind=void 0},t}()),fo=function(){function t(){}return t.prototype.set=function(t,e,i,r){this.previousTop=r,this.prefix=t,this.namespaceUri=i,this.localName=e},t.prototype.destroy=function(){this.previousTop=void 0,this.prefix=void 0,this.localName=void 0,this.namespaceUri=void 0},t}(),go=function(){function t(){}return t.prototype.set=function(t,e,i){this.prefix=t,this.namespaceUri=i,this.localName=e},t.prototype.isDuplicate=function(t,e,i){return this.localName===e&&(this.prefix===t||this.namespaceUri===i)},t.prototype.destroy=function(){this.prefix=void 0,this.namespaceUri=void 0,this.localName=void 0},t}(),mo=function(){function t(t){this.emitBOM=!0,this.encodingType="Ansi",this.initBOM(t)}return Object.defineProperty(t.prototype,"includeBom",{get:function(){return this.emitBOM},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this.encodingType},set:function(t){this.encodingType=t},enumerable:!0,configurable:!0}),t.prototype.initBOM=function(t){this.emitBOM=void 0===t||null===t||t},t.prototype.getByteCount=function(t){if(we(t,"string"),""===t){return this.utf8Len(t.charCodeAt(0))}return null!==this.type&&void 0!==this.type||(this.type="Ansi"),this.getByteCountInternal(t,0,t.length)},t.prototype.utf8Len=function(t){return t<=127?1:t<=2047?2:t<=65535?3:t<=2097151?4:0},t.prototype.isHighSurrogate=function(t){return t>=55296&&t<=56319},t.prototype.toCodepoint=function(t,e){return((t=(1023&t)<<10)|1023&e)+65536},t.prototype.getByteCountInternal=function(t,e,i){var r=0;if("Utf8"===this.encodingType||"Unicode"===this.encodingType){for(var n="Utf8"===this.encodingType,o=0;o<i;o++){var s=t.charCodeAt(n?e:e++);if(this.isHighSurrogate(s))if(n){var a=s,l=t.charCodeAt(++e);r+=this.utf8Len(this.toCodepoint(a,l))}else r+=4,++o;else r+=n?this.utf8Len(s):2;n&&e++}return r}return r=i},t.prototype.getBytes=function(t,e,i){if(we(t,"string"),we(e,"charIndex"),we(i,"charCount"),e<0||i<0)throw new RangeError("Argument Out Of Range Exception: charIndex or charCount is less than zero");if(t.length-e<i)throw new RangeError("Argument Out Of Range Exception: charIndex and charCount do not denote a valid range in string");if(""===t)return new ArrayBuffer(0);null!==this.type&&void 0!==this.type||(this.type="Ansi");var r=this.getByteCountInternal(t,e,i);switch(this.type){case"Utf8":return this.getBytesOfUtf8Encoding(r,t,e,i);case"Unicode":return this.getBytesOfUnicodeEncoding(r,t,e,i);default:return this.getBytesOfAnsiEncoding(r,t,e,i)}},t.prototype.getString=function(t,e,i){if(we(t,"bytes"),we(e,"index"),we(i,"count"),e<0||i<0)throw new RangeError("Argument Out Of Range Exception: index or count is less than zero");if(t.byteLength-e<i)throw new RangeError("Argument Out Of Range Exception: index and count do not denote a valid range in bytes");if(0===t.byteLength||0===i)return"";null!==this.type&&void 0!==this.type||(this.type="Ansi");var r="",n=new Uint8Array(t);switch(this.type){case"Utf8":return this.getStringOfUtf8Encoding(n,e,i);case"Unicode":var o=new Uint16Array(t);return r=this.getStringofUnicodeEncoding(o,e,i);default:for(var s=e,a=0;a<i;a++){var l=n[s];r+=String.fromCharCode(l),s++}return r}},t.prototype.getBytesOfAnsiEncoding=function(t,e,i,r){for(var n=new ArrayBuffer(t),o=new Uint8Array(n),s=0,a=0;a<r;a++){var l=e.charCodeAt(i++);o[s]=l<2048?l:63,s++}return n},t.prototype.getBytesOfUtf8Encoding=function(t,e,i,r){for(var n=new ArrayBuffer(t),o=new Uint8Array(n),s=i,a=0,l=0;l<r;l++){var h=e.charCodeAt(s);h<=127?o[a]=h:h<2048?(o[a]=192|h>>6,o[++a]=128|63&h):h<55296||h>=57344?(o[a]=224|h>>12,o[++a]=128|h>>6&63,o[++a]=128|63&h):(o[a]=239,o[++a]=191,o[++a]=189),++a,++s}return n},t.prototype.getBytesOfUnicodeEncoding=function(t,e,i,r){for(var n=new ArrayBuffer(t),o=new Uint16Array(n),s=0;s<r;s++){var a=e.charCodeAt(s);o[s]=a}return n},t.prototype.getStringOfUtf8Encoding=function(t,e,i){for(var r=0,n=e,o="";r<i;r++){for(var s=t[n++];n>t.length;)return o;s>127&&(s>191&&s<224&&n<i?s=(31&s)<<6|63&t[n]:s>223&&s<240&&n<t.byteLength?s=(15&s)<<12|(63&t[n])<<6|63&t[++n]:s>239&&s<248&&n<t.byteLength&&(s=(7&s)<<18|(63&t[n])<<12|(63&t[++n])<<6|63&t[++n]),++n),o+=String.fromCharCode(s)}return o},t.prototype.getStringofUnicodeEncoding=function(t,e,i){if(i>t.length)throw new RangeError("ArgumentOutOfRange_Count");for(var r=new Uint16Array(i),n=0;n<i&&n<t.length;n++)r[n]=t[e++];return String.fromCharCode.apply(null,r)},t.prototype.destroy=function(){this.emitBOM=void 0,this.encodingType=void 0},t}(),yo=function(){function t(t){this.bufferBlob=new Blob([""]),this.bufferText="",this.init(t),co.isMicrosoftBrowser=!!navigator.msSaveBlob}return Object.defineProperty(t.prototype,"buffer",{get:function(){return this.flush(),this.bufferBlob},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"encoding",{get:function(){return this.enc},enumerable:!0,configurable:!0}),t.prototype.init=function(t){null===t||void 0===t?(this.enc=new mo(!1),this.enc.type="Utf8"):(this.enc=t,this.setBomByte())},t.prototype.setBomByte=function(){if(this.encoding.includeBom)switch(this.encoding.type){case"Unicode":var t=new ArrayBuffer(2),e=new Uint8Array(t);e[0]=255,e[1]=254,this.bufferBlob=new Blob([t]);break;case"Utf8":var i=new ArrayBuffer(3),r=new Uint8Array(i);r[0]=239,r[1]=187,r[2]=191,this.bufferBlob=new Blob([i]);break;default:this.bufferBlob=new Blob([""])}},t.prototype.save=function(t){""!==this.bufferText&&this.flush(),co.save(t,this.buffer)},t.prototype.write=function(t){if(void 0===this.encoding)throw new Error("Object Disposed Exception: current writer is disposed");we(t,"string"),this.bufferText+=t,this.bufferText.length>=10240&&this.flush()},t.prototype.flush=function(){if(void 0!==this.bufferText&&null!==this.bufferText&&0!==this.bufferText.length){var t=this.encoding.getBytes(this.bufferText,0,this.bufferText.length);this.bufferText="",this.bufferBlob=new Blob([this.bufferBlob,t])}},t.prototype.writeLine=function(t){if(void 0===this.encoding)throw new Error("Object Disposed Exception: current writer is disposed");we(t,"string"),this.bufferText=this.bufferText+t+"\r\n",this.bufferText.length>=10240&&this.flush()},t.prototype.destroy=function(){this.bufferBlob=void 0,this.bufferText=void 0,this.enc instanceof mo&&this.enc.destroy(),this.enc=void 0},t}(),bo=new Int16Array(286),vo=new Uint8Array(286),wo=new Int16Array(30),So=new Uint8Array(30),Po=function(){function t(e){this.pendingBuffer=new Uint8Array(65536),this.pendingBufLength=0,this.pendingBufCache=0,this.pendingBufBitsInCache=0,this.bufferPosition=0,this.extraBits=0,this.currentHash=0,this.matchStart=0,this.matchLength=0,this.matchPrevAvail=!1,this.blockStart=0,this.stringStart=0,this.lookAhead=0,this.totalBytesIn=0,this.inputOffset=0,this.inputEnd=0,this.windowSize=32768,this.windowMask=this.windowSize-1,this.hashSize=32768,this.hashMask=this.hashSize-1,this.hashShift=Math.floor(17/3),this.maxDist=this.windowSize-262,this.checkSum=1,this.noWrap=!1,t.isHuffmanTreeInitiated||(t.initHuffmanTree(),t.isHuffmanTreeInitiated=!0),this.treeLiteral=new Co(this,286,257,15),this.treeDistances=new Co(this,30,1,15),this.treeCodeLengths=new Co(this,19,4,7),this.arrDistances=new Uint16Array(16384),this.arrLiterals=new Uint8Array(16384),this.stream=[],this.dataWindow=new Uint8Array(2*this.windowSize),this.hashHead=new Int16Array(this.hashSize),this.hashPrevious=new Int16Array(this.windowSize),this.blockStart=this.stringStart=1,this.noWrap=e,e||this.writeZLibHeader()}return Object.defineProperty(t.prototype,"compressedData",{get:function(){return this.stream},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getCompressedString",{get:function(){var t="";if(void 0!==this.stream)for(var e=0;e<this.stream.length;e++)t+=String.fromCharCode.apply(null,this.stream[e]);return t},enumerable:!0,configurable:!0}),t.prototype.write=function(t,e,i){if(void 0===t||null===t)throw new Error("ArgumentException: data cannot null or undefined");var r=e+i;if(0>e||e>r||r>t.length)throw new Error("ArgumentOutOfRangeException: Offset or length is incorrect");if("string"==typeof t){var n=new mo(!1);n.type="Utf8",r=e+(t=new Uint8Array(n.getBytes(t,0,t.length))).length}for(this.inputBuffer=t,this.inputOffset=e,this.inputEnd=r,this.noWrap||(this.checkSum=xo.checksumUpdate(this.checkSum,this.inputBuffer,this.inputOffset,r));this.inputEnd!==this.inputOffset||0!==this.pendingBufLength;)this.pendingBufferFlush(),this.compressData(!1)},t.prototype.writeZLibHeader=function(){var t=30720;t|=64,t+=31-t%31,this.pendingBufferWriteShortBytes(t)},t.prototype.pendingBufferWriteShortBytes=function(t){this.pendingBuffer[this.pendingBufLength++]=t>>8,this.pendingBuffer[this.pendingBufLength++]=t},t.prototype.compressData=function(t){var e;do{this.fillWindow();var i=t&&this.inputEnd===this.inputOffset;e=this.compressSlow(i,t)}while(0===this.pendingBufLength&&e);return e},t.prototype.compressSlow=function(t,e){if(this.lookAhead<262&&!t)return!1;for(;this.lookAhead>=262||t;){if(0===this.lookAhead)return this.lookAheadCompleted(e);this.stringStart>=2*this.windowSize-262&&this.slideWindow();var i=this.matchStart,r=this.matchLength;if(this.lookAhead>=3&&this.discardMatch(),r>=3&&this.matchLength<=r?r=this.matchPreviousBest(i,r):this.matchPreviousAvailable(),this.bufferPosition>=16384)return this.huffmanIsFull(e)}return!0},t.prototype.discardMatch=function(){var t=this.insertString();0!==t&&this.stringStart-t<=this.maxDist&&this.findLongestMatch(t)&&this.matchLength<=5&&3===this.matchLength&&this.stringStart-this.matchStart>4096&&(this.matchLength=2)},t.prototype.matchPreviousAvailable=function(){this.matchPrevAvail&&this.huffmanTallyLit(255&this.dataWindow[this.stringStart-1]),this.matchPrevAvail=!0,this.stringStart++,this.lookAhead--},t.prototype.matchPreviousBest=function(t,e){this.huffmanTallyDist(this.stringStart-1-t,e),e-=2;do{this.stringStart++,this.lookAhead--,this.lookAhead>=3&&this.insertString()}while(--e>0);return this.stringStart++,this.lookAhead--,this.matchPrevAvail=!1,this.matchLength=2,e},t.prototype.lookAheadCompleted=function(t){return this.matchPrevAvail&&this.huffmanTallyLit(255&this.dataWindow[this.stringStart-1]),this.matchPrevAvail=!1,this.huffmanFlushBlock(this.dataWindow,this.blockStart,this.stringStart-this.blockStart,t),this.blockStart=this.stringStart,!1},t.prototype.huffmanIsFull=function(t){var e=this.stringStart-this.blockStart;this.matchPrevAvail&&e--;var i=t&&0===this.lookAhead&&!this.matchPrevAvail;return this.huffmanFlushBlock(this.dataWindow,this.blockStart,e,i),this.blockStart+=e,!i},t.prototype.fillWindow=function(){for(this.stringStart>=this.windowSize+this.maxDist&&this.slideWindow();this.lookAhead<262&&this.inputOffset<this.inputEnd;){var t=2*this.windowSize-this.lookAhead-this.stringStart;t>this.inputEnd-this.inputOffset&&(t=this.inputEnd-this.inputOffset),this.dataWindow.set(this.inputBuffer.subarray(this.inputOffset,this.inputOffset+t),this.stringStart+this.lookAhead),this.inputOffset+=t,this.totalBytesIn+=t,this.lookAhead+=t}this.lookAhead>=3&&this.updateHash()},t.prototype.slideWindow=function(){this.dataWindow.set(this.dataWindow.subarray(this.windowSize,this.windowSize+this.windowSize),0),this.matchStart-=this.windowSize,this.stringStart-=this.windowSize,this.blockStart-=this.windowSize;for(var t=0;t<this.hashSize;++t){var e=65535&this.hashHead[t];this.hashHead[t]=e>=this.windowSize?e-this.windowSize:0}for(t=0;t<this.windowSize;t++){e=65535&this.hashPrevious[t];this.hashPrevious[t]=e>=this.windowSize?e-this.windowSize:0}},t.prototype.insertString=function(){var t,e=(this.currentHash<<this.hashShift^this.dataWindow[this.stringStart+2])&this.hashMask;return this.hashPrevious[this.stringStart&this.windowMask]=t=this.hashHead[e],this.hashHead[e]=this.stringStart,this.currentHash=e,65535&t},t.prototype.findLongestMatch=function(t){var e,i=4096,r=258,n=this.stringStart,o=this.stringStart+this.matchLength,s=Math.max(this.matchLength,2),a=Math.max(this.stringStart-this.maxDist,0),l=this.stringStart+258-1,h=this.dataWindow[o-1],u=this.dataWindow[o],c=this.dataWindow;s>=32&&(i>>=2),r>this.lookAhead&&(r=this.lookAhead);do{if(c[t+s]===u&&c[t+s-1]===h&&c[t]===c[n]&&c[t+1]===c[n+1]){for(e=t+2,n+=2;c[++n]===c[++e]&&c[++n]===c[++e]&&c[++n]===c[++e]&&c[++n]===c[++e]&&c[++n]===c[++e]&&c[++n]===c[++e]&&c[++n]===c[++e]&&c[++n]===c[++e]&&n<l;);if(n>o){if(this.matchStart=t,o=n,(s=n-this.stringStart)>=r)break;h=c[o-1],u=c[o]}n=this.stringStart}}while((t=65535&this.hashPrevious[t&this.windowMask])>a&&0!=--i);return this.matchLength=Math.min(s,this.lookAhead),this.matchLength>=3},t.prototype.updateHash=function(){this.currentHash=this.dataWindow[this.stringStart]<<this.hashShift^this.dataWindow[this.stringStart+1]},t.prototype.huffmanTallyLit=function(t){return this.arrDistances[this.bufferPosition]=0,this.arrLiterals[this.bufferPosition++]=t,this.treeLiteral.codeFrequencies[t]++,this.bufferPosition>=16384},t.prototype.huffmanTallyDist=function(t,e){this.arrDistances[this.bufferPosition]=t,this.arrLiterals[this.bufferPosition++]=e-3;var i=this.huffmanLengthCode(e-3);this.treeLiteral.codeFrequencies[i]++,i>=265&&i<285&&(this.extraBits+=Math.floor((i-261)/4));var r=this.huffmanDistanceCode(t-1);return this.treeDistances.codeFrequencies[r]++,r>=4&&(this.extraBits+=Math.floor(r/2-1)),this.bufferPosition>=16384},t.prototype.huffmanFlushBlock=function(t,e,i,r){this.treeLiteral.codeFrequencies[256]++,this.treeLiteral.buildTree(),this.treeDistances.buildTree(),this.treeLiteral.calculateBLFreq(this.treeCodeLengths),this.treeDistances.calculateBLFreq(this.treeCodeLengths),this.treeCodeLengths.buildTree();for(var n=4,o=18;o>n;o--)this.treeCodeLengths.codeLengths[Co.huffCodeLengthOrders[o]]>0&&(n=o+1);var s=14+3*n+this.treeCodeLengths.getEncodedLength()+this.treeLiteral.getEncodedLength()+this.treeDistances.getEncodedLength()+this.extraBits,a=this.extraBits;for(o=0;o<286;o++)a+=this.treeLiteral.codeFrequencies[o]*vo[o];for(o=0;o<30;o++)a+=this.treeDistances.codeFrequencies[o]*So[o];s>=a&&(s=a),e>=0&&i+4<s>>3?this.huffmanFlushStoredBlock(t,e,i,r):s==a?(this.pendingBufferWriteBits(2+(r?1:0),3),this.treeLiteral.setStaticCodes(bo,vo),this.treeDistances.setStaticCodes(wo,So),this.huffmanCompressBlock(),this.huffmanReset()):(this.pendingBufferWriteBits(4+(r?1:0),3),this.huffmanSendAllTrees(n),this.huffmanCompressBlock(),this.huffmanReset())},t.prototype.huffmanFlushStoredBlock=function(t,e,i,r){this.pendingBufferWriteBits(0+(r?1:0),3),this.pendingBufferAlignToByte(),this.pendingBufferWriteShort(i),this.pendingBufferWriteShort(~i),this.pendingBufferWriteByteBlock(t,e,i),this.huffmanReset()},t.prototype.huffmanLengthCode=function(t){if(255===t)return 285;for(var e=257;t>=8;)e+=4,t>>=1;return e+t},t.prototype.huffmanDistanceCode=function(t){for(var e=0;t>=4;)e+=2,t>>=1;return e+t},t.prototype.huffmanSendAllTrees=function(t){this.treeCodeLengths.buildCodes(),this.treeLiteral.buildCodes(),this.treeDistances.buildCodes(),this.pendingBufferWriteBits(this.treeLiteral.treeLength-257,5),this.pendingBufferWriteBits(this.treeDistances.treeLength-1,5),this.pendingBufferWriteBits(t-4,4);for(var e=0;e<t;e++)this.pendingBufferWriteBits(this.treeCodeLengths.codeLengths[Co.huffCodeLengthOrders[e]],3);this.treeLiteral.writeTree(this.treeCodeLengths),this.treeDistances.writeTree(this.treeCodeLengths)},t.prototype.huffmanReset=function(){this.bufferPosition=0,this.extraBits=0,this.treeLiteral.reset(),this.treeDistances.reset(),this.treeCodeLengths.reset()},t.prototype.huffmanCompressBlock=function(){for(var t=0;t<this.bufferPosition;t++){var e=255&this.arrLiterals[t],i=this.arrDistances[t];if(0!=i--){var r=this.huffmanLengthCode(e);this.treeLiteral.writeCodeToStream(r);var n=Math.floor((r-261)/4);n>0&&n<=5&&this.pendingBufferWriteBits(e&(1<<n)-1,n);var o=this.huffmanDistanceCode(i);this.treeDistances.writeCodeToStream(o),(n=Math.floor(o/2-1))>0&&this.pendingBufferWriteBits(i&(1<<n)-1,n)}else this.treeLiteral.writeCodeToStream(e)}this.treeLiteral.writeCodeToStream(256)},t.prototype.pendingBufferWriteBits=function(t,e){var i=new Uint32Array(1);i[0]=this.pendingBufCache|t<<this.pendingBufBitsInCache,this.pendingBufCache=i[0],this.pendingBufBitsInCache+=e,this.pendingBufferFlushBits()},t.prototype.pendingBufferFlush=function(t){if(this.pendingBufferFlushBits(),this.pendingBufLength>0){var e=new Uint8Array(this.pendingBufLength);e.set(this.pendingBuffer.subarray(0,this.pendingBufLength),0),this.stream.push(e)}this.pendingBufLength=0},t.prototype.pendingBufferFlushBits=function(){for(var t=0;this.pendingBufBitsInCache>=8&&this.pendingBufLength<65536;)this.pendingBuffer[this.pendingBufLength++]=this.pendingBufCache,this.pendingBufCache>>=8,this.pendingBufBitsInCache-=8,t++;return t},t.prototype.pendingBufferWriteByteBlock=function(t,e,i){var r=t.subarray(e,e+i);this.pendingBuffer.set(r,this.pendingBufLength),this.pendingBufLength+=i},t.prototype.pendingBufferWriteShort=function(t){this.pendingBuffer[this.pendingBufLength++]=t,this.pendingBuffer[this.pendingBufLength++]=t>>8},t.prototype.pendingBufferAlignToByte=function(){this.pendingBufBitsInCache>0&&(this.pendingBuffer[this.pendingBufLength++]=this.pendingBufCache),this.pendingBufCache=0,this.pendingBufBitsInCache=0},t.initHuffmanTree=function(){for(var t=0;t<144;)bo[t]=Co.bitReverse(48+t<<8),vo[t++]=8;for(;t<256;)bo[t]=Co.bitReverse(256+t<<7),vo[t++]=9;for(;t<280;)bo[t]=Co.bitReverse(-256+t<<9),vo[t++]=7;for(;t<286;)bo[t]=Co.bitReverse(-88+t<<8),vo[t++]=8;for(t=0;t<30;t++)wo[t]=Co.bitReverse(t<<11),So[t]=5},t.prototype.close=function(){do{this.pendingBufferFlush(!0),this.compressData(!0)||(this.pendingBufferFlush(!0),this.pendingBufferAlignToByte(),this.noWrap||(this.pendingBufferWriteShortBytes(this.checkSum>>16),this.pendingBufferWriteShortBytes(65535&this.checkSum)),this.pendingBufferFlush(!0))}while(this.inputEnd!==this.inputOffset||0!==this.pendingBufLength)},t.prototype.destroy=function(){this.stream=[],this.stream=void 0,this.pendingBuffer=void 0,this.treeLiteral=void 0,this.treeDistances=void 0,this.treeCodeLengths=void 0,this.arrLiterals=void 0,this.arrDistances=void 0,this.hashHead=void 0,this.hashPrevious=void 0,this.dataWindow=void 0,this.inputBuffer=void 0,this.pendingBufLength=void 0,this.pendingBufCache=void 0,this.pendingBufBitsInCache=void 0,this.bufferPosition=void 0,this.extraBits=void 0,this.currentHash=void 0,this.matchStart=void 0,this.matchLength=void 0,this.matchPrevAvail=void 0,this.blockStart=void 0,this.stringStart=void 0,this.lookAhead=void 0,this.totalBytesIn=void 0,this.inputOffset=void 0,this.inputEnd=void 0,this.windowSize=void 0,this.windowMask=void 0,this.hashSize=void 0,this.hashMask=void 0,this.hashShift=void 0,this.maxDist=void 0,this.checkSum=void 0,this.noWrap=void 0},t.isHuffmanTreeInitiated=!1,t}(),Co=function(){function t(t,e,i,r){this.writer=t,this.codeMinCount=i,this.maxLength=r,this.codeFrequency=new Uint16Array(e),this.lengthCount=new Int32Array(r)}return Object.defineProperty(t.prototype,"treeLength",{get:function(){return this.codeCount},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"codeLengths",{get:function(){return this.codeLength},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"codeFrequencies",{get:function(){return this.codeFrequency},enumerable:!0,configurable:!0}),t.prototype.setStaticCodes=function(t,e){var i=new Int16Array(t.length);i.set(t,0),this.codes=i;var r=new Uint8Array(e.length);r.set(e,0),this.codeLength=r},t.prototype.reset=function(){for(var t=0;t<this.codeFrequency.length;t++)this.codeFrequency[t]=0;this.codes=void 0,this.codeLength=void 0},t.prototype.writeCodeToStream=function(t){this.writer.pendingBufferWriteBits(65535&this.codes[t],this.codeLength[t])},t.prototype.buildCodes=function(){var e=new Int32Array(this.maxLength);this.codes=new Int16Array(this.codeCount);for(var i=0,r=0;r<this.maxLength;r++)e[r]=i,i+=this.lengthCount[r]<<15-r;for(var n=0;n<this.codeCount;n++){var o=this.codeLength[n];o>0&&(this.codes[n]=t.bitReverse(e[o-1]),e[o-1]+=1<<16-o)}},t.bitReverse=function(e){return t.reverseBits[15&e]<<12|t.reverseBits[e>>4&15]<<8|t.reverseBits[e>>8&15]<<4|t.reverseBits[e>>12]},t.prototype.getEncodedLength=function(){for(var t=0,e=0;e<this.codeFrequency.length;e++)t+=this.codeFrequency[e]*this.codeLength[e];return t},t.prototype.calculateBLFreq=function(t){for(var e,i,r,n=-1,o=0;o<this.codeCount;){r=1;var s=this.codeLength[o];for(0===s?(e=138,i=3):(e=6,i=3,n!==s&&(t.codeFrequency[s]++,r=0)),n=s,o++;o<this.codeCount&&n===this.codeLength[o]&&(o++,!(++r>=e)););r<i?t.codeFrequency[n]+=r:0!==n?t.codeFrequency[16]++:r<=10?t.codeFrequency[17]++:t.codeFrequency[18]++}},t.prototype.writeTree=function(t){for(var e,i,r,n=-1,o=0;o<this.codeCount;){r=1;var s=this.codeLength[o];for(0===s?(e=138,i=3):(e=6,i=3,n!==s&&(t.writeCodeToStream(s),r=0)),n=s,o++;o<this.codeCount&&n===this.codeLength[o]&&(o++,!(++r>=e)););if(r<i)for(;r-- >0;)t.writeCodeToStream(n);else 0!==n?(t.writeCodeToStream(16),this.writer.pendingBufferWriteBits(r-3,2)):r<=10?(t.writeCodeToStream(17),this.writer.pendingBufferWriteBits(r-3,3)):(t.writeCodeToStream(18),this.writer.pendingBufferWriteBits(r-11,7))}},t.prototype.buildTree=function(){for(var t=this.codeFrequency.length,e=new Int32Array(t),i=0,r=0,n=0;n<t;n++){var o=this.codeFrequency[n];if(0!==o){for(var s=i++,a=0;s>0&&this.codeFrequency[e[a=Math.floor((s-1)/2)]]>o;)e[s]=e[a],s=a;e[s]=n,r=n}}for(;i<2;)e[i++]=r<2?++r:0;this.codeCount=Math.max(r+1,this.codeMinCount);for(var l=i,h=new Int32Array(4*i-2),u=new Int32Array(2*i-1),c=0;c<i;c++){var p=e[c],d=2*c;h[d]=p,h[d+1]=-1,u[c]=this.codeFrequency[p]<<8,e[c]=c}this.constructHuffmanTree(e,i,u,l,h),this.buildLength(h)},t.prototype.constructHuffmanTree=function(t,e,i,r,n){do{for(var o=t[0],s=t[--e],a=i[s],l=0,h=1;h<e;)h+1<e&&i[t[h]]>i[t[h+1]]&&h++,t[l]=t[h],h=2*(l=h)+1;for(;(h=l)>0&&i[t[l=Math.floor((h-1)/2)]]>a;)t[h]=t[l];t[h]=s;var u=t[0];n[2*(s=r++)]=o,n[2*s+1]=u;var c=Math.min(255&i[o],255&i[u]);for(i[s]=a=i[o]+i[u]-c+1,l=0,h=1;h<e;)h+1<e&&i[t[h]]>i[t[h+1]]&&h++,t[l]=t[h],h=2*(l=h)+1;for(;(h=l)>0&&i[t[l=Math.floor((h-1)/2)]]>a;)t[h]=t[l];t[h]=s}while(e>1)},t.prototype.buildLength=function(t){this.codeLength=new Uint8Array(this.codeFrequency.length);for(var e=Math.floor(t.length/2),i=Math.floor((e+1)/2),r=0,n=0;n<this.maxLength;n++)this.lengthCount[n]=0;if(0!==(r=this.calculateOptimalCodeLength(t,r,e))){var o=this.maxLength-1;do{for(;0===this.lengthCount[--o];);do{this.lengthCount[o]--,this.lengthCount[++o]++,r-=1<<this.maxLength-1-o}while(r>0&&o<this.maxLength-1)}while(r>0);this.recreateTree(t,r,i)}},t.prototype.recreateTree=function(t,e,i){this.lengthCount[this.maxLength-1]+=e,this.lengthCount[this.maxLength-2]-=e;for(var r=2*i,n=this.maxLength;0!==n;n--)for(var o=this.lengthCount[n-1];o>0;){var s=2*t[r++];-1===t[s+1]&&(this.codeLength[t[s]]=n,o--)}},t.prototype.calculateOptimalCodeLength=function(t,e,i){var r=new Int32Array(i);r[i-1]=0;for(var n=i-1;n>=0;n--){var o=2*n+1;if(-1!==t[o]){(s=r[n]+1)>this.maxLength&&(s=this.maxLength,e++),r[t[o-1]]=r[t[o]]=s}else{var s=r[n];this.lengthCount[s-1]++,this.codeLength[t[o-1]]=r[n]}}return e},t.reverseBits=[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15],t.huffCodeLengthOrders=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],t}(),xo=function(){function t(){}return t.checksumUpdate=function(e,i,r,n){var o=new Uint32Array(1);o[0]=e;for(var s=o[0],a=o[0]=65535&s,l=o[0]=s>>t.checkSumBitOffset;n>0;){var h=Math.min(n,t.checksumIterationCount);for(n-=h;--h>=0;)l+=a+=o[0]=255&i[r++];a%=t.checksumBase,l%=t.checksumBase}return s=l<<t.checkSumBitOffset|a},t.checkSumBitOffset=16,t.checksumBase=65521,t.checksumIterationCount=3800,t}(),Oo=[],Bo=(function(){function t(){0===Oo.length&&t.initCrc32Table(),this.files=[],this.level="Normal",co.isMicrosoftBrowser=!!navigator.msSaveBlob}Object.defineProperty(t.prototype,"compressionLevel",{get:function(){return this.level},set:function(t){this.level=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return void 0===this.files?0:this.files.length},enumerable:!0,configurable:!0}),t.prototype.addItem=function(t){if(null===t||void 0===t)throw new Error("ArgumentException: item cannot be null or undefined");for(var e=0;e<this.files.length;e++){var i=this.files[e];if(i instanceof Bo&&i.name===t.name)throw new Error("item with same name already exist")}this.files.push(t)},t.prototype.addDirectory=function(t){if(null===t||void 0===t)throw new Error("ArgumentException: string cannot be null or undefined");if(0===t.length)throw new Error("ArgumentException: string cannot be empty");if("/"!==t.slice(-1)&&(t+="/"),-1!==this.files.indexOf(t))throw new Error("item with same name already exist");this.files.push(t)},t.prototype.getItem=function(t){if(t>=0&&t<this.files.length)return this.files[t]},t.prototype.contains=function(t){return-1!==this.files.indexOf(t)},t.prototype.save=function(t){if(null===t||void 0===t||0===t.length)throw new Error("ArgumentException: fileName cannot be null or undefined");if(0===this.files.length)throw new Error("InvalidOperation");var e=this;return new Promise(function(i,r){e.saveInternal(t,!1).then(function(){i(e)})})},t.prototype.saveAsBlob=function(){var t=this;return new Promise(function(e,i){t.saveInternal("",!0).then(function(t){e(t)})})},t.prototype.saveInternal=function(t,e){var i=this,r=this;return new Promise(function(n,o){for(var s=[],a=0,l=0;l<r.files.length;l++){i.getCompressedData(i.files[l]).then(function(i){if(a=r.constructZippedObject(s,i,a,i.isDirectory),s.length===r.files.length){var o=r.writeZippedContent(t,s,a,e);n(o)}})}})},t.prototype.destroy=function(){if(void 0!==this.files&&this.files.length>0){for(var t=0;t<this.files.length;t++){var e=this.files[t];e instanceof Bo&&e.destroy(),e=void 0}this.files=[]}this.files=void 0,this.level=void 0},t.prototype.getCompressedData=function(t){var e=this;return new Promise(function(i,r){if(t instanceof Bo){var n=new FileReader;n.onload=function(){var r=new Uint8Array(n.result),o={fileName:t.name,crc32Value:0,compressedData:[],compressedSize:void 0,uncompressedDataSize:r.length,compressionType:void 0,isDirectory:!1};if("Normal"===e.level){e.compressData(r,o,Oo);for(var s=0,a=0;a<o.compressedData.length;a++)s+=o.compressedData[a].length;o.compressedSize=s,o.compressionType="\b\0"}else o.compressedSize=r.length,o.crc32Value=e.calculateCrc32Value(0,r,Oo),o.compressionType="\0\0",o.compressedData.push(r);i(o)},n.readAsArrayBuffer(t.data)}else{i({fileName:t,crc32Value:0,compressedData:"",compressedSize:0,uncompressedDataSize:0,compressionType:"\0\0",isDirectory:!0})}})},t.prototype.compressData=function(t,e,i){var r=new Po(!0),n=0,o=0;do{if(n>=t.length){r.close();break}o=Math.min(t.length,n+16384);var s=t.subarray(n,o);e.crc32Value=this.calculateCrc32Value(e.crc32Value,s,i),r.write(s,0,o-n),n=o}while(n<=t.length);e.compressedData=r.compressedData,r.destroy()},t.prototype.constructZippedObject=function(t,e,i,r){var n=0,o=new Date;r&&(n|=16),n|=0;var s=this.writeHeader(e,o),a="PK"+s+e.fileName,l=this.writeCentralDirectory(e,s,i,n);return t.push({localHeader:a,centralDir:l,compressedData:e}),i+a.length+e.compressedSize},t.prototype.writeHeader=function(t,e){var i="";return i+="\n\0\0\0",i+=t.compressionType,i+=this.getBytes(this.getModifiedTime(e),2),i+=this.getBytes(this.getModifiedDate(e),2),i+=this.getBytes(t.crc32Value,4),i+=this.getBytes(t.compressedSize,4),i+=this.getBytes(t.uncompressedDataSize,4),i+=this.getBytes(t.fileName.length,2),i+=this.getBytes(0,2)},t.prototype.writeZippedContent=function(t,e,i,r){for(var n=0,o=[],s=0;s<e.length;s++){var a=e[s];for(n+=a.centralDir.length,o.push(this.getArrayBuffer(a.localHeader));a.compressedData.compressedData.length;)o.push(a.compressedData.compressedData.shift().buffer)}for(s=0;s<e.length;s++)o.push(this.getArrayBuffer(e[s].centralDir));o.push(this.getArrayBuffer(this.writeFooter(e,n,i)));var l=new Blob(o,{type:"application/zip"});return r||co.save(t,l),l},t.prototype.writeCentralDirectory=function(t,e,i,r){return"PK"+this.getBytes(20,2)+e+this.getBytes(0,2)+"\0\0\0\0"+this.getBytes(r,4)+this.getBytes(i,4)+t.fileName},t.prototype.writeFooter=function(t,e,i){return"PK\0\0\0\0"+this.getBytes(t.length,2)+this.getBytes(t.length,2)+this.getBytes(e,4)+this.getBytes(i,4)+this.getBytes(0,2)},t.prototype.getArrayBuffer=function(t){for(var e=new Uint8Array(t.length),i=0;i<t.length;++i)e[i]=255&t.charCodeAt(i);return e.buffer},t.prototype.getBytes=function(t,e){for(var i="",r=0;r<e;r++)i+=String.fromCharCode(255&t),t>>>=8;return i},t.prototype.getModifiedTime=function(t){var e=t.getHours();return e<<=6,e|=t.getMinutes(),e<<=5,e|=t.getSeconds()/2},t.prototype.getModifiedDate=function(t){var e=t.getFullYear()-1980;return e<<=4,e|=t.getMonth()+1,e<<=5,e|=t.getDate()},t.prototype.calculateCrc32Value=function(t,e,i){t^=-1;for(var r=0;r<e.length;r++)t=t>>>8^i[255&(t^e[r])];return-1^t},t.initCrc32Table=function(){for(var t,e=0;e<256;e++){t=e;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;Oo[e]=t}}}(),function(){function t(t,e){if(null===t||void 0===t)throw new Error("ArgumentException: data cannot be null or undefined");if(null===e||void 0===e)throw new Error("ArgumentException: string cannot be null or undefined");if(0===e.length)throw new Error("string cannot be empty");this.data=t,this.name=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this.fileName},set:function(t){this.fileName=t},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this.fileName=void 0,this.data=void 0},t}()),Lo=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),To=function(t){function e(e,i){var r=t.call(this,e)||this;return r.dicPrefix="stream",r.dicSuffix="endstream",r.clonedObject2=null,r.bCompress=!0,r.isImageStream=!1,r.isFontStream=!1,void 0!==e||void 0!==i?(r.dataStream2=[],r.dataStream2=i,r.bCompress2=!1):(r.dataStream2=[],r.bCompress2=!0),r}return Lo(e,t),Object.defineProperty(e.prototype,"internalStream",{get:function(){return this.dataStream2},set:function(t){this.dataStream2=[],this.dataStream2=t,this.modify()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isImage",{get:function(){return this.isImageStream},set:function(t){this.isImageStream=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isFont",{get:function(){return this.isFontStream},set:function(t){this.isFontStream=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"compress",{get:function(){return this.bCompress},set:function(t){this.bCompress=t,this.modify()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.dataStream2},set:function(t){this.dataStream2=[],this.dataStream2=t,this.modify()},enumerable:!0,configurable:!0}),e.prototype.clearStream=function(){this.internalStream=[],this.items.containsKey(this.dictionaryProperties.filter)&&this.remove(this.dictionaryProperties.filter),this.bCompress=!0,this.modify()},e.prototype.write=function(t){if(null==t)throw new Error("ArgumentNullException:text");if(t.length<=0)throw new Error("ArgumentException: Can not write an empty string, text");this.dataStream2.push(t),this.modify()},e.prototype.writeBytes=function(t){if(null===t)throw new Error("ArgumentNullException:data");if(t.length<=0)throw new Error("ArgumentException: Can not write an empty bytes, data");for(var e="",i=0;i<t.length;i++)e+=String.fromCharCode(t[i]);this.dataStream2.push(e),this.modify()},e.prototype.onCmapBeginSave=function(){this.cmapBeginSave.sender.cmapBeginSave()},e.prototype.onFontProgramBeginSave=function(){this.fontProgramBeginSave.sender.fontProgramBeginSave()},e.prototype.compressContent=function(t,e){if(this.bCompress){for(var i=[],r=0;r<t.length;r++)i.push(t.charCodeAt(r));var n=new Uint8Array(i),o=new Po;o.write(n,0,n.length),o.close(),t=o.getCompressedString,this.addFilter(this.dictionaryProperties.flatedecode)}return t},e.prototype.addFilter=function(t){var e=this.items.getValue(this.dictionaryProperties.filter);if(e instanceof Io){e=e.object}var i=e,r=e;null!=r&&((i=new uo).insert(0,r),this.items.setValue(this.dictionaryProperties.filter,i)),r=new Zn(t),null==i?this.items.setValue(this.dictionaryProperties.filter,r):i.insert(0,r)},e.prototype.save=function(e){void 0!==this.cmapBeginSave&&this.onCmapBeginSave(),void 0!==this.fontProgramBeginSave&&this.onFontProgramBeginSave();for(var i="",r=0;r<this.data.length;r++)i+=this.data[r];i.length>1&&!this.isImage&&!this.isFont&&(i="q\r\n"+i+"Q\r\n");var n=(i=this.compressContent(i,e)).length;this.items.setValue(this.dictionaryProperties.length,new ho(n)),t.prototype.save.call(this,e,!1),e.write(this.dicPrefix),e.write(to.newLine),i.length>0&&e.write(i),e.write(to.newLine),e.write(this.dicSuffix),e.write(to.newLine)},e.bytesToString=function(t){for(var e="",i=0;i<t.length;i++)e+=String.fromCharCode(t[i]);return e},e}(io),Mo=function(){return function(t){this.sender=t}}(),Do=function(){return function(t){this.sender=t}}();!function(t){!function(t){t[t.None=0]="None",t[t.Ascii=1]="Ascii",t[t.Unicode=2]="Unicode"}(t.ForceEncoding||(t.ForceEncoding={}));var e;!function(t){t[t.StringValue=0]="StringValue",t[t.ByteBuffer=1]="ByteBuffer"}(e||(e={}))}($n||($n={}));var ko,Eo=function(){function t(t){if(this.bHex=!1,this.position1=-1,this.clonedObject1=null,this.bDecrypted=!1,this.isParentDecrypted=!1,this.isPacked=!1,this.isFormField=!1,this.isColorSpace=!1,this.isHexString=!0,void 0===t)this.bHex=!1;else if(!(t.length>0&&"0xfeff"===t[0])){this.stringValue=t,this.data=[];for(var e=0;e<t.length;++e)this.data.push(t.charCodeAt(e))}}return Object.defineProperty(t.prototype,"hex",{get:function(){return this.bHex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.stringValue},set:function(t){this.stringValue=t,this.data=null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this.status1},set:function(t){this.status1=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving1},set:function(t){this.isSaving1=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index1},set:function(t){this.index1=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return this.clonedObject1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position1},set:function(t){this.position1=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"CrossTable",{get:function(){return this.crossTable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"converted",{get:function(){return this.bConverted},set:function(t){this.bConverted=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"encode",{get:function(){return this.bForceEncoding},set:function(t){this.bForceEncoding=t},enumerable:!0,configurable:!0}),t.bytesToHex=function(t){if(null==t)return"";return""},t.prototype.save=function(e){if(null===e)throw new Error("ArgumentNullException : writer");void 0!==this.encode&&this.encode===$n.ForceEncoding.Ascii?e.write(this.pdfEncode()):e.write(t.stringMark[0]+this.value+t.stringMark[1])},t.prototype.pdfEncode=function(){var e="";if(void 0!==this.encode&&this.encode===$n.ForceEncoding.Ascii){for(var i=this.escapeSymbols(this.value),r=0;r<i.length;r++)e+=String.fromCharCode(i[r]);e=t.stringMark[0]+e+t.stringMark[1]}else e=this.value;return e},t.prototype.escapeSymbols=function(t){for(var e=[],i=0;i<t.length;i++){var r=t.charCodeAt(i);switch(r){case 40:case 41:e.push(92),e.push(r);break;case 13:e.push(92),e.push(114);break;case 92:e.push(92),e.push(r);break;default:e.push(r)}}return e},t.prototype.clone=function(e){if(null!==this.clonedObject1&&this.clonedObject1.CrossTable===e)return this.clonedObject1;this.clonedObject1=null;var i=new t(this.stringValue);return i.bHex=this.bHex,i.crossTable=e,i.isColorSpace=this.isColorSpace,this.clonedObject1=i,i},t.toUnicodeArray=function(t,e){if(null==t)throw new Error("Argument Null Exception : value");for(var i=[],r=0;r<t.length;r++){var n=t.charCodeAt(r);i.push(n/256>>>0),i.push(255&n)}return i},t.byteToString=function(t){if(null==t)throw new Error("Argument Null Exception : stream");for(var e="",i=0;i<t.length;++i)e+=String.fromCharCode(t[i]);return e},t.stringMark="()",t.hexStringMark="<>",t.hexFormatPattern="{0:X2}",t}(),jo=function(){function t(t,e){this.index3=-1,this.position3=-1,this.objNumber=0,this.genNumber=0,"number"==typeof t&&"number"==typeof e?(this.objNumber=t,this.genNumber=e):(this.objNumber=Number(t),this.genNumber=Number(e))}return Object.defineProperty(t.prototype,"status",{get:function(){return this.status3},set:function(t){this.status3=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving3},set:function(t){this.isSaving3=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index3},set:function(t){this.index3=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position3},set:function(t){this.position3=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return null},enumerable:!0,configurable:!0}),t.prototype.save=function(t){t.write(this.toString())},t.prototype.toString=function(){return this.objNumber.toString()+" "+this.genNumber.toString()+" R"},t.prototype.clone=function(t){return null},t}(),Io=function(){function t(t,e){this.index4=-1,this.position4=-1,this.objectIndex=-1,this.dictionaryProperties=new eo,this.initialize(t)}return Object.defineProperty(t.prototype,"status",{get:function(){return this.status4},set:function(t){this.status4=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.isSaving4},set:function(t){this.isSaving4=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index4},set:function(t){this.index4=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.position4},set:function(t){this.position4=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"object",{get:function(){return this.primitiveObject},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"reference",{get:function(){return this.pdfReference},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.objectIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.primitiveObject},enumerable:!0,configurable:!0}),t.prototype.initialize=function(t){if(t instanceof uo||t instanceof io||t instanceof Zn||t instanceof ho||t instanceof To||t instanceof jo||t instanceof Eo)this.primitiveObject=t;else{var e=t;this.initialize(e.element)}},t.prototype.save=function(t){t.position;var e=t.document.crossTable;this.object.isSaving=!0;e.getReference(this.object).save(t)},t.prototype.clone=function(t){return null},t}(),Ro=function(){function t(){this.action=null,this.dictionaryProperties=new eo,this.initialize()}return Object.defineProperty(t.prototype,"next",{get:function(){return this.action},set:function(t){this.action=t,this.dictionary.items.setValue(this.dictionaryProperties.next,new Io(this.action))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dictionary",{get:function(){return void 0===this.pdfDictionary&&(this.pdfDictionary=new io),this.pdfDictionary},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){this.dictionary.items.setValue(this.dictionaryProperties.type,new Zn(this.dictionaryProperties.action))},Object.defineProperty(t.prototype,"element",{get:function(){return this.dictionary},enumerable:!0,configurable:!0}),t}(),Ao=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),No=function(t){function e(e){var i=t.call(this)||this;return i.uniformResourceIdentifier="",i}return Ao(e,t),Object.defineProperty(e.prototype,"uri",{get:function(){return this.uniformResourceIdentifier},set:function(t){this.uniformResourceIdentifier=t,this.dictionary.items.setValue(this.dictionaryProperties.uri,new Eo(this.uniformResourceIdentifier))},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.dictionary.items.setValue(this.dictionaryProperties.s,new Zn(this.dictionaryProperties.uri))},e}(Ro);!function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right"}(ko||(ko={}));var Fo;!function(t){t[t.Top=0]="Top",t[t.Middle=1]="Middle",t[t.Bottom=2]="Bottom"}(Fo||(Fo={}));var Vo;!function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right",t[t.Justify=3]="Justify"}(Vo||(Vo={}));var zo;!function(t){t[t.Fill=0]="Fill",t[t.Stroke=1]="Stroke",t[t.FillStroke=2]="FillStroke",t[t.None=3]="None",t[t.ClipFlag=4]="ClipFlag",t[t.ClipFill=4]="ClipFill",t[t.ClipStroke=5]="ClipStroke",t[t.ClipFillStroke=6]="ClipFillStroke",t[t.Clip=7]="Clip"}(zo||(zo={}));var Go;!function(t){t[t.Miter=0]="Miter",t[t.Round=1]="Round",t[t.Bevel=2]="Bevel"}(Go||(Go={}));var _o;!function(t){t[t.Flat=0]="Flat",t[t.Round=1]="Round",t[t.Square=2]="Square"}(_o||(_o={}));var Ho;!function(t){t[t.Solid=0]="Solid",t[t.Dash=1]="Dash",t[t.Dot=2]="Dot",t[t.DashDot=3]="DashDot",t[t.DashDotDot=4]="DashDotDot",t[t.Custom=5]="Custom"}(Ho||(Ho={}));var Wo;!function(t){t[t.Winding=0]="Winding",t[t.Alternate=1]="Alternate"}(Wo||(Wo={}));var Uo;!function(t){t[t.Rgb=0]="Rgb",t[t.Cmyk=1]="Cmyk",t[t.GrayScale=2]="GrayScale",t[t.Indexed=3]="Indexed"}(Uo||(Uo={}));var qo;!function(t){t[t.Normal=0]="Normal",t[t.Multiply=1]="Multiply",t[t.Screen=2]="Screen",t[t.Overlay=3]="Overlay",t[t.Darken=4]="Darken",t[t.Lighten=5]="Lighten",t[t.ColorDodge=6]="ColorDodge",t[t.ColorBurn=7]="ColorBurn",t[t.HardLight=8]="HardLight",t[t.SoftLight=9]="SoftLight",t[t.Difference=10]="Difference",t[t.Exclusion=11]="Exclusion",t[t.Hue=12]="Hue",t[t.Saturation=13]="Saturation",t[t.Color=14]="Color",t[t.Luminosity=15]="Luminosity"}(qo||(qo={}));var Ko;!function(t){t[t.Centimeter=0]="Centimeter",t[t.Pica=1]="Pica",t[t.Pixel=2]="Pixel",t[t.Point=3]="Point",t[t.Inch=4]="Inch",t[t.Document=5]="Document",t[t.Millimeter=6]="Millimeter"}(Ko||(Ko={}));var Yo;!function(t){t[t.Fit=0]="Fit",t[t.Center=1]="Center",t[t.Stretch=2]="Stretch",t[t.Tile=3]="Tile"}(Yo||(Yo={}));var $o;!function(t){t[t.None=0]="None",t[t.LeftToRight=1]="LeftToRight",t[t.RightToLeft=2]="RightToLeft"}($o||($o={}));var Jo,Xo=function(){function t(e,i,r,n){void 0===e?void 0!==i&&void 0!==r&&void 0!==n?this.assignRGB(i,r,n):this.filled=!1:e instanceof t?(this.redColor=e.r,this.greenColor=e.g,this.blueColor=e.b,this.grayColor=e.gray,this.alpha=e.alpha,this.filled=0!==this.alpha):"number"==typeof e&&void 0===i&&void 0===r&&void 0===n?(e<0&&(e=0),e>1&&(e=1),this.redColor=e*t.maxColourChannelValue,this.greenColor=e*t.maxColourChannelValue,this.blueColor=e*t.maxColourChannelValue,this.cyanColor=e,this.magentaColor=e,this.yellowColor=e,this.blackColor=e,this.grayColor=e,this.alpha=t.maxColourChannelValue,this.filled=!0):void 0===n?this.assignRGB(e,i,r):this.assignRGB(i,r,n,e)}return t.prototype.assignRGB=function(e,i,r,n){void 0===e||void 0===i||void 0===r?this.filled=!1:(this.cyanColor=0,this.magentaColor=0,this.yellowColor=0,this.blackColor=0,this.grayColor=0,this.redColor=e,this.greenColor=i,this.blueColor=r,this.alpha=void 0===n?t.maxColourChannelValue:n,this.filled=!0,this.assignCMYK(e,i,r))},t.prototype.assignCMYK=function(e,i,r){var n=e/t.maxColourChannelValue,o=i/t.maxColourChannelValue,s=r/t.maxColourChannelValue,a=ho.min(1-n,1-o,1-s),l=1===a?0:(1-n-a)/(1-a),h=1===a?0:(1-o-a)/(1-a),u=1===a?0:(1-s-a)/(1-a);this.blackColor=a,this.cyanColor=l,this.magentaColor=h,this.yellowColor=u},Object.defineProperty(t.prototype,"r",{get:function(){return this.redColor},set:function(t){this.redColor=t,this.assignCMYK(this.redColor,this.greenColor,this.blueColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"red",{get:function(){return this.r/t.maxColourChannelValue},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){return this.blueColor},set:function(t){this.blueColor=t,this.assignCMYK(this.redColor,this.greenColor,this.blueColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"blue",{get:function(){return this.b/t.maxColourChannelValue},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"c",{get:function(){return this.cyanColor},set:function(t){this.cyanColor=t<0?0:t>1?1:t,this.assignRGB(this.cyanColor,this.magentaColor,this.yellowColor,this.blackColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"k",{get:function(){return this.blackColor},set:function(t){this.blackColor=t<0?0:t>1?1:t,this.assignRGB(this.cyanColor,this.magentaColor,this.yellowColor,this.blackColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"m",{get:function(){return this.magentaColor},set:function(t){this.magentaColor=t<0?0:t>1?1:t,this.assignRGB(this.cyanColor,this.magentaColor,this.yellowColor,this.blackColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.yellowColor},set:function(t){this.yellowColor=t<0?0:t>1?1:t,this.assignRGB(this.cyanColor,this.magentaColor,this.yellowColor,this.blackColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"g",{get:function(){return this.greenColor},set:function(t){this.greenColor=t,this.assignCMYK(this.redColor,this.greenColor,this.blueColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"green",{get:function(){return this.g/t.maxColourChannelValue},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gray",{get:function(){return(this.redColor+this.greenColor+this.blueColor)/(3*t.maxColourChannelValue)},set:function(e){this.grayColor=e<0?0:e>1?1:e,this.r=this.grayColor*t.maxColourChannelValue,this.g=this.grayColor*t.maxColourChannelValue,this.b=this.grayColor*t.maxColourChannelValue,this.assignCMYK(this.redColor,this.greenColor,this.blueColor),this.filled=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEmpty",{get:function(){return!this.filled},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"a",{get:function(){return this.alpha},set:function(t){this.alpha=t<0?0:t,this.filled=!0},enumerable:!0,configurable:!0}),t.prototype.toString=function(t,e){if(this.isEmpty)return"";var i="";switch(t){case Uo.Rgb:i=this.rgbToString(e);break;case Uo.GrayScale:i=this.grayScaleToString(e);break;case Uo.Cmyk:i=this.cmykToString(e)}return i},t.prototype.grayScaleToString=function(e){var i=this.gray,r="",n=null;return null==(n=e?t.grayStringsSroke.containsKey(i)?t.grayStringsSroke.getValue(i):null:t.grayStringsFill.containsKey(i)?t.grayStringsFill.getValue(i):null)?e&&(r=i.toString()+" G",t.grayStringsSroke.setValue(i,r)):r=n.toString(),r+to.newLine},t.prototype.rgbToString=function(e){var i=this.r,r=this.g,n=this.b,o=(i<<16)+(r<<8)+n;e&&(o+=1<<24);var s="",a=null;if(t.rgbStrings.containsKey(o)&&(a=t.rgbStrings.getValue(o)),null==a){var l=i/t.maxColourChannelValue,h=r/t.maxColourChannelValue,u=n/t.maxColourChannelValue;s=e?l.toString()+" "+h.toString()+" "+u.toString()+" RG":l.toString()+" "+h.toString()+" "+u.toString()+" rg",t.rgbStrings.setValue(o,s)}else s=a.toString();return s+to.newLine},t.prototype.cmykToString=function(t){var e=this.c,i=this.m,r=this.y,n=this.b;return e.toString()+" "+i.toString()+" "+r.toString()+" "+n.toString()+" K"+to.newLine},t.prototype.toArray=function(t){var e=new uo;switch(t){case Uo.Rgb:e.add(new ho(this.red)),e.add(new ho(this.green)),e.add(new ho(this.blue))}return e},t.rgbStrings=new Qn,t.grayStringsSroke=new Qn,t.grayStringsFill=new Qn,t.maxColourChannelValue=255,t}(),Qo=function(){return function(t,e){void 0===t?(this.x=0,this.y=0):(this.x=null!==t?t:0,this.y=null!==e?e:0)}}(),Zo=function(){return function(t,e){void 0===e?(this.height=0,this.width=0):(this.height=null!==e?e:0,this.width=null!==t?t:0)}}(),ts=function(){return function(t,e,i,r){if(typeof t==typeof t&&void 0===t)this.x=0,this.y=0,this.height=0,this.width=0;else if(t instanceof Qo&&e instanceof Zo&&void 0===i){var n=t;this.x=n.x,this.y=n.y;var o=e;this.height=o.height,this.width=o.width}else{var s=t,a=e,l=i,h=r;this.x=s,this.y=a,this.height=h,this.width=l}}}(),es=function(){function t(t,e,i,r){this.left=t,this.top=e,this.right=i,this.bottom=r}return Object.defineProperty(t.prototype,"width",{get:function(){return this.right-this.left},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.bottom-this.top},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topLeft",{get:function(){return new Qo(this.left,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return new Zo(this.width,this.height)},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.topLeft+"x"+this.size},t}(),is=function(){function t(){}return t.prototype.clone=function(){return this},t}(),rs=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ns=function(t){function e(e){var i=t.call(this)||this;return i.pdfColor=e,i}return rs(e,t),Object.defineProperty(e.prototype,"color",{get:function(){return this.pdfColor},set:function(t){this.pdfColor=t},enumerable:!0,configurable:!0}),e.prototype.monitorChanges=function(t,e,i,r,n){if(null==e)throw new Error("ArgumentNullException:streamWriter");var o=!1;return o=!0,e.setColorAndSpace(this.pdfColor,n,!1),o},e.prototype.resetChanges=function(t){t.setColorAndSpace(new Xo(0,0,0),Uo.Rgb,!1)},e}(is);!function(t){t[t.Regular=0]="Regular",t[t.Bold=1]="Bold",t[t.Italic=2]="Italic",t[t.Underline=4]="Underline",t[t.Strikeout=8]="Strikeout"}(Jo||(Jo={}));var os;!function(t){t[t.Helvetica=0]="Helvetica",t[t.Courier=1]="Courier",t[t.TimesRoman=2]="TimesRoman",t[t.Symbol=3]="Symbol",t[t.ZapfDingbats=4]="ZapfDingbats"}(os||(os={}));var ss;!function(t){t[t.Standard=0]="Standard",t[t.TrueType=1]="TrueType",t[t.TrueTypeEmbedded=2]="TrueTypeEmbedded"}(ss||(ss={}));var as;!function(t){t[t.None=0]="None",t[t.Word=1]="Word",t[t.WordOnly=2]="WordOnly",t[t.Character=3]="Character"}(as||(as={}));var ls;!function(t){t[t.None=0]="None",t[t.SuperScript=1]="SuperScript",t[t.SubScript=2]="SubScript"}(ls||(ls={}));var hs;!function(t){t[t.Unknown=0]="Unknown",t[t.StandardEncoding=1]="StandardEncoding",t[t.MacRomanEncoding=2]="MacRomanEncoding",t[t.MacExpertEncoding=3]="MacExpertEncoding",t[t.WinAnsiEncoding=4]="WinAnsiEncoding",t[t.PdfDocEncoding=5]="PdfDocEncoding",t[t.IdentityH=6]="IdentityH"}(hs||(hs={}));var us;!function(t){t[t.Apple=0]="Apple",t[t.Microsoft=4]="Microsoft",t[t.Trimmed=6]="Trimmed"}(us||(us={}));var cs;!function(t){t[t.Unknown=0]="Unknown",t[t.Symbol=1]="Symbol",t[t.Unicode=2]="Unicode",t[t.Macintosh=3]="Macintosh"}(cs||(cs={}));var ps;!function(t){t[t.AppleUnicode=0]="AppleUnicode",t[t.Macintosh=1]="Macintosh",t[t.Iso=2]="Iso",t[t.Microsoft=3]="Microsoft"}(ps||(ps={}));var ds;!function(t){t[t.Undefined=0]="Undefined",t[t.Unicode=1]="Unicode"}(ds||(ds={}));var fs;!function(t){t[t.Roman=0]="Roman",t[t.Japanese=1]="Japanese",t[t.Chinese=2]="Chinese"}(fs||(fs={}));var gs;!function(t){t[t.FixedPitch=1]="FixedPitch",t[t.Serif=2]="Serif",t[t.Symbolic=4]="Symbolic",t[t.Script=8]="Script",t[t.Nonsymbolic=32]="Nonsymbolic",t[t.Italic=64]="Italic",t[t.ForceBold=262144]="ForceBold"}(gs||(gs={}));var ms;!function(t){t[t.Arg1And2AreWords=1]="Arg1And2AreWords",t[t.ArgsAreXyValues=2]="ArgsAreXyValues",t[t.RoundXyToGrid=4]="RoundXyToGrid",t[t.WeHaveScale=8]="WeHaveScale",t[t.Reserved=16]="Reserved",t[t.MoreComponents=32]="MoreComponents",t[t.WeHaveAnXyScale=64]="WeHaveAnXyScale",t[t.WeHaveTwoByTwo=128]="WeHaveTwoByTwo",t[t.WeHaveInstructions=256]="WeHaveInstructions",t[t.UseMyMetrics=512]="UseMyMetrics"}(ms||(ms={}));var ys,bs=function(){function t(t,e){this.scalingFactor=100,this.wordWrapType=as.Word,this.internalLineLimit=!0,this.wordWrapType=as.Word,void 0!==t&&"string"!=typeof t&&(this.textAlignment=t),void 0!==e&&(this.verticalAlignment=e)}return Object.defineProperty(t.prototype,"alignment",{get:function(){return this.textAlignment},set:function(t){this.textAlignment=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textDirection",{get:function(){return this.direction},set:function(t){this.direction=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineAlignment",{get:function(){return void 0===this.verticalAlignment||null==this.verticalAlignment?Fo.Top:this.verticalAlignment},set:function(t){this.verticalAlignment=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rightToLeft",{get:function(){return void 0!==this.isRightToLeft&&null!=this.isRightToLeft&&this.isRightToLeft},set:function(t){this.isRightToLeft=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"characterSpacing",{get:function(){return void 0===this.internalCharacterSpacing||null==this.internalCharacterSpacing?0:this.internalCharacterSpacing},set:function(t){this.internalCharacterSpacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wordSpacing",{get:function(){return void 0===this.internalWordSpacing||null==this.internalWordSpacing?0:this.internalWordSpacing},set:function(t){this.internalWordSpacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineSpacing",{get:function(){return void 0===this.leading||null==this.leading?0:this.leading},set:function(t){this.leading=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clipPath",{get:function(){return void 0!==this.clip&&null!=this.clip&&this.clip},set:function(t){this.clip=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"subSuperScript",{get:function(){return void 0===this.pdfSubSuperScript||null==this.pdfSubSuperScript?ls.None:this.pdfSubSuperScript},set:function(t){this.pdfSubSuperScript=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paragraphIndent",{get:function(){return void 0===this.internalParagraphIndent||null==this.internalParagraphIndent?0:this.internalParagraphIndent},set:function(t){this.internalParagraphIndent=t,this.firstLineIndent=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineLimit",{get:function(){return this.internalLineLimit},set:function(t){this.internalLineLimit=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"measureTrailingSpaces",{get:function(){return void 0!==this.trailingSpaces&&null!=this.trailingSpaces&&this.trailingSpaces},set:function(t){this.trailingSpaces=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"noClip",{get:function(){return void 0!==this.isNoClip&&null!=this.isNoClip&&this.isNoClip},set:function(t){this.isNoClip=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wordWrap",{get:function(){return this.wordWrapType},set:function(t){this.wordWrapType=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"horizontalScalingFactor",{get:function(){return this.scalingFactor},set:function(t){if(t<=0)throw new Error("ArgumentOutOfRangeException:The scaling factor cant be less of equal to zero, ScalingFactor");this.scalingFactor=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstLineIndent",{get:function(){return void 0===this.initialLineIndent||null==this.initialLineIndent?0:this.initialLineIndent},set:function(t){this.initialLineIndent=t},enumerable:!0,configurable:!0}),t.prototype.clone=function(){return this},t}(),vs=function(){function t(t){if(this.currentPosition=0,null==t)throw new Error("ArgumentNullException:text");this.text=t}return Object.defineProperty(t.prototype,"length",{get:function(){return this.text.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"end",{get:function(){return this.currentPosition===this.text.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.currentPosition},set:function(t){this.currentPosition=t},enumerable:!0,configurable:!0}),t.getCharsCount=function(t,e){if("string"==typeof e){if(null==t)throw new Error("ArgumentNullException:wholeText");for(var i=0,r=0;-1!==(r=t.indexOf(e,r));)i++,r++;return i}if(null==t)throw new Error("ArgumentNullException:text");if(null==e)throw new Error("ArgumentNullException:symbols");for(var n=0,o=0,s=t.length;o<s;o++){var a=t[o];this.contains(e,a)&&n++}return n},t.prototype.readLine=function(){for(var t=this.currentPosition;t<this.length;){var e=this.text[t];switch(e){case"\r":case"\n":var i=this.text.substr(this.currentPosition,t-this.currentPosition);return this.currentPosition=t+1,"\r"===e&&this.currentPosition<this.length&&"\n"===this.text[this.currentPosition]&&this.currentPosition++,i}t++}if(t>this.currentPosition){var r=this.text.substr(this.currentPosition,t-this.currentPosition);return this.currentPosition=t,r}return null},t.prototype.peekLine=function(){var t=this.currentPosition,e=this.readLine();return this.currentPosition=t,e},t.prototype.readWord=function(){for(var t=this.currentPosition;t<this.length;){var e=this.text[t];switch(e){case"\r":case"\n":var i=this.text.substr(this.currentPosition,t-this.currentPosition);return this.currentPosition=t+1,"\r"===e&&this.currentPosition<this.length&&"\n"===this.text[this.currentPosition]&&this.currentPosition++,i;case" ":case"\t":t===this.currentPosition&&t++;var r=this.text.substr(this.currentPosition,t-this.currentPosition);return this.currentPosition=t,r}t++}if(t>this.currentPosition){var n=this.text.substr(this.currentPosition,t-this.currentPosition);return this.currentPosition=t,n}return null},t.prototype.peekWord=function(){var t=this.currentPosition,e=this.readWord();return this.currentPosition=t,e},t.prototype.read=function(t){if(void 0===t){var e="0";return this.end||(e=this.text[this.currentPosition],this.currentPosition++),e}for(var i=0,r="";!this.end&&i<t;){r+=e=this.read(),i++}return r},t.prototype.peek=function(){var t="0";return this.end||(t=this.text[this.currentPosition]),t},t.prototype.close=function(){this.text=null},t.prototype.readToEnd=function(){var t;return t=0===this.currentPosition?this.text:this.text.substr(this.currentPosition,this.length-this.currentPosition),this.currentPosition=this.length,t},t.contains=function(t,e){for(var i=!1,r=0;r<t.length;r++)if(t[r]===e){i=!0;break}return i},t.whiteSpace=" ",t.tab="\t",t.spaces=[t.whiteSpace,t.tab],t.whiteSpacePattern="^[ \t]+$",t}(),ws=function(){function t(){this.isOverloadWithPosition=!1}return t.prototype.layout=function(t,e,i,r,n,o,s){if(r instanceof ts){this.initialize(t,e,i,r,n),this.isOverloadWithPosition=o,this.clientSize=s;var a=this.doLayout();return this.clear(),a}this.initialize(t,e,i,r),this.isOverloadWithPosition=n,this.clientSize=o;a=this.doLayout();return this.clear(),a},t.prototype.initialize=function(t,e,i,r,n){if("number"==typeof n){if(null==t)throw new Error("ArgumentNullException:text");if(null==e)throw new Error("ArgumentNullException:font");this.text=t,this.font=e,this.format=i,this.size=new Zo(r.width,r.height),this.rectangle=r,this.pageHeight=n,this.reader=new vs(t)}else this.initialize(t,e,i,new ts(new Qo(0,0),r),0)},t.prototype.clear=function(){this.font=null,this.format=null,this.reader.close(),this.reader=null,this.text=null},t.prototype.doLayout=function(){for(var t=new Ss,e=new Ss,i=[],r=this.reader.peekLine(),n=this.getLineIndent(!0);null!=r;){if(null!==(e=this.layoutLine(r,n))||void 0!==e){var o=0,s=this.copyToResult(t,e,i,o),a=s.success;if(o=s.numInserted,!a){this.reader.read(o);break}}this.reader.readLine(),r=this.reader.peekLine(),n=this.getLineIndent(!1)}return this.finalizeResult(t,i),t},t.prototype.getLineIndent=function(t){var e=0;return null!=this.format&&(e=t?this.format.firstLineIndent:this.format.paragraphIndent,e=this.size.width>0?Math.min(this.size.width,e):e),e},t.prototype.getLineHeight=function(){var t=this.font.height;return null!=this.format&&0!==this.format.lineSpacing&&(t=this.format.lineSpacing+this.font.height),t},t.prototype.getLineWidth=function(t){return this.font.getLineWidth(t,this.format)},t.prototype.layoutLine=function(t,e){var i=new Ss;i.layoutLineHeight=this.getLineHeight();var r=[],n=this.size.width,o=this.getLineWidth(t)+e,s=ys.FirstParagraphLine,a=!0;if(n<=0||Math.round(o)<=Math.round(n))this.addToLineResult(i,r,t,o,ys.NewLineBreak|s);else{var l="",h="";o=e;var u=e,c=new vs(t),p=c.peekWord();for(p.length!==c.length&&" "===p&&(h+=p,l+=p,c.position+=1,p=c.peekWord());null!=p;){h+=p;var d=this.getLineWidth(h.toString())+u;if(" "===h.toString()&&(h="",d=0),d>n){if(this.getWrapType()===as.None)break;if(h.length===p.length){if(this.getWrapType()===as.WordOnly){i.textRemainder=t.substring(c.position);break}if(1===h.length){l+=p;break}a=!1,h="",p=c.peek().toString();continue}if(this.getLineWidth(p.toString())>n?this.format.wordWrap=as.Character:void 0!==this.format&&null!==this.format&&(this.format.wordWrap=as.Word),this.getWrapType()===as.Character&&a)a=!1,h="",h+=l.toString(),p=c.peek().toString();else{" "!==(f=l.toString())&&this.addToLineResult(i,r,f,o,ys.LayoutBreak|s),this.isOverloadWithPosition&&(n=this.clientSize.width),h="",l="",o=0,u=0,d=0,s=ys.None,p=a?p:c.peekWord(),a=!0}}else l+=p,o=d,a?(c.readWord(),p=c.peekWord()):(c.read(),p=c.peek().toString())}if(l.length>0){var f=l.toString();this.addToLineResult(i,r,f,o,ys.NewLineBreak|ys.LastParagraphLine)}c.close()}i.layoutLines=[];for(var g=0;g<r.length;g++)i.layoutLines.push(r[g]);return r=[],i},t.prototype.addToLineResult=function(t,e,i,r,n){var o=new Ps;o.text=i,o.width=r,o.lineType=n,e.push(o);var s=t.actualSize;s.height+=this.getLineHeight(),s.width=Math.max(s.width,r),t.size=s},t.prototype.copyToResult=function(t,e,i,r){var n=!0,o=null!=this.format&&!this.format.lineLimit,s=t.actualSize.height,a=this.size.height;if(this.pageHeight>0&&a+this.rectangle.y>this.pageHeight&&(a=this.rectangle.y-this.pageHeight,a=Math.max(a,-a)),r=0,null!=e.lines)for(var l=0,h=e.lines.length;l<h;l++){var u=s+e.lineHeight;if(!(u<=a||a<=0||o)){n=!1;break}var c=e.lines[l];r+=c.text.length,c=this.trimLine(c,0===i.length),i.push(c);var p=t.actualSize;p.width=Math.max(p.width,c.width),t.size=p,s=u}if(s!=t.size.height){var d=t.actualSize;d.height=s,t.size=d}return{success:n,numInserted:r}},t.prototype.finalizeResult=function(t,e){t.layoutLines=[];for(var i=0;i<e.length;i++)t.layoutLines.push(e[i]);t.layoutLineHeight=this.getLineHeight(),this.reader.end||(t.textRemainder=this.reader.readToEnd()),e=[]},t.prototype.trimLine=function(t,e){var i=t.text,r=t.width;t.lineType,ys.FirstParagraphLine,null==this.format||this.format.rightToLeft;return(i=i.trim()).length!==t.text.length&&(r=this.getLineWidth(i),(t.lineType&ys.FirstParagraphLine)>0&&(r+=this.getLineIndent(e))),t.text=i,t.width=r,t},t.prototype.getWrapType=function(){return null!=this.format?this.format.wordWrap:as.Word},t}(),Ss=function(){function t(){}return Object.defineProperty(t.prototype,"remainder",{get:function(){return this.textRemainder},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"actualSize",{get:function(){return void 0===this.size&&(this.size=new Zo(0,0)),this.size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lines",{get:function(){return this.layoutLines},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineHeight",{get:function(){return this.layoutLineHeight},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"empty",{get:function(){return null==this.layoutLines||0===this.layoutLines.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineCount",{get:function(){return this.empty?0:this.layoutLines.length},enumerable:!0,configurable:!0}),t}(),Ps=function(){function t(){}return Object.defineProperty(t.prototype,"lineType",{get:function(){return this.type},set:function(t){this.type=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return this.content},set:function(t){this.content=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.lineWidth},set:function(t){this.lineWidth=t},enumerable:!0,configurable:!0}),t}();!function(t){t[t.None=0]="None",t[t.NewLineBreak=1]="NewLineBreak",t[t.LayoutBreak=2]="LayoutBreak",t[t.FirstParagraphLine=4]="FirstParagraphLine",t[t.LastParagraphLine=8]="LastParagraphLine"}(ys||(ys={}));var Cs,xs=function(){function t(t,e){this.fontStyle=Jo.Regular,"number"==typeof t&&void 0===e?this.fontSize=t:(this.fontSize=t,this.setStyle(e))}return Object.defineProperty(t.prototype,"name",{get:function(){return this.metrics.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.fontSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.metrics.getHeight(null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this.fontStyle},set:function(t){this.fontStyle=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bold",{get:function(){return(this.style&Jo.Bold)>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"italic",{get:function(){return(this.style&Jo.Italic)>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"strikeout",{get:function(){return(this.style&Jo.Strikeout)>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"underline",{get:function(){return(this.style&Jo.Underline)>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"metrics",{get:function(){return this.fontMetrics},set:function(t){this.fontMetrics=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.pdfFontInternals},enumerable:!0,configurable:!0}),t.prototype.measureString=function(t,e,i,r,n){if("string"==typeof t&&void 0===e)return this.measureString(t,null);if("string"==typeof t&&(e instanceof bs||null==e)&&void 0===i&&void 0===r){var o=e;return this.measureString(t,o,0,0)}if("string"==typeof t&&(e instanceof bs||null==e)&&"number"==typeof i&&"number"==typeof r){o=e;return this.measureString(t,0,o,i,r)}if("string"==typeof t&&"number"==typeof e&&(i instanceof bs||null==i)&&"number"==typeof r&&"number"==typeof n){var s=new Zo(e,0),a=i;return this.measureString(t,s,a,r,n)}if(null==t)throw Error('ArgumentNullException("text")');o=e,a=i;var l=(new ws).layout(t,this,a,o,!1,new Zo(0,0));return r=t.length,n=l.empty?0:l.lines.length,l.actualSize},t.prototype.equalsTo=function(t){return this.equalsToFont(t)},t.prototype.getInternals=function(){return this.pdfFontInternals},t.prototype.setInternals=function(t){if(null==t)throw new Error("ArgumentNullException:internals");this.pdfFontInternals=t},t.prototype.setStyle=function(t){this.fontStyle=t},t.prototype.applyFormatSettings=function(t,e,i){var r=i;if(null!=e&&i>0&&(0!==e.characterSpacing&&(r+=(t.length-1)*e.characterSpacing),0!==e.wordSpacing)){var n=vs.spaces;r+=vs.getCharsCount(t,n)*e.wordSpacing}return r},t.charSizeMultiplier=.001,t.syncObject=new Object,t}(),Os=function(){function t(t){this.streamWriter=t}return Object.defineProperty(t.prototype,"document",{get:function(){return this.pdfDocument},set:function(t){this.pdfDocument=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.streamWriter.buffer.size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this.streamWriter.buffer.size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stream",{get:function(){return this.streamWriter},enumerable:!0,configurable:!0}),t.prototype.write=function(t){var e=t;this.streamWriter.write(e)},t}();!function(t){t[t.None=0]="None",t[t.Registered=1]="Registered"}(Cs||(Cs={}));var Bs,Ls=function(){function t(){this.objectCollections=[],this.mainObjectCollection=new Qn,this.primitiveObjectCollection=new Qn}return Object.defineProperty(t.prototype,"count",{get:function(){return this.objectCollections.length},enumerable:!0,configurable:!0}),t.prototype.items=function(t){return this.objectCollections[t]},Object.defineProperty(t.prototype,"outIsNew",{get:function(){return this.isNew},enumerable:!0,configurable:!0}),t.prototype.add=function(t){var e=new Ts(t);this.objectCollections.push(e),this.primitiveObjectCollection.containsKey(t)||this.primitiveObjectCollection.setValue(t,this.objectCollections.length-1),t.position=this.index=this.objectCollections.length-1,t.status=Cs.Registered},t.prototype.lookFor=function(t){var e=-1;if(-1!==t.position)return t.position;if(this.primitiveObjectCollection.containsKey(t)&&this.count===this.primitiveObjectCollection.size())e=this.primitiveObjectCollection.getValue(t);else for(var i=this.count-1;i>=0;i--){if(this.objectCollections[i].object===t){e=i;break}}return e},t.prototype.getReference=function(t,e){this.index=this.lookFor(t);this.isNew=!1;return{reference:this.objectCollections[this.index].reference,wasNew:e}},t.prototype.trySetReference=function(t,e,i){this.index=this.lookFor(t);return this.objectCollections[this.index].setReference(e),!0},t.prototype.destroy=function(){for(var t=0,e=this.objectCollections;t<e.length;t++){var i=e[t];void 0!==i&&(i.pdfObject.position=-1,i.pdfObject.isSaving=void 0,i.pdfObject.objectCollectionIndex=void 0,i.pdfObject.position=void 0)}this.objectCollections=[],this.mainObjectCollection=new Qn,this.primitiveObjectCollection=new Qn},t}(),Ts=function(){function t(t,e){this.pdfObject=t,this.pdfReference=e}return Object.defineProperty(t.prototype,"object",{get:function(){return this.pdfObject},set:function(t){this.pdfObject=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"reference",{get:function(){return this.pdfReference},enumerable:!0,configurable:!0}),t.prototype.setReference=function(t){this.pdfReference=t},t}(),Ms=function(){function t(t){this.isStreamCopied=!1,t instanceof vl&&(this.document=t)}return Object.defineProperty(t.prototype,"pdfObjects",{get:function(){return this.objects},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"crossTable",{get:function(){return this.pdfCrossTable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentSavingObj",{get:function(){return this.currentSavingObject},set:function(t){this.currentSavingObject=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"catalog",{get:function(){return this.pdfCatalog},set:function(t){this.pdfCatalog=t},enumerable:!0,configurable:!0}),t.prototype.setMainObjectCollection=function(t){this.objects=t},t.prototype.setCrossTable=function(t){this.pdfCrossTable=t},t.prototype.setCatalog=function(t){this.pdfCatalog=t},t.prototype.save=function(t){var e=this,i=new mo(!0),r=new yo(i);if(void 0===t){var n=new mo(!0),o=new yo(n);return new Promise(function(t,i){var r={};r.blobData=new Blob([e.document.docSave(o,!0)],{type:"application/pdf"}),t(r)})}this.document.docSave(r,t,!0)},t.prototype.clone=function(){return this.document},t}();!function(t){t[t.Free=0]="Free",t[t.Normal=1]="Normal",t[t.Packed=2]="Packed"}(Bs||(Bs={}));var Ds,ks=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Es=function(t){function e(){var e=t.call(this)||this;return e.sections=null,e.tempDictionaryProperties=new eo,e.items.setValue((new eo).type,new Zn("Catalog")),e}return ks(e,t),Object.defineProperty(e.prototype,"pages",{get:function(){return this.sections},set:function(t){t.element;this.sections=t,this.items.setValue(this.tempDictionaryProperties.pages,new Io(t))},enumerable:!0,configurable:!0}),e}(io),js=function(){function t(){this.objects=new Qn,this.maxGenNumIndex=0,this.objectCount=0,this.dictionaryProperties=new eo}return Object.defineProperty(t.prototype,"isMerging",{get:function(){return this.merging},set:function(t){this.merging=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"trailer",{get:function(){return null==this.internalTrailer&&(this.internalTrailer=new To),this.internalTrailer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"document",{get:function(){return this.pdfDocument},set:function(t){this.pdfDocument=t,this.items=this.pdfDocument.pdfObjects},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pdfObjects",{get:function(){return this.items},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollection",{get:function(){return this.pdfDocument.pdfObjects},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.objectCount},set:function(t){this.objectCount=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextObjNumber",{get:function(){return this.count=this.count+1,this.count},enumerable:!0,configurable:!0}),t.prototype.save=function(t,e){this.saveHead(t),this.mappedReferences=null,this.objects.clear(),this.markTrailerReferences(),this.saveObjects(t);var i=this.count,r=t.position;this.registerObject(0,new jo(0,-1),!0);t.write(to.xref),t.write(to.newLine),this.saveSections(t),this.saveTrailer(t,this.count,0),this.saveTheEndess(t,r),this.count=i;for(var n=0;n<this.objectCollection.count;++n){this.objectCollection.items(n).object.isSaving=!1}if(void 0===e)return t.stream.buffer;t.stream.save(e)},t.prototype.saveTheEndess=function(t,e){t.write(to.newLine+to.startxref+to.newLine),t.write(e.toString()+to.newLine),t.write(to.eof+to.newLine)},t.prototype.saveTrailer=function(t,e,i){t.write(to.trailer+to.newLine);var r=this.trailer;r.items.setValue(this.dictionaryProperties.size,new ho(this.objectCount+1)),(r=new io(r)).setEncrypt(!1),r.save(t)},t.prototype.saveSections=function(t){var e=0,i=0;do{i=this.prepareSubsection(e),this.saveSubsection(t,e,i),e+=i}while(0!==i)},t.prototype.saveSubsection=function(t,e,i){if(!(i<=0||e>=this.count)){t.write(e+" "+(i+1)+to.newLine);for(var r=e;r<=e+i;++r){var n=this.objects.getValue(r),o="";o=n.type===Bs.Free?this.getItem(n.offset,65535,!0):this.getItem(n.offset,n.generation,!1),t.write(o)}}},t.prototype.getItem=function(t,e,i){var r="",n=10-t.toString().length;e<=0&&(e=0);for(var o=5-e.toString().length<=0?0:5-e.toString().length,s=0;s<n;s++)r+="0";r=r+t.toString()+" ";for(s=0;s<o;s++)r+="0";return r=r+e.toString()+" ",r=r+(i?to.f:to.n)+to.newLine},t.prototype.prepareSubsection=function(t){for(var e,i=0,r=this.count,n=0;n<this.document.pdfObjects.count;n++)this.document.pdfObjects.items(n).reference.toString().split(" ");if(t>=r)return i;for(e=t;e<r;++e)break;for(t=e;e<r;++e)++i;return i},t.prototype.markTrailerReferences=function(){this.trailer.items.keys(),this.trailer.items.values()},t.prototype.saveHead=function(t){var e=this.generateFileVersion(t.document);t.write("%PDF-"+e),t.write(to.newLine)},t.prototype.generateFileVersion=function(t){return"1."+4..toString()},t.prototype.getReference=function(t,e){if(void 0===e){return this.getReference(t,!1)}return this.getSubReference(t,e)},t.prototype.getSubReference=function(t,e){var i,r=!1,n=null;if(this.items.count>0&&t.objectCollectionIndex>0&&this.items.count>t.objectCollectionIndex-1){var o=this.document.pdfObjects.getReference(t,i);n=o.reference,i=o.wasNew}if(i=null==n&&t.status!==Cs.Registered,null==n){var s=this.nextObjNumber;n=new jo(s,0);if(i){this.document.pdfObjects.add(t),this.document.pdfObjects.trySetReference(t,n,void 0);var a=this.document.pdfObjects.count-1,l=this.document.pdfObjects.objectCollections[a].reference.objNumber,h=this.document.pdfObjects.objectCollections[this.document.pdfObjects.count-1];this.document.pdfObjects.mainObjectCollection.setValue(l,h),t.position=-1}else this.document.pdfObjects.trySetReference(t,n,void 0);t.objectCollectionIndex=n.objNumber,t.status=Cs.None,r=!0}return r||this.bForceNew,n},t.prototype.saveObjects=function(t){for(var e=this.objectCollection,i=0;i<e.count;++i){var r=e.items(i).object;r.isSaving=!0,this.saveIndirectObject(r,t)}},t.prototype.saveIndirectObject=function(t,e){var i=this.getReference(t);t instanceof Es&&this.trailer.items.setValue(this.dictionaryProperties.root,i),this.pdfDocument.currentSavingObj=i;t.getArchive(),this.registerObject(e.position,i),this.doSaveObject(t,i,e)},t.prototype.doSaveObject=function(t,e,i){i.length;i.write(e.objNumber.toString()),i.write(to.whiteSpace),i.write(e.genNumber.toString()),i.write(to.whiteSpace),i.write(to.obj),i.write(to.newLine),t.save(i);i.stream;i.write(to.endObj),i.write(to.newLine)},t.prototype.registerObject=function(t,e,i){"boolean"==typeof i?(this.objects.setValue(e.objNumber,new Is(t,e,i)),this.maxGenNumIndex=Math.max(this.maxGenNumIndex,e.genNumber)):void 0===i&&(this.objects.setValue(e.objNumber,new Is(t,e)),this.maxGenNumIndex=Math.max(this.maxGenNumIndex,e.genNumber))},t.dereference=function(t){return null!=t&&(t=t.object),t},t}(),Is=function(){function t(t,e,i){var r=t;this.offsetNumber=r;var n=e;this.generation=n.genNumber,this.object=n.objNumber,this.type=void 0===i?Bs.Normal:Bs.Free}return Object.defineProperty(t.prototype,"objectNumber",{get:function(){return this.object},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"offset",{get:function(){return this.offsetNumber},enumerable:!0,configurable:!0}),t}(),Rs=function(){function t(){}return t.letter=new Zo(612,792),t.note=new Zo(540,720),t.legal=new Zo(612,1008),t.a0=new Zo(2380,3368),t.a1=new Zo(1684,2380),t.a2=new Zo(1190,1684),t.a3=new Zo(842,1190),t.a4=new Zo(595,842),t.a5=new Zo(421,595),t.a6=new Zo(297,421),t.a7=new Zo(210,297),t.a8=new Zo(148,210),t.a9=new Zo(105,148),t.a10=new Zo(74,105),t.b0=new Zo(2836,4008),t.b1=new Zo(2004,2836),t.b2=new Zo(1418,2004),t.b3=new Zo(1002,1418),t.b4=new Zo(709,1002),t.b5=new Zo(501,709),t.archE=new Zo(2592,3456),t.archD=new Zo(1728,2592),t.archC=new Zo(1296,1728),t.archB=new Zo(864,1296),t.archA=new Zo(648,864),t.flsa=new Zo(612,936),t.halfLetter=new Zo(396,612),t.letter11x17=new Zo(792,1224),t.ledger=new Zo(1224,792),t}();!function(t){t[t.Portrait=0]="Portrait",t[t.Landscape=1]="Landscape"}(Ds||(Ds={}));var As;!function(t){t[t.RotateAngle0=0]="RotateAngle0",t[t.RotateAngle90=1]="RotateAngle90",t[t.RotateAngle180=2]="RotateAngle180",t[t.RotateAngle270=3]="RotateAngle270"}(As||(As={}));var Ns;!function(t){t[t.None=0]="None",t[t.Numeric=1]="Numeric",t[t.LowerLatin=2]="LowerLatin",t[t.LowerRoman=3]="LowerRoman",t[t.UpperLatin=4]="UpperLatin",t[t.UpperRoman=5]="UpperRoman"}(Ns||(Ns={}));var Fs;!function(t){t[t.None=0]="None",t[t.Bottom=1]="Bottom",t[t.Top=2]="Top",t[t.Left=3]="Left",t[t.Right=4]="Right",t[t.Fill=5]="Fill"}(Fs||(Fs={}));var Vs;!function(t){t[t.None=0]="None",t[t.TopLeft=1]="TopLeft",t[t.TopCenter=2]="TopCenter",t[t.TopRight=3]="TopRight",t[t.MiddleLeft=4]="MiddleLeft",t[t.MiddleCenter=5]="MiddleCenter",t[t.MiddleRight=6]="MiddleRight",t[t.BottomLeft=7]="BottomLeft",t[t.BottomCenter=8]="BottomCenter",t[t.BottomRight=9]="BottomRight"}(Vs||(Vs={}));var zs;!function(t){t[t.None=0]="None",t[t.Top=1]="Top",t[t.Bottom=2]="Bottom",t[t.Left=3]="Left",t[t.Right=4]="Right"}(zs||(zs={}));var Gs,_s=function(){function t(){this.pdfMargin=40,this.setMargins(this.pdfMargin)}return Object.defineProperty(t.prototype,"left",{get:function(){return this.leftMargin},set:function(t){this.leftMargin=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.topMargin},set:function(t){this.topMargin=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.rightMargin},set:function(t){this.rightMargin=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.bottomMargin},set:function(t){this.bottomMargin=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"all",{set:function(t){this.setMargins(t)},enumerable:!0,configurable:!0}),t.prototype.setMargins=function(t,e,i,r){void 0===e?this.leftMargin=this.topMargin=this.rightMargin=this.bottomMargin=t:void 0===i?(this.leftMargin=this.rightMargin=t,this.bottomMargin=this.topMargin=e):(this.leftMargin=t,this.topMargin=e,this.rightMargin=i,this.bottomMargin=r)},t.prototype.clone=function(){return this},t}(),Hs=function(){function t(t){this.pageMargins=new _s,this.pageSize=Rs.a4,this.rotateAngle=As.RotateAngle0,this.pageOrientation=Ds.Portrait,this.pageOrigin=new Qo(0,0),this.isRotation=!1,"number"==typeof t&&this.pageMargins.setMargins(t)}return Object.defineProperty(t.prototype,"size",{get:function(){return this.pageSize},set:function(t){this.setSize(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"orientation",{get:function(){return this.pageOrientation},set:function(t){this.pageOrientation!==t&&(this.pageOrientation=t,this.updateSize(t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"margins",{get:function(){return this.pageMargins},set:function(t){this.pageMargins=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.pageSize.width},set:function(t){this.pageSize.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.pageSize.height},set:function(t){this.pageSize.height=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"origin",{get:function(){return this.pageOrigin},set:function(t){this.pageOrigin=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rotate",{get:function(){return this.rotateAngle},set:function(t){this.rotateAngle=t,this.isRotation=!0},enumerable:!0,configurable:!0}),t.prototype.updateSize=function(t){var e=Math.min(this.pageSize.width,this.pageSize.height),i=Math.max(this.pageSize.width,this.pageSize.height);switch(t){case Ds.Portrait:this.pageSize=new Zo(e,i);break;case Ds.Landscape:this.pageSize=new Zo(i,e)}},t.prototype.clone=function(){return this.pageMargins=this.pageMargins.clone(),this},t.prototype.getActualSize=function(){var t=this.width-(this.margins.left+this.margins.right),e=this.height-(this.margins.top+this.margins.bottom);return new Zo(t,e)},t.prototype.setSize=function(t){var e=Math.min(t.width,t.height),i=Math.max(t.width,t.height);this.orientation===Ds.Portrait?this.pageSize=new Zo(e,i):this.pageSize=new Zo(i,e)},t}(),Ws=function(){function t(t){if(null==t)throw new Error("ArgumentNullException:stream");this.stream=t}return t.prototype.clear=function(){this.stream.clearStream()},t.prototype.setGraphicsState=function(t){t instanceof Zn?(this.stream.write(t.toString()),this.stream.write(to.whiteSpace),this.writeOperator(to.setGraphicsState)):(this.stream.write(to.slash),this.stream.write(t),this.stream.write(to.whiteSpace),this.writeOperator(to.setGraphicsState))},t.prototype.executeObject=function(t){this.stream.write(t.toString()),this.stream.write(to.whiteSpace),this.writeOperator(to.paintXObject),this.stream.write(to.newLine)},t.prototype.closePath=function(){this.writeOperator(to.closePath)},t.prototype.clipPath=function(t){this.stream.write(to.clipPath),t&&this.stream.write(to.evenOdd),this.stream.write(to.whiteSpace),this.stream.write(to.endPath),this.stream.write(to.newLine)},t.prototype.closeFillStrokePath=function(t){this.stream.write(to.closeFillStrokePath),t?(this.stream.write(to.evenOdd),this.stream.write(to.newLine)):this.stream.write(to.newLine)},t.prototype.fillStrokePath=function(t){this.stream.write(to.fillStroke),t?(this.stream.write(to.evenOdd),this.stream.write(to.newLine)):this.stream.write(to.newLine)},t.prototype.fillPath=function(t){this.stream.write(to.fill),t?(this.stream.write(to.evenOdd),this.stream.write(to.newLine)):this.stream.write(to.newLine)},t.prototype.endPath=function(){this.writeOperator(to.n)},t.prototype.closeFillPath=function(t){this.writeOperator(to.closePath),this.stream.write(to.fill),t?(this.stream.write(to.evenOdd),this.stream.write(to.newLine)):this.stream.write(to.newLine)},t.prototype.closeStrokePath=function(){this.writeOperator(to.closeStrokePath)},t.prototype.setTextScaling=function(t){this.stream.write(ho.floatToString(t)),this.stream.write(to.whiteSpace),this.writeOperator(to.setTextScaling)},t.prototype.strokePath=function(){this.writeOperator(to.stroke)},t.prototype.restoreGraphicsState=function(){this.writeOperator(to.restoreState)},t.prototype.saveGraphicsState=function(){this.writeOperator(to.saveState)},t.prototype.startNextLine=function(t,e){void 0===t?this.writeOperator(to.goToNextLine):t instanceof Qo?(this.writePoint(t),this.writeOperator(to.setCoords)):(this.writePoint(t,e),this.writeOperator(to.setCoords))},t.prototype.showText=function(t){this.checkTextParam(t),this.writeText(t),this.writeOperator(to.setText)},t.prototype.setLeading=function(t){this.stream.write(ho.floatToString(t)),this.stream.write(to.whiteSpace),this.writeOperator(to.setTextLeading)},t.prototype.beginPath=function(t,e){this.writePoint(t,e),this.writeOperator(to.beginPath)},t.prototype.beginText=function(){this.writeOperator(to.beginText)},t.prototype.endText=function(){this.writeOperator(to.endText)},t.prototype.appendRectangle=function(t,e,i,r){t instanceof ts?this.appendRectangle(t.x,t.y,t.width,t.height):(this.writePoint(t,e),this.writePoint(i,r),this.writeOperator(to.appendRectangle))},t.prototype.appendLineSegment=function(t,e){t instanceof Qo?this.appendLineSegment(t.x,t.y):(this.writePoint(t,e),this.writeOperator(to.appendLineSegment))},t.prototype.setTextRenderingMode=function(t){this.stream.write(t.toString()),this.stream.write(to.whiteSpace),this.writeOperator(to.setRenderingMode)},t.prototype.setCharacterSpacing=function(t){this.stream.write(ho.floatToString(t)),this.stream.write(to.whiteSpace),this.stream.write(to.setCharacterSpace),this.stream.write(to.newLine)},t.prototype.setWordSpacing=function(t){this.stream.write(ho.floatToString(t)),this.stream.write(to.whiteSpace),this.writeOperator(to.setWordSpace)},t.prototype.showNextLineText=function(t,e){t instanceof Eo?(this.checkTextParam(t),this.writeText(t),this.writeOperator(to.setTextOnNewLine)):(this.checkTextParam(t),this.writeText(t,e),this.writeOperator(to.setTextOnNewLine))},t.prototype.setColorSpace=function(t,e){if(t instanceof Zn&&"boolean"==typeof e){var i=t,r=(n=e)?to.selectcolorspaceforstroking:to.selectcolorspacefornonstroking;this.stream.write(i.toString()),this.stream.write(to.whiteSpace),this.stream.write(r),this.stream.write(to.newLine)}else{i=t;var n=e;this.setColorSpace(new Zn(i),n)}},t.prototype.modifyCtm=function(t){if(null==t)throw new Error("ArgumentNullException:matrix");this.stream.write(t.toString()),this.stream.write(to.whiteSpace),this.writeOperator(to.modifyCtm)},t.prototype.setFont=function(t,e,i){if("string"==typeof e)this.setFont(t,new Zn(e),i);else{if(null==t)throw new Error("ArgumentNullException:font");this.stream.write(e.toString()),this.stream.write(to.whiteSpace),this.stream.write(ho.floatToString(i)),this.stream.write(to.whiteSpace),this.writeOperator(to.setFont)}},t.prototype.writeOperator=function(t){this.stream.write(t),this.stream.write(to.newLine)},t.prototype.checkTextParam=function(t){if(null==t)throw new Error("ArgumentNullException:text");if("string"==typeof t&&""===t)throw new Error("ArgumentException:The text can not be an empty string, text")},t.prototype.writeText=function(t,e){if(t instanceof Eo&&void 0===e)this.stream.write(t.pdfEncode());else{var i=void 0,r=void 0;e?(i=Eo.hexStringMark[0],r=Eo.hexStringMark[1]):(i=Eo.stringMark[0],r=Eo.stringMark[1]),this.stream.write(i),this.stream.write(t),this.stream.write(r)}},t.prototype.writePoint=function(t,e){if(t instanceof Qo&&void 0===e)this.writePoint(t.x,t.y);else{var i=t;this.stream.write(ho.floatToString(i)),this.stream.write(to.whiteSpace),e=this.updateY(e),this.stream.write(ho.floatToString(e)),this.stream.write(to.whiteSpace)}},t.prototype.updateY=function(t){return-t},t.prototype.write=function(t){var e="";e+=t,e+=to.newLine,this.writeOperator(e)},t.prototype.writeComment=function(t){if(!(null!=t&&t.length>0))throw new Error("Invalid comment");var e="";e+=to.comment,e+=to.whiteSpace,e+=t,this.writeOperator(e)},t.prototype.setColorAndSpace=function(t,e,i){t.isEmpty||(this.stream.write(t.toString(e,i)),this.stream.write(to.newLine))},t.prototype.setLineDashPattern=function(t,e){this.setLineDashPatternHelper(t,e)},t.prototype.setLineDashPatternHelper=function(t,e){var i="[";if(t.length>1)for(var r=0;r<t.length;r++)r===t.length-1?i+=t[r].toString():i+=t[r].toString()+" ";i+="] ",i+=e.toString(),i+=" "+to.setDashPattern,this.stream.write(i),this.stream.write(to.newLine)},t.prototype.setMiterLimit=function(t){this.stream.write(ho.floatToString(t)),this.stream.write(to.whiteSpace),this.writeOperator(to.setMiterLimit)},t.prototype.setLineWidth=function(t){this.stream.write(ho.floatToString(t)),this.stream.write(to.whiteSpace),this.writeOperator(to.setLineWidth)},t.prototype.setLineCap=function(t){this.stream.write(t.toString()),this.stream.write(to.whiteSpace),this.writeOperator(to.setLineCapStyle)},t.prototype.setLineJoin=function(t){this.stream.write(t.toString()),this.stream.write(to.whiteSpace),this.writeOperator(to.setLineJoinStyle)},Object.defineProperty(t.prototype,"position",{get:function(){return this.stream.position},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){var t=0;if(0!==this.stream.data.length&&-1!==this.stream.data.length)for(var e=0;e<this.stream.data.length;e++)t+=this.stream.data[e].length;return t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"document",{get:function(){return null},enumerable:!0,configurable:!0}),t.prototype.appendBezierSegment=function(t,e,i,r,n,o){t instanceof Qo&&e instanceof Qo&&i instanceof Qo?(this.writePoint(t.x,t.y),this.writePoint(e.x,e.y),this.writePoint(i.x,i.y)):(this.writePoint(t,e),this.writePoint(i,r),this.writePoint(n,o)),this.writeOperator(to.appendbeziercurve)},t.prototype.setColourWithPattern=function(t,e,i){if(null!=t){var r=t.length,n=0;for(n=0;n<r;++n)this.stream.write(t[n].toString()),this.stream.write(to.whiteSpace)}null!=e&&(this.stream.write(e.toString()),this.stream.write(to.whiteSpace)),i?this.writeOperator(to.setColorAndPatternStroking):this.writeOperator(to.setColorAndPattern)},t}(),Us=function(){function t(t,e){this.pdfColor=new Xo(0,0,0),this.dashOffsetValue=0,this.penDashPattern=[0],this.pdfDashStyle=Ho.Solid,this.pdfLineCap=0,this.pdfLineJoin=0,this.penWidth=1,this.internalMiterLimit=0,this.colorSpace=Uo.Rgb,t instanceof is?this.setBrush(t):t instanceof Xo&&(this.color=t),"number"==typeof e&&(this.width=e)}return Object.defineProperty(t.prototype,"color",{get:function(){return this.pdfColor},set:function(t){this.pdfColor=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dashOffset",{get:function(){return void 0===this.dashOffsetValue||null==this.dashOffsetValue?0:this.dashOffsetValue},set:function(t){this.dashOffsetValue=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dashPattern",{get:function(){return this.penDashPattern},set:function(t){this.penDashPattern=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dashStyle",{get:function(){return this.pdfDashStyle},set:function(t){if(this.pdfDashStyle!==t)switch(this.pdfDashStyle=t,this.pdfDashStyle){case Ho.Custom:break;case Ho.Dash:this.penDashPattern=[3,1];break;case Ho.Dot:this.penDashPattern=[1,1];break;case Ho.DashDot:this.penDashPattern=[3,1,1,1];break;case Ho.DashDotDot:this.penDashPattern=[3,1,1,1,1,1];break;case Ho.Solid:break;default:this.pdfDashStyle=Ho.Solid,this.penDashPattern=[0]}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineCap",{get:function(){return this.pdfLineCap},set:function(t){this.pdfLineCap=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lineJoin",{get:function(){return this.pdfLineJoin},set:function(t){this.pdfLineJoin=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"miterLimit",{get:function(){return this.internalMiterLimit},set:function(t){this.internalMiterLimit=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.penWidth},set:function(t){this.penWidth=t},enumerable:!0,configurable:!0}),t.prototype.clone=function(){return this},t.prototype.setBrush=function(t){var e=t;null!=e&&e instanceof ns&&(this.color=e.color,this.pdfBrush=e),this.color=e.color,this.pdfBrush=e},t.prototype.monitorChanges=function(t,e,i,r,n,o){r=!0,this.dashControl(t,r,e),e.setLineWidth(this.width),e.setLineJoin(this.lineJoin),e.setLineCap(this.lineCap);var s=this.miterLimit;s>0&&e.setMiterLimit(s);this.pdfBrush;return e.setColorAndSpace(this.color,n,!0),!0},t.prototype.dashControl=function(t,e,i){e=!0;var r=this.width,n=this.getPattern();return i.setLineDashPattern(n,this.dashOffset*r),e},t.prototype.getPattern=function(){for(var t=this.dashPattern,e=0;e<t.length;++e)t[e]*=this.width;return t},t}(),qs=function(){function t(t){this.radDegFactor=180/Math.PI,this.transformationMatrix=new Ks(1,0,0,void 0===t?1:-1,0,0)}return Object.defineProperty(t.prototype,"matrix",{get:function(){return this.transformationMatrix},set:function(t){this.transformationMatrix=t},enumerable:!0,configurable:!0}),t.prototype.translate=function(t,e){this.transformationMatrix.translate(t,e)},t.prototype.scale=function(t,e){this.transformationMatrix.elements[0]=t,this.transformationMatrix.elements[3]=e},t.prototype.rotate=function(t){t=t*Math.PI/180,this.transformationMatrix.elements[0]=Math.cos(t),this.transformationMatrix.elements[1]=Math.sin(t),this.transformationMatrix.elements[2]=-Math.sin(t),this.transformationMatrix.elements[3]=Math.cos(t)},t.prototype.toString=function(){for(var t="",e=0,i=this.transformationMatrix.elements.length;e<i;e++){this.matrix.elements[e];t+=ho.floatToString(this.transformationMatrix.elements[e]),t+=" "}return t},t.prototype.multiply=function(t){this.transformationMatrix.multiply(t.matrix)},t.degreesToRadians=function(t){return this.degRadFactor*t},t.prototype.radiansToDegrees=function(t){return this.radDegFactor*t},t.prototype.clone=function(){return this},t.degRadFactor=Math.PI/180,t}(),Ks=function(){function t(t,e,i,r,n,o){void 0===t?this.metrixElements=[]:"number"==typeof t?(this.metrixElements=[],this.metrixElements.push(t),this.metrixElements.push(e),this.metrixElements.push(i),this.metrixElements.push(r),this.metrixElements.push(n),this.metrixElements.push(o)):this.metrixElements=t}return Object.defineProperty(t.prototype,"elements",{get:function(){return this.metrixElements},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"offsetX",{get:function(){return this.metrixElements[4]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"offsetY",{get:function(){return this.metrixElements[5]},enumerable:!0,configurable:!0}),t.prototype.translate=function(t,e){this.metrixElements[4]=t,this.metrixElements[5]=e},t.prototype.transform=function(t){var e=t.x,i=t.y,r=e*this.elements[0]+i*this.elements[2]+this.offsetX,n=e*this.elements[1]+i*this.elements[3]+this.offsetY;return new Qo(r,n)},t.prototype.multiply=function(t){var e=[];e.push(this.elements[0]*t.elements[0]+this.elements[1]*t.elements[2]),e[1]=this.elements[0]*t.elements[1]+this.elements[1]*t.elements[3],e[2]=this.elements[2]*t.elements[0]+this.elements[3]*t.elements[2],e[3]=this.elements[2]*t.elements[1]+this.elements[3]*t.elements[3],e[4]=this.offsetX*t.elements[0]+this.offsetY*t.elements[2]+t.offsetX,e[5]=this.offsetX*t.elements[1]+this.offsetY*t.elements[3]+t.offsetY;for(var i=0;i<e.length;i++)this.elements[i]=e[i]},t.prototype.dispose=function(){this.metrixElements=null},t.prototype.clone=function(){return new t(this.metrixElements)},t}(),Ys=function(){return function(){this.pdf="PDF",this.text="Text",this.imageB="ImageB",this.imageC="ImageC",this.imageI="ImageI"}}(),$s=function(){function t(){this.mKeys=[],this.mValues=[]}return t.prototype.size=function(){return this.mKeys.length},t.prototype.add=function(t,e){if(void 0===t||null===t||void 0===e||null===e)throw new ReferenceError("Provided key or value is not valid.");if(this.mKeys.indexOf(t)<0)return this.mKeys.push(t),this.mValues.push(e),1;throw new RangeError("An item with the same key has already been added.")},t.prototype.keys=function(){return this.mKeys},t.prototype.values=function(){return this.mValues},t.prototype.getValue=function(t){if(void 0===t||null===t)throw new ReferenceError("Provided key is not valid.");var e=this.mKeys.indexOf(t);if(e<0)throw new RangeError("No item with the specified key has been added.");return this.mValues[e]},t.prototype.setValue=function(t,e){if(void 0===t||null===t)throw new ReferenceError("Provided key is not valid.");var i=this.mKeys.indexOf(t);i<0?(this.mKeys.push(t),this.mValues.push(e)):this.mValues[i]=e},t.prototype.remove=function(t){if(void 0===t||null===t)throw new ReferenceError("Provided key is not valid.");var e=this.mKeys.indexOf(t);if(e<0)throw new RangeError("No item with the specified key has been added.");return this.mKeys.splice(e,1),this.mValues.splice(e,1),!0},t.prototype.containsKey=function(t){if(void 0===t||null===t)throw new ReferenceError("Provided key is not valid.");return!(this.mKeys.indexOf(t)<0)},t.prototype.clear=function(){this.mKeys=[],this.mValues=[]},t}(),Js=function(){function t(t,e,i){this.dictionary=new io,this.dictionaryProperties=new eo,this.dictionary.items.setValue(this.dictionaryProperties.CA,new ho(t)),this.dictionary.items.setValue(this.dictionaryProperties.ca,new ho(e)),this.dictionary.items.setValue(this.dictionaryProperties.BM,new Zn(i.toString()))}return Object.defineProperty(t.prototype,"element",{get:function(){return this.dictionary},enumerable:!0,configurable:!0}),t}(),Xs=function(){function t(){this.automaticFieldsInformation=[]}return Object.defineProperty(t.prototype,"automaticFields",{get:function(){return this.automaticFieldsInformation},enumerable:!0,configurable:!0}),t.prototype.add=function(t){return this.automaticFields.push(t)},t}(),Qs=function(){function t(){}return t.prototype.drawHelper=function(t,e,i){var r=0!==e||0!==i,n=null;r&&(n=t.save(),t.translateTransform(e,i)),this.drawInternal(t),r&&t.restore(n)},t}(),Zs=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ta=function(t){function e(){var e=t.call(this)||this;return e.internalBounds=new ts(0,0,0,0),e.internalTemplateSize=new Zo(0,0),e}return Zs(e,t),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.internalBounds},set:function(t){this.internalBounds=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return new Zo(this.bounds.width,this.bounds.height)},set:function(t){this.bounds.width=t.width,this.bounds.height=t.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"location",{get:function(){return new Qo(this.bounds.x,this.bounds.y)},set:function(t){this.bounds.x=t.x,this.bounds.y=t.y},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"font",{get:function(){return this.internalFont},set:function(t){this.internalFont=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"brush",{get:function(){return this.internalBrush},set:function(t){this.internalBrush=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pen",{get:function(){return this.internalPen},set:function(t){this.internalPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stringFormat",{get:function(){return this.internalStringFormat},set:function(t){this.internalStringFormat=t},enumerable:!0,configurable:!0}),e.prototype.performDrawHelper=function(t,e,i,r){if(0===this.bounds.height||0===this.bounds.width){var n=this.getValue(t);this.internalTemplateSize=this.getFont().measureString(n,this.size,this.stringFormat)}},e.prototype.draw=function(t,e,i){if(void 0===e){var r=new Qo(0,0);this.draw(t,r)}else if(e instanceof Qo)this.draw(t,e.x,e.y);else{this.drawHelper(t,e,i);var n=new ea(this,new Qo(e,i));t.automaticFields.add(n)}},e.prototype.getSize=function(){return 0===this.bounds.height||0===this.bounds.width?this.internalTemplateSize:this.size},e.prototype.drawInternal=function(t){},e.prototype.getBrush=function(){return void 0===this.internalBrush||null==this.internalBrush?new ns(new Xo(0,0,0)):this.internalBrush},e.prototype.getFont=function(){return void 0===this.internalFont||null==this.internalFont?vl.defaultFont:this.internalFont},e.prototype.getPageFromGraphics=function(t){if(void 0!==t.page&&null!==t.page){return t.page}return t.currentPage},e}(Qs),ea=function(){function t(e,i,r,n){this.pageNumberFieldLocation=new Qo,this.pageNumberField=null,this.scaleX=1,this.scaleY=1,void 0===i&&e instanceof t?(this.pageNumberField=e.field,this.pageNumberFieldLocation=e.location,this.scaleX=e.scalingX,this.scaleY=e.scalingY):void 0===r&&i instanceof Qo&&e instanceof ta?(this.pageNumberField=e,this.pageNumberFieldLocation=i):(this.pageNumberField=e,this.pageNumberFieldLocation=i,this.scaleX=r,this.scaleY=n)}return Object.defineProperty(t.prototype,"location",{get:function(){return this.pageNumberFieldLocation},set:function(t){this.pageNumberFieldLocation=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"field",{get:function(){return this.pageNumberField},set:function(t){this.pageNumberField=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scalingX",{get:function(){return this.scaleX},set:function(t){this.scaleX=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scalingY",{get:function(){return this.scaleY},set:function(t){this.scaleY=t},enumerable:!0,configurable:!0}),t}(),ia=function(){function t(t){this.mPosition=0,this.buffer=new Uint8Array(t),this.dataView=new DataView(this.buffer.buffer)}return Object.defineProperty(t.prototype,"position",{get:function(){return this.mPosition},set:function(t){this.mPosition=t},enumerable:!0,configurable:!0}),t.prototype.read=function(t,e,i){for(var r=e;r<i;r++){var n=this.position;t.buffer[r]=this.readByte(n),this.position++}},t.prototype.getBuffer=function(t){return this.buffer[t]},t.prototype.writeFromBase64String=function(t){var e=this.encodedString(t);this.buffer=e},t.prototype.encodedString=function(t){var e,i,r,n,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,l=0,h=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;t.charAt(t.length-1)===s.charAt(64)&&h--;for(var u=new Uint8Array(0|h);a<t.length;)e=s.indexOf(t.charAt(a++))<<2|(n=s.indexOf(t.charAt(a++)))>>4,i=(15&n)<<4|(o=s.indexOf(t.charAt(a++)))>>2,r=(3&o)<<6|s.indexOf(t.charAt(a++)),u[l++]=e,u[l++]=i,u[l++]=r;return u},t.prototype.readByte=function(t){return this.buffer[t]},Object.defineProperty(t.prototype,"internalBuffer",{get:function(){return this.buffer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.buffer.byteLength},enumerable:!0,configurable:!0}),t.prototype.readNextTwoBytes=function(t){var e=t.readByte(this.position);return this.position++,e<<=8,e|=t.readByte(this.position),this.position++,e},t}(),ra=function(){function t(t){this.currentPosition=-1,this.value=t}return Object.defineProperty(t.prototype,"status",{get:function(){return this.objectStatus},set:function(t){this.objectStatus=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSaving",{get:function(){return this.saving},set:function(t){this.saving=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"objectCollectionIndex",{get:function(){return this.index},set:function(t){this.index=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this.currentPosition},set:function(t){this.currentPosition=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clonedObject",{get:function(){return null},enumerable:!0,configurable:!0}),t.prototype.save=function(t){t.write(this.boolToStr(this.value))},t.prototype.clone=function(e){return new t(this.value)},t.prototype.boolToStr=function(t){return t?"true":"false"},t}();!function(t){t[t.Unknown=0]="Unknown",t[t.Bmp=1]="Bmp",t[t.Emf=2]="Emf",t[t.Gif=3]="Gif",t[t.Jpeg=4]="Jpeg",t[t.Png=5]="Png",t[t.Wmf=6]="Wmf",t[t.Icon=7]="Icon"}(Gs||(Gs={}));var na,oa=function(){function t(t){this.sof1Marker=193,this.sof2Marker=194,this.sof3Marker=195,this.sof5Marker=197,this.sof6Marker=198,this.sof7Marker=199,this.sof9Marker=201,this.sof10Marker=202,this.sof11Marker=203,this.sof13Marker=205,this.sof14Marker=206,this.sof15Marker=207,this.mFormat=Gs.Unknown,this.mbitsPerComponent=8,this.dictionaryProperties=new eo,this.mStream=t,this.initialize()}return Object.defineProperty(t.prototype,"height",{get:function(){return this.mHeight},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.mWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bitsPerComponent",{get:function(){return this.mbitsPerComponent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.mImageData.count},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageData",{get:function(){return this.mImageData},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageDataAsNumberArray",{get:function(){return this.mImageData.internalBuffer.buffer},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){this.mFormat===Gs.Unknown&&this.checkIfJpeg()&&(this.mFormat=Gs.Jpeg,this.parseJpegImage()),this.reset(),this.mImageData=new ia(this.mStream.count),this.mStream.read(this.mImageData,0,this.mImageData.count)},t.prototype.reset=function(){this.mStream.position=0},t.prototype.parseJpegImage=function(){this.reset();var t=new ia(this.mStream.count);this.mStream.read(t,0,t.count);for(var e=4,i=!1,r=256*t.getBuffer(e)+t.getBuffer(e+1);e<t.count;){if(!((e+=r)<t.count)){i=!0;break}if(192===t.getBuffer(e+1))return this.mHeight=256*t.getBuffer(e+5)+t.getBuffer(e+6),void(this.mWidth=256*t.getBuffer(e+7)+t.getBuffer(e+8));e+=2,r=256*t.getBuffer(e)+t.getBuffer(e+1)}i&&(this.mStream.position=0,this.skip(this.mStream,2),this.readExceededJPGImage(this.mStream))},Object.defineProperty(t.prototype,"format",{get:function(){return this.mFormat},enumerable:!0,configurable:!0}),t.prototype.checkIfJpeg=function(){this.reset();for(var e=0;e<t.mJpegHeader.length;e++){if(t.mJpegHeader[e]!==this.mStream.readByte(e))return!1;this.mStream.position++}return!0},t.prototype.getImageDictionary=function(){if(this.mFormat===Gs.Jpeg){this.imageData.internalBuffer.length;this.imageStream=new To,this.imageStream.isImage=!0;for(var t="",e="",i=0;i<this.imageDataAsNumberArray.byteLength;i++)t+=String.fromCharCode(null,this.mStream.readByte(i));for(i=0;i<t.length;i++)i%2!=0&&(e+=t[i]);return this.imageStream.data=[e],this.imageStream.compress=!1,this.imageStream.items.setValue(this.dictionaryProperties.type,new Zn(this.dictionaryProperties.xObject)),this.imageStream.items.setValue(this.dictionaryProperties.subtype,new Zn(this.dictionaryProperties.image)),this.imageStream.items.setValue(this.dictionaryProperties.width,new ho(this.width)),this.imageStream.items.setValue(this.dictionaryProperties.height,new ho(this.height)),this.imageStream.items.setValue(this.dictionaryProperties.bitsPerComponent,new ho(this.bitsPerComponent)),this.imageStream.items.setValue(this.dictionaryProperties.filter,new Zn(this.dictionaryProperties.dctdecode)),this.imageStream.items.setValue(this.dictionaryProperties.colorSpace,new Zn(this.getColorSpace())),this.imageStream.items.setValue(this.dictionaryProperties.decodeParms,this.getDecodeParams()),this.imageStream}return this.imageStream},t.prototype.getColorSpace=function(){return this.dictionaryProperties.deviceRgb},t.prototype.getDecodeParams=function(){var t=new io;return t.items.setValue(this.dictionaryProperties.columns,new ho(this.width)),t.items.setValue(this.dictionaryProperties.blackIs1,new ra(!0)),t.items.setValue(this.dictionaryProperties.k,new ho(-1)),t.items.setValue(this.dictionaryProperties.predictor,new ho(15)),t.items.setValue(this.dictionaryProperties.bitsPerComponent,new ho(this.bitsPerComponent)),t},t.prototype.readExceededJPGImage=function(t){this.mStream=t;for(var e=!0;e;){switch(this.getMarker(t)){case this.sof1Marker:case this.sof2Marker:case this.sof3Marker:case this.sof5Marker:case this.sof6Marker:case this.sof7Marker:case this.sof9Marker:case this.sof10Marker:case this.sof11Marker:case this.sof13Marker:case this.sof14Marker:case this.sof15Marker:t.position+=3,this.mHeight=this.mStream.readNextTwoBytes(t),this.mWidth=this.mStream.readNextTwoBytes(t),e=!1;break;default:this.skipStream(t)}}},t.prototype.skip=function(t,e){this.mStream=t;var i=new ia(e);this.mStream.read(i,0,i.count)},t.prototype.getMarker=function(t){var e=32;for(e=t.readByte(this.mStream.position),t.position++;255!==e;)e=t.readByte(this.mStream.position),t.position++;do{e=t.readByte(this.mStream.position),t.position++}while(255===e);return e},t.prototype.skipStream=function(t){var e=this.mStream.readNextTwoBytes(t)-2;e>0&&(t.position+=e)},t.mPngHeader=[137,80,78,71,13,10,26,10],t.mJpegHeader=[255,216],t.GIF_HEADER="G,I,F,8",t.BMP_HEADER="B,M",t}(),sa=function(){function t(t){this.updateProportionsHelper(t)}return t.prototype.convertUnits=function(t,e,i){return this.convertFromPixels(this.convertToPixels(t,e),i)},t.prototype.convertToPixels=function(t,e){var i=e;return t*this.proportions[i]},t.prototype.convertFromPixels=function(t,e){var i=e;return t/this.proportions[i]},t.prototype.updateProportionsHelper=function(t){this.proportions=[t/2.54,t/6,1,t/72,t,t/300,t/25.4]},t.horizontalResolution=96,t.verticalResolution=96,t}(),aa=function(){function t(){}return Object.defineProperty(t.prototype,"width",{get:function(){return this.imageWidth},set:function(t){this.imageWidth=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.imageHeight},set:function(t){this.imageHeight=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{set:function(t){this.width=t.width,this.height=t.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"physicalDimension",{get:function(){return this.imagePhysicalDimension=this.getPointSize(this.width,this.height,this.horizontalResolution,this.verticalResolution),new Zo(this.width,this.height)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.imageStream},enumerable:!0,configurable:!0}),t.prototype.getPointSize=function(t,e,i,r){if(void 0===i){var n=sa.horizontalResolution,o=sa.verticalResolution;return this.getPointSize(t,e,n,o)}var s=new sa(i),a=new sa(r),l=s.convertUnits(t,Ko.Pixel,Ko.Point),h=a.convertUnits(e,Ko.Pixel,Ko.Point);return new Zo(l,h)},t}(),la=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ha=function(t){function e(e){var i=t.call(this)||this;return i.imageStatus=!0,i.dictionaryProperties=new eo,i.loadImage(e),i}return la(e,t),e.prototype.loadImage=function(t){this.initializeAsync(t)},e.prototype.initializeAsync=function(t){var e=new ia(t.length);e.writeFromBase64String(t),this.decoder=new oa(e),this.height=this.decoder.height,this.width=this.decoder.width,this.bitsPerComponent=this.decoder.bitsPerComponent},e.prototype.save=function(){this.imageStatus=!0,this.imageStream=this.decoder.getImageDictionary()},e}(aa),ua=function(){function t(){}return Object.defineProperty(t.prototype,"empty",{get:function(){return this.offset===this.length&&this.length===this.checksum&&0===this.checksum},enumerable:!0,configurable:!0}),t}(),ca=function(){return function(){}}(),pa=function(){return function(){}}(),da=function(){return function(){}}(),fa=function(){function t(){}return Object.defineProperty(t.prototype,"isItalic",{get:function(){return 0!=(2&this.macStyle)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isBold",{get:function(){return 0!=(1&this.macStyle)},enumerable:!0,configurable:!0}),t}(),ga=function(){return function(){}}(),ma=function(){return function(){}}(),ya=function(){return function(){}}(),ba=function(){return function(){}}(),va=function(){return function(){}}(),wa=function(){return function(){}}(),Sa=function(){function t(){}return Object.defineProperty(t.prototype,"empty",{get:function(){return this.index===this.width&&this.width===this.charCode&&0===this.charCode},enumerable:!0,configurable:!0}),t.prototype.compareTo=function(t){var e=t;return this.index-e.index},t}(),Pa=function(){return function(){}}(),Ca=function(){return function(){}}(),xa=function(){return function(){}}(),Oa=function(){return function(){}}(),Ba=function(){return function(){}}(),La=function(){function t(t){this.int32Size=4,this.int16Size=2,this.int64Size=8,this.bufferLength=t,this.buffer=[]}return Object.defineProperty(t.prototype,"data",{get:function(){if(this.buffer.length<this.bufferLength)for(var t=this.bufferLength-this.buffer.length,e=0;e<t;e++)this.buffer.push(0);return this.buffer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return void 0!==this.internalPosition&&null!==this.internalPosition||(this.internalPosition=0),this.internalPosition},enumerable:!0,configurable:!0}),t.prototype.writeShort=function(t){var e=[(65280&t)>>8,255&t];this.flush(e)},t.prototype.writeInt=function(t){var e=[(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t];this.flush(e)},t.prototype.writeUInt=function(t){var e=[(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t];this.flush(e)},t.prototype.writeString=function(t){if(null==t)throw new Error("Argument Null Exception : value");for(var e=[],i=0;i<t.length;i++)e.push(t.charCodeAt(i));this.flush(e)},t.prototype.writeBytes=function(t){this.flush(t)},t.prototype.flush=function(t){if(null===t)throw new Error("Argument Null Exception : buff");for(var e=this.position,i=0;i<t.length;i++)this.buffer[e]=t[i],e++;this.internalPosition+=t.length},t}(),Ta=function(){function t(t){this.int32Size=4,this.isTtcFont=!1,this.isMacTtf=!1,this.metricsName="",this.isMacTTF=!1,this.missedGlyphs=0,this.tableNames=["cvt ","fpgm","glyf","head","hhea","hmtx","loca","maxp","prep"],this.entrySelectors=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4],this.fontData=t,this.initialize()}return Object.defineProperty(t.prototype,"macintosh",{get:function(){return null!==this.macintoshDictionary&&void 0!==this.macintoshDictionary||(this.macintoshDictionary=new Qn),this.macintoshDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"microsoft",{get:function(){return null!==this.microsoftDictionary&&void 0!==this.microsoftDictionary||(this.microsoftDictionary=new Qn),this.microsoftDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"macintoshGlyphs",{get:function(){return null!==this.internalMacintoshGlyphs&&void 0!==this.internalMacintoshGlyphs||(this.internalMacintoshGlyphs=new Qn),this.internalMacintoshGlyphs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"microsoftGlyphs",{get:function(){return null!==this.internalMicrosoftGlyphs&&void 0!==this.internalMicrosoftGlyphs||(this.internalMicrosoftGlyphs=new Qn),this.internalMicrosoftGlyphs},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){void 0===this.metrics&&(this.metrics=new fa),this.readFontDictionary();var t=this.readNameTable(),e=this.readHeadTable();this.initializeFontName(t),this.metrics.macStyle=e.macStyle},t.prototype.readFontDictionary=function(){this.offset=0;this.checkPreambula();var t=this.readInt16(this.offset);this.readInt16(this.offset),this.readInt16(this.offset),this.readInt16(this.offset);void 0===this.tableDirectory&&(this.tableDirectory=new Qn);for(var e=0;e<t;++e){var i=new ua,r=this.readString(this.int32Size);i.checksum=this.readInt32(this.offset),i.offset=this.readInt32(this.offset),i.length=this.readInt32(this.offset),this.tableDirectory.setValue(r,i)}this.lowestPosition=this.offset,this.isTtcFont||this.fixOffsets()},t.prototype.fixOffsets=function(){for(var t=Number.MAX_VALUE,e=this.tableDirectory.keys(),i=0;i<e.length;i++){var r=(s=this.tableDirectory.getValue(e[i])).offset;if(t>r&&(t=r)<=this.lowestPosition)break}var n=t-this.lowestPosition;if(0!==n){var o=new Qn;for(i=0;i<e.length;i++){var s;(s=this.tableDirectory.getValue(e[i])).offset-=n,o.setValue(e[i],s)}this.tableDirectory=o}},t.prototype.checkPreambula=function(){var t=this.readInt32(this.offset);if(this.isMacTtf=1953658213===t,65536!==t&&1953658213!==t&&1330926671!==t){this.isTtcFont=!0,this.offset=0;if("ttcf"!==this.readString(4))throw new Error("Can not read TTF font data");this.offset+=4;if(this.readInt32(this.offset)<0)throw new Error("Can not read TTF font data");this.offset=this.readInt32(this.offset),t=this.readInt32(this.offset)}return t},t.prototype.readNameTable=function(){var t=this.getTable("name");this.offset=t.offset;var e=new ca;e.formatSelector=this.readUInt16(this.offset),e.recordsCount=this.readUInt16(this.offset),e.offset=this.readUInt16(this.offset),e.nameRecords=[];for(var i=this.offset,r=0;r<e.recordsCount;r++){this.offset=i;var n=new pa;n.platformID=this.readUInt16(this.offset),n.encodingID=this.readUInt16(this.offset),n.languageID=this.readUInt16(this.offset),n.nameID=this.readUInt16(this.offset),n.length=this.readUInt16(this.offset),n.offset=this.readUInt16(this.offset),this.offset=t.offset+e.offset+n.offset;var o=0===n.platformID||3===n.platformID;n.name=this.readString(n.length,o),e.nameRecords[r]=n,i+=12}return e},t.prototype.readHeadTable=function(){var t=this.getTable("head");this.offset=t.offset;var e=new da;return e.version=this.readFixed(this.offset),e.fontRevision=this.readFixed(this.offset),e.checkSumAdjustment=this.readUInt32(this.offset),e.magicNumber=this.readUInt32(this.offset),e.flags=this.readUInt16(this.offset),e.unitsPerEm=this.readUInt16(this.offset),e.created=this.readInt64(this.offset),e.modified=this.readInt64(this.offset),e.xMin=this.readInt16(this.offset),e.yMin=this.readInt16(this.offset),e.xMax=this.readInt16(this.offset),e.yMax=this.readInt16(this.offset),e.macStyle=this.readUInt16(this.offset),e.lowestReadableSize=this.readUInt16(this.offset),e.fontDirectionHint=this.readInt16(this.offset),e.indexToLocalFormat=this.readInt16(this.offset),e.glyphDataFormat=this.readInt16(this.offset),e},t.prototype.readHorizontalHeaderTable=function(){var t=this.getTable("hhea");this.offset=t.offset;var e=new ga;return e.version=this.readFixed(this.offset),e.ascender=this.readInt16(this.offset),e.descender=this.readInt16(this.offset),e.lineGap=this.readInt16(this.offset),e.advanceWidthMax=this.readUInt16(this.offset),e.minLeftSideBearing=this.readInt16(this.offset),e.minRightSideBearing=this.readInt16(this.offset),e.xMaxExtent=this.readInt16(this.offset),e.caretSlopeRise=this.readInt16(this.offset),e.caretSlopeRun=this.readInt16(this.offset),this.offset+=10,e.metricDataFormat=this.readInt16(this.offset),e.numberOfHMetrics=this.readUInt16(this.offset),e},t.prototype.readOS2Table=function(){var t=this.getTable("OS/2");this.offset=t.offset;var e=new ma;return e.version=this.readUInt16(this.offset),e.xAvgCharWidth=this.readInt16(this.offset),e.usWeightClass=this.readUInt16(this.offset),e.usWidthClass=this.readUInt16(this.offset),e.fsType=this.readInt16(this.offset),e.ySubscriptXSize=this.readInt16(this.offset),e.ySubscriptYSize=this.readInt16(this.offset),e.ySubscriptXOffset=this.readInt16(this.offset),e.ySubscriptYOffset=this.readInt16(this.offset),e.ySuperscriptXSize=this.readInt16(this.offset),e.ySuperscriptYSize=this.readInt16(this.offset),e.ySuperscriptXOffset=this.readInt16(this.offset),e.ySuperscriptYOffset=this.readInt16(this.offset),e.yStrikeoutSize=this.readInt16(this.offset),e.yStrikeoutPosition=this.readInt16(this.offset),e.sFamilyClass=this.readInt16(this.offset),e.panose=this.readBytes(10),e.ulUnicodeRange1=this.readUInt32(this.offset),e.ulUnicodeRange2=this.readUInt32(this.offset),e.ulUnicodeRange3=this.readUInt32(this.offset),e.ulUnicodeRange4=this.readUInt32(this.offset),e.vendorIdentifier=this.readBytes(4),e.fsSelection=this.readUInt16(this.offset),e.usFirstCharIndex=this.readUInt16(this.offset),e.usLastCharIndex=this.readUInt16(this.offset),e.sTypoAscender=this.readInt16(this.offset),e.sTypoDescender=this.readInt16(this.offset),e.sTypoLineGap=this.readInt16(this.offset),e.usWinAscent=this.readUInt16(this.offset),e.usWinDescent=this.readUInt16(this.offset),e.ulCodePageRange1=this.readUInt32(this.offset),e.ulCodePageRange2=this.readUInt32(this.offset),e.version>1?(e.sxHeight=this.readInt16(this.offset),e.sCapHeight=this.readInt16(this.offset),e.usDefaultChar=this.readUInt16(this.offset),e.usBreakChar=this.readUInt16(this.offset),e.usMaxContext=this.readUInt16(this.offset)):(e.sxHeight=0,e.sCapHeight=0,e.usDefaultChar=0,e.usBreakChar=0,e.usMaxContext=0),e},t.prototype.readPostTable=function(){var t=this.getTable("post");this.offset=t.offset;var e=new ya;return e.formatType=this.readFixed(this.offset),e.italicAngle=this.readFixed(this.offset),e.underlinePosition=this.readInt16(this.offset),e.underlineThickness=this.readInt16(this.offset),e.isFixedPitch=this.readUInt32(this.offset),e.minType42=this.readUInt32(this.offset),e.maxType42=this.readUInt32(this.offset),e.minType1=this.readUInt32(this.offset),e.maxType1=this.readUInt32(this.offset),e},t.prototype.readWidthTable=function(t,e){var i=this.getTable("hmtx");this.offset=i.offset;for(var r=[],n=0;n<t;n++){var o=new ba;o.advanceWidth=this.readUInt16(this.offset),o.lsb=this.readInt16(this.offset);var s=1e3*o.advanceWidth/e;r.push(Math.floor(s))}return r},t.prototype.readCmapTable=function(){var t=this.getTable("cmap");this.offset=t.offset;var e=new wa;e.version=this.readUInt16(this.offset),e.tablesCount=this.readUInt16(this.offset);for(var i=this.offset,r=[],n=0;n<e.tablesCount;n++){this.offset=i;var o=new va;o.platformID=this.readUInt16(this.offset),o.encodingID=this.readUInt16(this.offset),o.offset=this.readUInt32(this.offset),i=this.offset,this.readCmapSubTable(o),r[n]=o}return r},t.prototype.readCmapSubTable=function(t){var e=this.getTable("cmap");this.offset=e.offset+t.offset;var i=this.readUInt16(this.offset),r=this.getCmapEncoding(t.platformID,t.encodingID);r===cs.Macintosh?ps.Macintosh:ps.Microsoft;if(r!==cs.Unknown)switch(i){case us.Apple:this.readAppleCmapTable(t,r);break;case us.Microsoft:this.readMicrosoftCmapTable(t,r);break;case us.Trimmed:this.readTrimmedCmapTable(t,r)}},t.prototype.readAppleCmapTable=function(t,e){var i=this.getTable("cmap");this.offset=i.offset+t.offset;var r=new Ca;r.format=this.readUInt16(this.offset),r.length=this.readUInt16(this.offset),r.version=this.readUInt16(this.offset),null!==this.maxMacIndex&&void 0!==this.maxMacIndex||(this.maxMacIndex=0);for(var n=0;n<256;++n){var o=new Sa;o.index=this.readByte(this.offset),o.width=this.getWidth(o.index),o.charCode=n,this.macintosh.setValue(n,o),this.addGlyph(o,e),this.maxMacIndex=Math.max(n,this.maxMacIndex)}},t.prototype.readMicrosoftCmapTable=function(t,e){var i=this.getTable("cmap");this.offset=i.offset+t.offset;var r=e===cs.Unicode?this.microsoft:this.macintosh,n=new xa;n.format=this.readUInt16(this.offset),n.length=this.readUInt16(this.offset),n.version=this.readUInt16(this.offset),n.segCountX2=this.readUInt16(this.offset),n.searchRange=this.readUInt16(this.offset),n.entrySelector=this.readUInt16(this.offset),n.rangeShift=this.readUInt16(this.offset);var o=n.segCountX2/2;n.endCount=this.readUshortArray(o),n.reservedPad=this.readUInt16(this.offset),n.startCount=this.readUshortArray(o),n.idDelta=this.readUshortArray(o),n.idRangeOffset=this.readUshortArray(o);var s=n.length/2-8-4*o;n.glyphID=this.readUshortArray(s);for(var a=0,l=0,h=0;h<o;h++)for(var u=n.startCount[h];u<=n.endCount[h]&&65535!==u;u++){if(0===n.idRangeOffset[h])a=u+n.idDelta[h]&65535;else{if((l=h+n.idRangeOffset[h]/2-o+u-n.startCount[h])>=n.glyphID.length)continue;a=n.glyphID[l]+n.idDelta[h]&65535}var c=new Sa;c.index=a,c.width=this.getWidth(c.index);var p=e===cs.Symbol&&61440==(65280&u)?255&u:u;c.charCode=p,r.setValue(p,c),this.addGlyph(c,e)}},t.prototype.readTrimmedCmapTable=function(t,e){var i=this.getTable("cmap");this.offset=i.offset+t.offset;var r=new Oa;r.format=this.readUInt16(this.offset),r.length=this.readUInt16(this.offset),r.version=this.readUInt16(this.offset),r.firstCode=this.readUInt16(this.offset),r.entryCount=this.readUInt16(this.offset);for(var n=0;n<r.entryCount;++n){var o=new Sa;o.index=this.readUInt16(this.offset),o.width=this.getWidth(o.index),o.charCode=n+r.firstCode,this.macintosh.setValue(n,o),this.addGlyph(o,e),this.maxMacIndex=Math.max(n,this.maxMacIndex)}},t.prototype.initializeFontName=function(t){for(var e=0;e<t.recordsCount;e++){var i=t.nameRecords[e];if(1===i.nameID?this.metrics.fontFamily=i.name:6===i.nameID&&(this.metrics.postScriptName=i.name),null!==this.metrics.fontFamily&&void 0!==this.metrics.fontFamily&&null!==this.metrics.postScriptName&&void 0!==this.metrics.postScriptName)break}},t.prototype.getTable=function(t){var e,i=new ua;return this.tableDirectory.containsKey(t)&&(e=this.tableDirectory.getValue(t)),null!==e&&void 0!==e&&(i=e),i},t.prototype.getWidth=function(t){return t=t<this.width.length?t:this.width.length-1,this.width[t]},t.prototype.getCmapEncoding=function(t,e){var i=cs.Unknown;return t==ps.Microsoft&&e==ds.Undefined?i=cs.Symbol:t==ps.Microsoft&&e==ds.Unicode?i=cs.Unicode:t==ps.Macintosh&&e==fs.Roman&&(i=cs.Macintosh),i},t.prototype.addGlyph=function(t,e){var i=null;switch(e){case cs.Unicode:i=this.microsoftGlyphs;break;case cs.Macintosh:case cs.Symbol:i=this.macintoshGlyphs}i.setValue(t.index,t)},t.prototype.initializeMetrics=function(t,e,i,r,n,o){this.initializeFontName(t);for(var s=!1,a=0;a<o.length;a++){var l=o[a];if(this.getCmapEncoding(l.platformID,l.encodingID)===cs.Symbol){s=!0;break}}this.metrics.isSymbol=s,this.metrics.macStyle=e.macStyle,this.metrics.isFixedPitch=0!==n.isFixedPitch,this.metrics.italicAngle=n.italicAngle;var h=1e3/e.unitsPerEm;this.metrics.winAscent=r.sTypoAscender*h,this.metrics.macAscent=i.ascender*h,this.metrics.capHeight=0!==r.sCapHeight?r.sCapHeight:.7*e.unitsPerEm*h,this.metrics.winDescent=r.sTypoDescender*h,this.metrics.macDescent=i.descender*h,this.metrics.leading=(r.sTypoAscender-r.sTypoDescender+r.sTypoLineGap)*h,this.metrics.lineGap=Math.ceil(i.lineGap*h);var u=e.xMin*h,c=Math.ceil(this.metrics.macAscent+this.metrics.lineGap),p=e.xMax*h,d=this.metrics.macDescent;this.metrics.fontBox=new es(u,c,p,d),this.metrics.stemV=80,this.metrics.widthTable=this.updateWidth(),this.metrics.contains=this.tableDirectory.containsKey("CFF"),this.metrics.subScriptSizeFactor=e.unitsPerEm/r.ySubscriptYSize,this.metrics.superscriptSizeFactor=e.unitsPerEm/r.ySuperscriptYSize},t.prototype.updateWidth=function(){var t=[];if(this.metrics.isSymbol)for(var e=0;e<256;e++){var i=this.getGlyph(String.fromCharCode(e));t[e]=i.empty?0:i.width}else{var r=[],n=String.fromCharCode(32);for(e=0;e<256;e++){r[0]=e;var o=this.getString(r,0,r.length),s=o.length>0?o[0]:"?";(i=this.getGlyph(s)).empty?(i=this.getGlyph(n),t[e]=i.empty?0:i.width):t[e]=i.width}}return t},t.prototype.getDefaultGlyph=function(){return this.getGlyph(vs.whiteSpace)},t.prototype.getString=function(t,e,i){for(var r="",n=0;n<i;n++)r+=String.fromCharCode(t[n+e]);return r},t.prototype.readLocaTable=function(t){var e=this.getTable("loca");this.offset=e.offset;var i=new Pa,r=null;if(t){var n=e.length/2;r=[];for(var o=0;o<n;o++)r[o]=2*this.readUInt16(this.offset)}else{n=e.length/4;r=[];for(o=0;o<n;o++)r[o]=this.readUInt32(this.offset)}return i.offsets=r,i},t.prototype.updateGlyphChars=function(t,e){t.containsKey(0)||t.setValue(0,0);for(var i=new Qn,r=t.keys(),n=0;n<r.length;n++)i.setValue(r[n],t.getValue(r[n]));for(n=0;n<r.length;n++){var o=r[n];this.processCompositeGlyph(t,o,e)}},t.prototype.processCompositeGlyph=function(t,e,i){if(e<i.offsets.length-1){var r=i.offsets[e];if(r!==i.offsets[e+1]){var n=this.getTable("glyf");this.offset=n.offset+r;var o=new Ba;if(o.numberOfContours=this.readInt16(this.offset),o.xMin=this.readInt16(this.offset),o.yMin=this.readInt16(this.offset),o.xMax=this.readInt16(this.offset),o.yMax=this.readInt16(this.offset),o.numberOfContours<0)for(var s=0;;){var a=this.readUInt16(this.offset),l=this.readUInt16(this.offset);if(t.containsKey(l)||t.setValue(l,0),0==(a&ms.MoreComponents))break;s=0!=(a&ms.Arg1And2AreWords)?4:2,0!=(a&ms.WeHaveScale)?s+=2:0!=(a&ms.WeHaveAnXyScale)?s+=4:0!=(a&ms.WeHaveTwoByTwo)&&(s+=8),this.offset+=s}}}},t.prototype.generateGlyphTable=function(t,e,i,r){i=[];var n=t.keys();n.sort(function(t,e){return t-e});for(var o=0,s=0;s<n.length;s++){var a=n[s];e.offsets.length>0&&(o+=e.offsets[a+1]-e.offsets[a])}var l=this.align(o);r=[];for(s=0;s<l;s++)r.push(0);var h=0,u=0,c=this.getTable("glyf");for(s=0;s<e.offsets.length;s++)if(i.push(h),u<n.length&&n[u]===s){++u,i[s]=h;var p=e.offsets[s],d=e.offsets[s+1]-p;if(d>0){this.offset=c.offset+p;r=this.read(r,h,d).buffer,h+=d}}return{glyphTableSize:o,newLocaTable:i,newGlyphTable:r}},t.prototype.updateLocaTable=function(t,e,i){if(null===t)throw new Error("Argument Null Exception : newLocaTable");for(var r=e?2*t.length:4*t.length,n=this.align(r),o=new La(n),s=0;s<t.length;s++){var a=t[s];e?(a/=2,o.writeShort(a)):o.writeInt(a)}return{newLocaUpdated:o.data,newLocaSize:r}},t.prototype.align=function(t){return t+3&-4},t.prototype.getFontProgram=function(t,e,i,r){if(null===t)throw new Error("Argument Null Exception : newLocaTableOut");if(null===e)throw new Error("Argument Null Exception : newGlyphTable");this.tableNames;var n=this.getFontProgramLength(t,e,0),o=n.fontProgramLength,s=n.numTables,a=new La(o);a.writeInt(65536),a.writeShort(s);var l=this.entrySelectors[s];return a.writeShort(16*(1<<(31&l))),a.writeShort(l),a.writeShort(16*(s-(1<<(31&l)))),this.writeCheckSums(a,s,t,e,i,r),this.writeGlyphs(a,t,e),a.data},t.prototype.getFontProgramLength=function(t,e,i){if(null===t)throw new Error("Argument Null Exception : newLocaTableOut");if(null===e)throw new Error("Argument Null Exception : newGlyphTable");i=2;for(var r=this.tableNames,n=0,o=0;o<r.length;o++){var s=r[o];if("glyf"!==s&&"loca"!==s){var a=this.getTable(s);a.empty||(++i,n+=this.align(a.length))}}n+=t.length,n+=e.length;return n+=16*i+12,{fontProgramLength:n,numTables:i}},t.prototype.writeCheckSums=function(t,e,i,r,n,o){if(null===t)throw new Error("Argument Null Exception : writer");if(null===i)throw new Error("Argument Null Exception : newLocaTableOut");if(null===r)throw new Error("Argument Null Exception : newGlyphTable");for(var s=this.tableNames,a=16*e+12,l=0,h=0;h<s.length;h++){var u=s[h],c=this.getTable(u);if(!c.empty){if(t.writeString(u),"glyf"===u){var p=this.calculateCheckSum(r);t.writeInt(p),l=n}else if("loca"===u){p=this.calculateCheckSum(i);t.writeInt(p),l=o}else t.writeInt(c.checksum),l=c.length;t.writeUInt(a),t.writeUInt(l),a+=this.align(l)}}},t.prototype.calculateCheckSum=function(t){if(null===t)throw new Error("Argument Null Exception : bytes");for(var e=0,i=0,r=0,n=0,o=0,s=0;s<(t.length+1)/4;s++)o+=255&t[e++],n+=255&t[e++],r+=255&t[e++],i+=255&t[e++];var a=i;return a+=r<<8,a+=n<<16,a+=o<<24},t.prototype.writeGlyphs=function(t,e,i){if(null===t)throw new Error("Argument Null Exception : writer");if(null===e)throw new Error("Argument Null Exception : newLocaTableOut");if(null===i)throw new Error("Argument Null Exception : newGlyphTable");for(var r=this.tableNames,n=0;n<r.length;n++){var o=r[n],s=this.getTable(o);if(!s.empty)if("glyf"===o)t.writeBytes(i);else if("loca"===o)t.writeBytes(e);else{for(var a=this.align(s.length),l=[],h=0;h<a;h++)l.push(0);this.offset=s.offset;var u=this.read(l,0,s.length);t.writeBytes(u.buffer)}}},t.prototype.setOffset=function(t){this.offset=t},t.prototype.createInternals=function(){this.metrics=new fa;var t=this.readNameTable(),e=this.readHeadTable();this.bIsLocaShort=0===e.indexToLocalFormat;var i=this.readHorizontalHeaderTable(),r=this.readOS2Table(),n=this.readPostTable();this.width=this.readWidthTable(i.numberOfHMetrics,e.unitsPerEm);var o=this.readCmapTable();this.initializeMetrics(t,e,i,r,n,o)},t.prototype.getGlyph=function(t){if("number"==typeof t){var e=null;this.metrics.isSymbol||null==this.microsoftGlyphs?this.metrics.isSymbol&&null!=this.macintoshGlyphs&&this.macintoshGlyphs.containsKey(t)&&(e=this.macintoshGlyphs.getValue(t)):this.microsoftGlyphs.containsKey(t)&&(e=this.microsoftGlyphs.getValue(t));return null!=e?e:this.getDefaultGlyph()}var i=null,r=t.charCodeAt(0);this.metrics.isSymbol||null===this.microsoft?(this.metrics.isSymbol&&null!==this.macintosh||this.isMacTTF)&&(0!==this.maxMacIndex?r%=this.maxMacIndex+1:r=61440==(65280&r)?255&r:r,this.macintosh.containsKey(r)&&(i=this.macintosh.getValue(r),this.isFontPresent=!0)):this.microsoft.containsKey(r)?(i=this.microsoft.getValue(r),r!==vs.whiteSpace.charCodeAt(0)&&(this.isFontPresent=!0)):r!==vs.whiteSpace.charCodeAt(0)&&(this.isFontPresent=!1),t===vs.whiteSpace&&null===i&&(i=new Sa);return null!==i?i:this.getDefaultGlyph()},t.prototype.getGlyphChars=function(t){if(null===t||void 0===t)throw new Error("Argument Null Exception : chars");for(var e=new Qn,i=t.keys(),r=0;r<i.length;r++){var n=i[r],o=this.getGlyph(n);o.empty||e.setValue(o.index,n.charCodeAt(0))}return e},t.prototype.getAllGlyphs=function(){for(var t=[],e=new Sa,i=0,r=0;r<this.width.length;r++){var n=this.width[r];e.index=i,e.width=n,t.push(e),i++}return t},t.prototype.readFontProgram=function(t){var e=this.getGlyphChars(t),i=this.readLocaTable(this.bIsLocaShort);e.size()<t.size()&&(this.missedGlyphs=t.size()-e.size()),this.updateGlyphChars(e,i);var r=this.generateGlyphTable(e,i,null,null),n=r.glyphTableSize,o=r.newLocaTable,s=r.newGlyphTable,a=this.updateLocaTable(o,this.bIsLocaShort,null),l=a.newLocaSize,h=a.newLocaUpdated;return this.getFontProgram(h,s,n,l)},t.prototype.convertString=function(t){if(null===t)throw new Error("Argument Null Exception : text");for(var e="",i=0;i<t.length;i++){var r=t[i],n=this.getGlyph(r);n.empty||(e+=String.fromCharCode(n.index))}return e},t.prototype.getCharWidth=function(t){var e=this.getGlyph(t);return(e=e.empty?this.getDefaultGlyph():e).empty?0:e.width},t.prototype.readString=function(t,e){if(void 0===e)return this.readString(t,!1);var i="";if(e)for(var r=0;r<t;r++)r%2!=0&&(i+=String.fromCharCode(this.fontData[this.offset])),this.offset+=1;else for(r=0;r<t;r++)i+=String.fromCharCode(this.fontData[this.offset]),this.offset+=1;return i},t.prototype.readFixed=function(t){return this.readInt16(t)+this.readInt16(t+2)/16384},t.prototype.readInt32=function(t){var e=this.fontData[t+3],i=this.fontData[t+2],r=this.fontData[t+1],n=this.fontData[t];return this.offset+=4,e+(i<<8)+(r<<16)+(n<<24)},t.prototype.readUInt32=function(t){var e=this.fontData[t+3],i=this.fontData[t+2],r=this.fontData[t+1],n=this.fontData[t];return this.offset+=4,e|i<<8|r<<16|n<<24},t.prototype.readInt16=function(t){var e=(this.fontData[t]<<8)+this.fontData[t+1];return e=32768&e?e-65536:e,this.offset+=2,e},t.prototype.readInt64=function(t){var e=this.readInt32(t+4),i=4294967296*this.readInt32(t)+e;return e<0&&(i+=4294967296),i},t.prototype.readUInt16=function(t){var e=this.fontData[t]<<8|this.fontData[t+1];return this.offset+=2,e},t.prototype.readUshortArray=function(t){for(var e=[],i=0;i<t;i++)e[i]=this.readUInt16(this.offset);return e},t.prototype.readBytes=function(t){for(var e=[],i=0;i<t;i++)e.push(this.fontData[this.offset]),this.offset+=1;return e},t.prototype.readByte=function(t){var e=this.fontData[t];return this.offset+=1,e},t.prototype.read=function(t,e,i){if(null===t)throw new Error("Argument Null Exception : buffer");var r=0,n=0;do{for(var o=0;o<i-r&&this.offset+o<this.fontData.length;o++)t[e+o]=this.fontData[this.offset+o];n=i-r,this.offset+=n,r+=n}while(r<i);return{buffer:t,written:r}},t}(),Ma=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Da=function(){function t(){this.lineGap=0}return t.prototype.getAscent=function(t){return this.ascent*xs.charSizeMultiplier*this.getSize(t)},t.prototype.getDescent=function(t){return this.descent*xs.charSizeMultiplier*this.getSize(t)},t.prototype.getLineGap=function(t){return this.lineGap*xs.charSizeMultiplier*this.getSize(t)},t.prototype.getHeight=function(t){for(var e=["cambria","candara","constantia","corbel","cariadings"],i=[],r=0;r<e.length;r++){var n=e[r];i.push(n)}return this.getDescent(t)<0?this.getAscent(t)-this.getDescent(t)+this.getLineGap(t):this.getAscent(t)+this.getDescent(t)+this.getLineGap(t)},t.prototype.getSize=function(t){var e=this.size;if(null!=t)switch(t.subSuperScript){case ls.SubScript:e/=this.subScriptSizeFactor;break;case ls.SuperScript:e/=this.superscriptSizeFactor}return e},t.prototype.clone=function(){return this.widthTable=ka.clone(),this},Object.defineProperty(t.prototype,"widthTable",{get:function(){return this.internalWidthTable},set:function(t){this.internalWidthTable=t},enumerable:!0,configurable:!0}),t}(),ka=function(){function t(){}return t.clone=function(){return null},t}(),Ea=function(t){function e(e){var i=t.call(this)||this;if(null==e)throw new Error("ArgumentNullException:widths");return i.widths=e,i}return Ma(e,t),e.prototype.items=function(t){if(t<0||t>=this.widths.length)throw new Error("ArgumentOutOfRangeException:index, The character is not supported by the font.");return this.widths[t]},Object.defineProperty(e.prototype,"length",{get:function(){return this.widths.length},enumerable:!0,configurable:!0}),e.prototype.clone=function(){return this.widths=this.widths,this},e.prototype.toArray=function(){return new uo(this.widths)},e}(ka),ja=function(){function t(t,e){if(this.nameString="ABCDEFGHIJKLMNOPQRSTUVWXYZ",this.dictionaryProperties=new eo,this.isCompress=!1,this.isEmbedFont=!1,this.cmapPrefix="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap"+to.newLine+"/CIDSystemInfo << /Registry (Adobe)/Ordering (UCS)/Supplement 0>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange"+to.newLine,this.cmapEndCodespaceRange="endcodespacerange"+to.newLine,this.cmapBeginRange="beginbfrange"+to.newLine,this.cmapEndRange="endbfrange"+to.newLine,this.cmapSuffix="endbfrange\nendcmap\nCMapName currentdict /CMap defineresource pop\nend end"+to.newLine,null===t||void 0===t)throw new Error("ArgumentNullException:base64String");this.fontSize=e,this.fontString=t,this.Initialize()}return t.prototype.getCharWidth=function(t){return this.ttfReader.getCharWidth(t)},t.prototype.getLineWidth=function(t){for(var e=0,i=0,r=t.length;i<r;i++){var n=t[i];e+=this.getCharWidth(n)}return e},t.prototype.Initialize=function(){var t=new ia(this.fontString.length);t.writeFromBase64String(this.fontString),this.fontData=t.internalBuffer,this.ttfReader=new Ta(this.fontData),this.ttfMetrics=this.ttfReader.metrics},t.prototype.createInternals=function(){this.fontDictionary=new io,this.fontProgram=new To,this.cmap=new To,this.descendantFont=new io,this.metrics=new Da,this.ttfReader.createInternals(),this.ttfMetrics=this.ttfReader.metrics,this.initializeMetrics(),this.subsetName=this.getFontName(),this.createDescendantFont(),this.createCmap(),this.createFontDictionary(),this.createFontProgram()},t.prototype.getInternals=function(){return this.fontDictionary},t.prototype.initializeMetrics=function(){var t=this.ttfReader.metrics;this.metrics.ascent=t.macAscent,this.metrics.descent=t.macDescent,this.metrics.height=t.macAscent-t.macDescent+t.lineGap,this.metrics.name=t.fontFamily,this.metrics.postScriptName=t.postScriptName,this.metrics.size=this.fontSize,this.metrics.widthTable=new Ea(t.widthTable),this.metrics.lineGap=t.lineGap,this.metrics.subScriptSizeFactor=t.subScriptSizeFactor,this.metrics.superscriptSizeFactor=t.superscriptSizeFactor,this.metrics.isBold=t.isBold},t.prototype.getFontName=function(){for(var t,e="",i=0;i<6;i++){var r=Math.floor(26*Math.random())+0;e+=this.nameString[r]}return e+="+",e+=this.ttfReader.metrics.postScriptName,t=e.toString(),t=this.formatName(t)},t.prototype.formatName=function(t){var e=t.replace("(","#28");return e=e.replace(")","#29"),e=e.replace("[","#5B"),e=e.replace("]","#5D"),e=e.replace("<","#3C"),e=e.replace(">","#3E"),e=e.replace("{","#7B"),e=e.replace("}","#7D"),e=e.replace("/","#2F"),(e=e.replace("%","#25")).replace(" ","#20")},t.prototype.createDescendantFont=function(){this.descendantFont.isFont=!0,this.descendantFont.descendantFontBeginSave=new no(this),this.descendantFont.items.setValue(this.dictionaryProperties.type,new Zn(this.dictionaryProperties.font)),this.descendantFont.items.setValue(this.dictionaryProperties.subtype,new Zn(this.dictionaryProperties.cIDFontType2)),this.descendantFont.items.setValue(this.dictionaryProperties.baseFont,new Zn(this.subsetName)),this.descendantFont.items.setValue(this.dictionaryProperties.cIDToGIDMap,new Zn(this.dictionaryProperties.identity)),this.descendantFont.items.setValue(this.dictionaryProperties.dw,new ho(1e3)),this.fontDescriptor=this.createFontDescriptor(),this.descendantFont.items.setValue(this.dictionaryProperties.fontDescriptor,new Io(this.fontDescriptor));var t=this.createSystemInfo();this.descendantFont.items.setValue(this.dictionaryProperties.cIDSystemInfo,t)},t.prototype.createFontDescriptor=function(){var t=new io,e=this.ttfReader.metrics;return t.isFont=!0,t.items.setValue(this.dictionaryProperties.type,new Zn(this.dictionaryProperties.fontDescriptor)),t.items.setValue(this.dictionaryProperties.fontName,new Zn(this.subsetName)),t.items.setValue(this.dictionaryProperties.flags,new ho(this.getDescriptorFlags())),t.items.setValue(this.dictionaryProperties.fontBBox,uo.fromRectangle(this.getBoundBox())),t.items.setValue(this.dictionaryProperties.missingWidth,new ho(e.widthTable[32])),t.items.setValue(this.dictionaryProperties.stemV,new ho(e.stemV)),t.items.setValue(this.dictionaryProperties.italicAngle,new ho(e.italicAngle)),t.items.setValue(this.dictionaryProperties.capHeight,new ho(e.capHeight)),t.items.setValue(this.dictionaryProperties.ascent,new ho(e.winAscent)),t.items.setValue(this.dictionaryProperties.descent,new ho(e.winDescent)),t.items.setValue(this.dictionaryProperties.leading,new ho(e.leading)),t.items.setValue(this.dictionaryProperties.avgWidth,new ho(e.widthTable[32])),t.items.setValue(this.dictionaryProperties.fontFile2,new Io(this.fontProgram)),t.items.setValue(this.dictionaryProperties.maxWidth,new ho(e.widthTable[32])),t.items.setValue(this.dictionaryProperties.xHeight,new ho(0)),t.items.setValue(this.dictionaryProperties.stemH,new ho(0)),t},t.prototype.createCmap=function(){this.cmap.cmapBeginSave=new Mo(this)},t.prototype.createFontDictionary=function(){this.fontDictionary.isFont=!0,this.fontDictionary.fontDictionaryBeginSave=new oo(this),this.fontDictionary.items.setValue(this.dictionaryProperties.type,new Zn(this.dictionaryProperties.font)),this.fontDictionary.items.setValue(this.dictionaryProperties.baseFont,new Zn(this.subsetName)),this.fontDictionary.items.setValue(this.dictionaryProperties.subtype,new Zn(this.dictionaryProperties.type0)),this.fontDictionary.items.setValue(this.dictionaryProperties.encoding,new Zn(this.dictionaryProperties.identityH));var t=new uo,e=new Io(this.descendantFont);t.isFont=!0,t.add(e),this.fontDictionary.items.setValue(this.dictionaryProperties.descendantFonts,t)},t.prototype.createFontProgram=function(){this.fontProgram.fontProgramBeginSave=new Do(this)},t.prototype.createSystemInfo=function(){var t=new io;return t.items.setValue(this.dictionaryProperties.registry,new Eo("Adobe")),t.items.setValue(this.dictionaryProperties.ordering,new Eo(this.dictionaryProperties.identity)),t.items.setValue(this.dictionaryProperties.supplement,new ho(0)),t},t.prototype.descendantFontBeginSave=function(){if(null!==this.usedChars&&void 0!==this.usedChars&&this.usedChars.size()>0){var t=this.getDescendantWidth();null!==t&&this.descendantFont.items.setValue(this.dictionaryProperties.w,t)}},t.prototype.cmapBeginSave=function(){this.generateCmap()},t.prototype.fontDictionaryBeginSave=function(){null!==this.usedChars&&void 0!==this.usedChars&&this.usedChars.size()>0&&!this.fontDictionary.containsKey(this.dictionaryProperties.toUnicode)&&this.fontDictionary.items.setValue(this.dictionaryProperties.toUnicode,new Io(this.cmap))},t.prototype.fontProgramBeginSave=function(){this.isCompress=!0,this.generateFontProgram()},t.prototype.getDescendantWidth=function(){var t=new uo;if(null!==this.usedChars&&void 0!==this.usedChars&&this.usedChars.size()>0){for(var e=[],i=this.usedChars.keys(),r=0;r<i.length;r++){var n=i[r];(h=this.ttfReader.getGlyph(n)).empty||e.push(h)}e.sort(function(t,e){return t.index-e.index});var o=0,s=0,a=!1,l=new uo;for(r=0;r<e.length;r++){var h=e[r];a||(a=!0,o=h.index,s=h.index-1),(s+1!==h.index||r+1===e.length)&&e.length>1&&(t.add(new ho(o)),0!==r&&t.add(l),o=h.index,l=new uo),l.add(new ho(h.width)),r+1===e.length&&(t.add(new ho(o)),t.add(l)),s=h.index}}return t},t.prototype.generateCmap=function(){if(null!==this.usedChars&&void 0!==this.usedChars&&this.usedChars.size()>0){var t=this.ttfReader.getGlyphChars(this.usedChars);if(t.size()>0){var e=t.keys().sort(),i=e[0],r=e[e.length-1],n=this.toHexString(i,!1)+this.toHexString(r,!1)+to.newLine,o="";o+=this.cmapPrefix,o+=n,o+=this.cmapEndCodespaceRange;for(var s=0,a=0;a<e.length;a++){0===s&&(0!==a&&(o+=this.cmapEndRange),o+=s=Math.min(100,e.length-a),o+=to.whiteSpace,o+=this.cmapBeginRange),s-=1;var l=e[a];o+=this.toHexString(l,!0)+this.toHexString(l,!0)+this.toHexString(t.getValue(l),!0)+"\n"}o+=this.cmapSuffix,this.cmap.clearStream(),this.cmap.isFont=!0,this.cmap.write(o)}}},t.prototype.generateFontProgram=function(){var t=null;this.usedChars=null===this.usedChars||void 0===this.usedChars?new Qn:this.usedChars,this.ttfReader.setOffset(0),t=this.ttfReader.readFontProgram(this.usedChars),this.fontProgram.clearStream(),this.fontProgram.isFont=!0,this.fontProgram.writeBytes(t)},t.prototype.getDescriptorFlags=function(){var t=0,e=this.ttfReader.metrics;return e.isFixedPitch&&(t|=gs.FixedPitch),e.isSymbol?t|=gs.Symbolic:t|=gs.Nonsymbolic,e.isItalic&&(t|=gs.Italic),e.isBold&&(t|=gs.ForceBold),t},t.prototype.getBoundBox=function(){var t=this.ttfReader.metrics.fontBox,e=Math.abs(t.right-t.left),i=Math.abs(t.top-t.bottom);return new ts(t.left,t.bottom,e,i)},t.prototype.toHexString=function(t,e){var i=t.toString(16);return e&&(i=i.toUpperCase()),"<0000".substring(0,5-i.length)+i+">"},t.prototype.setSymbols=function(t){if(null===t)throw new Error("Argument Null Exception : text");null!==this.usedChars&&void 0!==this.usedChars||(this.usedChars=new Qn);for(var e=0;e<t.length;e++){var i=t[e];this.usedChars.setValue(i,String.fromCharCode(0))}!1===this.isEmbedFont&&this.getDescendantWidth()},t}(),Ia=function(){function t(){this.arabicCharTable=[["ء","ﺀ"],["آ","ﺁ","ﺂ"],["أ","ﺃ","ﺄ"],["ؤ","ﺅ","ﺆ"],["إ","ﺇ","ﺈ"],["ئ","ﺉ","ﺊ","ﺋ","ﺌ"],["ا","ﺍ","ﺎ"],["ب","ﺏ","ﺐ","ﺑ","ﺒ"],["ة","ﺓ","ﺔ"],["ت","ﺕ","ﺖ","ﺗ","ﺘ"],["ث","ﺙ","ﺚ","ﺛ","ﺜ"],["ج","ﺝ","ﺞ","ﺟ","ﺠ"],["ح","ﺡ","ﺢ","ﺣ","ﺤ"],["خ","ﺥ","ﺦ","ﺧ","ﺨ"],["د","ﺩ","ﺪ"],["ذ","ﺫ","ﺬ"],["ر","ﺭ","ﺮ"],["ز","ﺯ","ﺰ"],["س","ﺱ","ﺲ","ﺳ","ﺴ"],["ش","ﺵ","ﺶ","ﺷ","ﺸ"],["ص","ﺹ","ﺺ","ﺻ","ﺼ"],["ض","ﺽ","ﺾ","ﺿ","ﻀ"],["ط","ﻁ","ﻂ","ﻃ","ﻄ"],["ظ","ﻅ","ﻆ","ﻇ","ﻈ"],["ع","ﻉ","ﻊ","ﻋ","ﻌ"],["غ","ﻍ","ﻎ","ﻏ","ﻐ"],["ـ","ـ","ـ","ـ","ـ"],["ف","ﻑ","ﻒ","ﻓ","ﻔ"],["ق","ﻕ","ﻖ","ﻗ","ﻘ"],["ك","ﻙ","ﻚ","ﻛ","ﻜ"],["ل","ﻝ","ﻞ","ﻟ","ﻠ"],["م","ﻡ","ﻢ","ﻣ","ﻤ"],["ن","ﻥ","ﻦ","ﻧ","ﻨ"],["ه","ﻩ","ﻪ","ﻫ","ﻬ"],["و","ﻭ","ﻮ"],["ى","ﻯ","ﻰ","ﯨ","ﯩ"],["ي","ﻱ","ﻲ","ﻳ","ﻴ"],["ٱ","ﭐ","ﭑ"],["ٹ","ﭦ","ﭧ","ﭨ","ﭩ"],["ٺ","ﭞ","ﭟ","ﭠ","ﭡ"],["ٻ","ﭒ","ﭓ","ﭔ","ﭕ"],["پ","ﭖ","ﭗ","ﭘ","ﭙ"],["ٿ","ﭢ","ﭣ","ﭤ","ﭥ"],["ڀ","ﭚ","ﭛ","ﭜ","ﭝ"],["ڃ","ﭶ","ﭷ","ﭸ","ﭹ"],["ڄ","ﭲ","ﭳ","ﭴ","ﭵ"],["چ","ﭺ","ﭻ","ﭼ","ﭽ"],["ڇ","ﭾ","ﭿ","ﮀ","ﮁ"],["ڈ","ﮈ","ﮉ"],["ڌ","ﮄ","ﮅ"],["ڍ","ﮂ","ﮃ"],["ڎ","ﮆ","ﮇ"],["ڑ","ﮌ","ﮍ"],["ژ","ﮊ","ﮋ"],["ڤ","ﭪ","ﭫ","ﭬ","ﭭ"],["ڦ","ﭮ","ﭯ","ﭰ","ﭱ"],["ک","ﮎ","ﮏ","ﮐ","ﮑ"],["ڭ","ﯓ","ﯔ","ﯕ","ﯖ"],["گ","ﮒ","ﮓ","ﮔ","ﮕ"],["ڱ","ﮚ","ﮛ","ﮜ","ﮝ"],["ڳ","ﮖ","ﮗ","ﮘ","ﮙ"],["ں","ﮞ","ﮟ"],["ڻ","ﮠ","ﮡ","ﮢ","ﮣ"],["ھ","ﮪ","ﮫ","ﮬ","ﮭ"],["ۀ","ﮤ","ﮥ"],["ہ","ﮦ","ﮧ","ﮨ","ﮩ"],["ۅ","ﯠ","ﯡ"],["ۆ","ﯙ","ﯚ"],["ۇ","ﯗ","ﯘ"],["ۈ","ﯛ","ﯜ"],["ۉ","ﯢ","ﯣ"],["ۋ","ﯞ","ﯟ"],["ی","ﯼ","ﯽ","ﯾ","ﯿ"],["ې","ﯤ","ﯥ","ﯦ","ﯧ"],["ے","ﮮ","ﮯ"],["ۓ","ﮰ","ﮱ"]],this.alef="ا",this.alefHamza="أ",this.alefHamzaBelow="إ",this.alefMadda="آ",this.lam="ل",this.hamza="ء",this.zeroWidthJoiner="",this.hamzaAbove="ٔ",this.hamzaBelow="ٕ",this.wawHamza="ؤ",this.yehHamza="ئ",this.waw="و",this.alefMaksura="ى",this.yeh="ي",this.farsiYeh="ی",this.shadda="ّ",this.madda="ٓ",this.lwa="ﻻ",this.lwawh="ﻷ",this.lwawhb="ﻹ",this.lwawm="ﻵ",this.bwhb="ۓ",this.fathatan="ً",this.superScriptalef="ٰ",this.vowel=1,this.arabicMapTable=new Qn;for(var t=0;t<this.arabicCharTable.length;t++)this.arabicMapTable.setValue(this.arabicCharTable[t][0],this.arabicCharTable[t])}return t.prototype.getCharacterShape=function(t,e){if(t>=this.hamza&&t<=this.bwhb){if(this.arabicMapTable.getValue(t))return this.arabicMapTable.getValue(t)[e+1]}else if(t>=this.lwawm&&t<=this.lwa)return t;return t},t.prototype.shape=function(t,e){for(var i="",r="",n=0;n<t.length;n++){var o=t[n];if(o>=""&&o<="ۿ")r+=o;else{if(r.length>0){i+=this.doShape(r.toString(),0),r=""}i+=o}}if(r.length>0){i+=this.doShape(r.toString(),0)}return i.toString()},t.prototype.doShape=function(t,e){for(var i="",r=0,n=0,o="",s=new Ra,a=new Ra;n<t.length;)if(o=t[n++],0===this.ligature(o,a)){var l=this.getShapeCount(o);r=1===l?0:2,s.Shapes>2&&(r+=1),r%=a.Shapes,a.Value=this.getCharacterShape(a.Value,r),i=this.append(i,s,e),s=a,(a=new Ra).Value=o,a.Shapes=l,a.Ligature++}return r=s.Shapes>2?1:0,r%=a.Shapes,a.Value=this.getCharacterShape(a.Value,r),i=this.append(i,s,e),(i=this.append(i,a,e)).toString()},t.prototype.append=function(t,e,i){return""!==e.Value&&(t+=e.Value,e.Ligature-=1,""!==e.Type&&(0==(i&this.vowel)?(t+=e.Type,e.Ligature-=1):e.Ligature-=1),""!==e.vowel&&(0==(i&this.vowel)?(t+=e.vowel,e.Ligature-=1):e.Ligature-=1)),t},t.prototype.ligature=function(t,e){if(""!==e.Value){var i=0;if(t>=this.fathatan&&t<=this.hamzaBelow||t===this.superScriptalef){if(i=1,""!==e.vowel&&t!==this.shadda&&(i=2),t===this.shadda){if(null!=e.Type)return 0;e.Type=this.shadda}else t===this.hamzaBelow?e.Value===this.alef?(e.Value=this.alefHamzaBelow,i=2):t===this.lwa?(e.Value=this.lwawhb,i=2):e.Type=this.hamzaBelow:t===this.hamzaAbove?e.Value===this.alef?(e.Value=this.alefHamza,i=2):e.Value===this.lwa?(e.Value=this.lwawh,i=2):e.Value===this.waw?(e.Value=this.wawHamza,i=2):e.Value===this.yeh||e.Value===this.alefMaksura||e.Value===this.farsiYeh?(e.Value=this.yehHamza,i=2):e.Type=this.hamzaAbove:t===this.madda?e.Value===this.alef&&(e.Value=this.alefMadda,i=2):e.vowel=t;return 1===i&&e.Ligature++,i}return""!==e.vowel?0:(e.Value===this.lam&&(t===this.alef?(e.Value=this.lwa,e.Shapes=2,i=3):t===this.alefHamza?(e.Value=this.lwawh,e.Shapes=2,i=3):t===this.alefHamzaBelow?(e.Value=this.lwawhb,e.Shapes=2,i=3):t===this.alefMadda&&(e.Value=this.lwawm,e.Shapes=2,i=3)),i)}return 0},t.prototype.getShapeCount=function(t){if(t>=this.hamza&&t<=this.bwhb&&!(t>=this.fathatan&&t<=this.hamzaBelow||t===this.superScriptalef)){if(this.arabicMapTable.getValue(t))return this.arabicMapTable.getValue(t).length-1}else if(t===this.zeroWidthJoiner)return 4;return 1},t}(),Ra=function(){function t(){this.shapeValue="",this.shapeType="",this.shapeVowel="",this.shapeLigature=0,this.shapeShapes=1}return Object.defineProperty(t.prototype,"Value",{get:function(){return this.shapeValue},set:function(t){this.shapeValue=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Type",{get:function(){return this.shapeType},set:function(t){this.shapeType=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vowel",{get:function(){return this.shapeVowel},set:function(t){this.shapeVowel=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Ligature",{get:function(){return this.shapeLigature},set:function(t){this.shapeLigature=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Shapes",{get:function(){return this.shapeShapes},set:function(t){this.shapeShapes=t},enumerable:!0,configurable:!0}),t}(),Aa=function(){function t(){this.indexes=[],this.indexLevels=[],this.mirroringShapeCharacters=new Qn,this.update()}return t.prototype.doMirrorShaping=function(t){for(var e=[],i=0;i<t.length;i++)1==(1&this.indexLevels[i])&&this.mirroringShapeCharacters.containsKey(t[i].charCodeAt(0))?e[i]=String.fromCharCode(this.mirroringShapeCharacters.getValue(t[i].charCodeAt(0))):e[i]=t[i].toString();for(var r="",n=0;n<e.length;n++)r+=e[n];return r},t.prototype.getLogicalToVisualString=function(t,e){var i=new Na;this.indexLevels=i.getVisualOrder(t,e),this.setDefaultIndexLevel(),this.doOrder(0,this.indexLevels.length-1);for(var r=this.doMirrorShaping(t),n="",o=0;o<this.indexes.length;o++){n+=r[this.indexes[o]]}return n.toString()},t.prototype.setDefaultIndexLevel=function(){for(var t=0;t<this.indexLevels.length;t++)this.indexes[t]=t},t.prototype.doOrder=function(t,e){for(var i=this.indexLevels[t],r=i,n=i,o=i,s=t+1;s<=e;++s){var a=this.indexLevels[s];a>i?i=a:a<r&&(r=a),n&=a,o|=a}if(0!=(1&o))if(1!=(1&n))for(r|=1;i>=r;){for(var l=t;;){for(;l<=e&&!(this.indexLevels[l]>=i);)l+=1;if(l>e)break;for(var h=l+1;h<=e&&!(this.indexLevels[h]<i);)h+=1;this.reArrange(l,h),l=h+1}i-=1}else this.reArrange(t,e+1)},t.prototype.reArrange=function(t,e){var i=(t+e)/2;for(--e;t<i;++t,--e){var r=this.indexes[t];this.indexes[t]=this.indexes[e],this.indexes[e]=r}},t.prototype.update=function(){this.mirroringShapeCharacters.setValue(40,41),this.mirroringShapeCharacters.setValue(41,40),this.mirroringShapeCharacters.setValue(60,62),this.mirroringShapeCharacters.setValue(62,60),this.mirroringShapeCharacters.setValue(91,93),this.mirroringShapeCharacters.setValue(93,91),this.mirroringShapeCharacters.setValue(123,125),this.mirroringShapeCharacters.setValue(125,123),this.mirroringShapeCharacters.setValue(171,187),this.mirroringShapeCharacters.setValue(187,171),this.mirroringShapeCharacters.setValue(8249,8250),this.mirroringShapeCharacters.setValue(8250,8249),this.mirroringShapeCharacters.setValue(8261,8262),this.mirroringShapeCharacters.setValue(8262,8261),this.mirroringShapeCharacters.setValue(8317,8318),this.mirroringShapeCharacters.setValue(8318,8317),this.mirroringShapeCharacters.setValue(8333,8334),this.mirroringShapeCharacters.setValue(8334,8333),this.mirroringShapeCharacters.setValue(8712,8715),this.mirroringShapeCharacters.setValue(8713,8716),this.mirroringShapeCharacters.setValue(8714,8717),this.mirroringShapeCharacters.setValue(8715,8712),this.mirroringShapeCharacters.setValue(8716,8713),this.mirroringShapeCharacters.setValue(8717,8714),this.mirroringShapeCharacters.setValue(8725,10741),this.mirroringShapeCharacters.setValue(8764,8765),this.mirroringShapeCharacters.setValue(8765,8764),this.mirroringShapeCharacters.setValue(8771,8909),this.mirroringShapeCharacters.setValue(8786,8787),this.mirroringShapeCharacters.setValue(8787,8786),this.mirroringShapeCharacters.setValue(8788,8789),this.mirroringShapeCharacters.setValue(8789,8788),this.mirroringShapeCharacters.setValue(8804,8805),this.mirroringShapeCharacters.setValue(8805,8804),this.mirroringShapeCharacters.setValue(8806,8807),this.mirroringShapeCharacters.setValue(8807,8806),this.mirroringShapeCharacters.setValue(8808,8809),this.mirroringShapeCharacters.setValue(8809,8808),this.mirroringShapeCharacters.setValue(8810,8811),this.mirroringShapeCharacters.setValue(8811,8810),this.mirroringShapeCharacters.setValue(8814,8815),this.mirroringShapeCharacters.setValue(8815,8814),this.mirroringShapeCharacters.setValue(8816,8817),this.mirroringShapeCharacters.setValue(8817,8816),this.mirroringShapeCharacters.setValue(8818,8819),this.mirroringShapeCharacters.setValue(8819,8818),this.mirroringShapeCharacters.setValue(8820,8821),this.mirroringShapeCharacters.setValue(8821,8820),this.mirroringShapeCharacters.setValue(8822,8823),this.mirroringShapeCharacters.setValue(8823,8822),this.mirroringShapeCharacters.setValue(8824,8825),this.mirroringShapeCharacters.setValue(8825,8824),this.mirroringShapeCharacters.setValue(8826,8827),this.mirroringShapeCharacters.setValue(8827,8826),this.mirroringShapeCharacters.setValue(8828,8829),this.mirroringShapeCharacters.setValue(8829,8828),this.mirroringShapeCharacters.setValue(8830,8831),this.mirroringShapeCharacters.setValue(8831,8830),this.mirroringShapeCharacters.setValue(8832,8833),this.mirroringShapeCharacters.setValue(8833,8832),this.mirroringShapeCharacters.setValue(8834,8835),this.mirroringShapeCharacters.setValue(8835,8834),this.mirroringShapeCharacters.setValue(8836,8837),this.mirroringShapeCharacters.setValue(8837,8836),this.mirroringShapeCharacters.setValue(8838,8839),this.mirroringShapeCharacters.setValue(8839,8838),this.mirroringShapeCharacters.setValue(8840,8841),this.mirroringShapeCharacters.setValue(8841,8840),this.mirroringShapeCharacters.setValue(8842,8843),this.mirroringShapeCharacters.setValue(8843,8842),this.mirroringShapeCharacters.setValue(8847,8848),this.mirroringShapeCharacters.setValue(8848,8847),this.mirroringShapeCharacters.setValue(8849,8850),this.mirroringShapeCharacters.setValue(8850,8849),this.mirroringShapeCharacters.setValue(8856,10680),this.mirroringShapeCharacters.setValue(8866,8867),this.mirroringShapeCharacters.setValue(8867,8866),this.mirroringShapeCharacters.setValue(8870,10974),this.mirroringShapeCharacters.setValue(8872,10980),this.mirroringShapeCharacters.setValue(8873,10979),this.mirroringShapeCharacters.setValue(8875,10981),this.mirroringShapeCharacters.setValue(8880,8881),this.mirroringShapeCharacters.setValue(8881,8880),this.mirroringShapeCharacters.setValue(8882,8883),this.mirroringShapeCharacters.setValue(8883,8882),this.mirroringShapeCharacters.setValue(8884,8885),this.mirroringShapeCharacters.setValue(8885,8884),this.mirroringShapeCharacters.setValue(8886,8887),this.mirroringShapeCharacters.setValue(8887,8886),this.mirroringShapeCharacters.setValue(8905,8906),this.mirroringShapeCharacters.setValue(8906,8905),this.mirroringShapeCharacters.setValue(8907,8908),this.mirroringShapeCharacters.setValue(8908,8907),this.mirroringShapeCharacters.setValue(8909,8771),this.mirroringShapeCharacters.setValue(8912,8913),this.mirroringShapeCharacters.setValue(8913,8912),this.mirroringShapeCharacters.setValue(8918,8919),this.mirroringShapeCharacters.setValue(8919,8918),this.mirroringShapeCharacters.setValue(8920,8921),this.mirroringShapeCharacters.setValue(8921,8920),this.mirroringShapeCharacters.setValue(8922,8923),this.mirroringShapeCharacters.setValue(8923,8922),this.mirroringShapeCharacters.setValue(8924,8925),this.mirroringShapeCharacters.setValue(8925,8924),this.mirroringShapeCharacters.setValue(8926,8927),this.mirroringShapeCharacters.setValue(8927,8926),this.mirroringShapeCharacters.setValue(8928,8929),this.mirroringShapeCharacters.setValue(8929,8928),this.mirroringShapeCharacters.setValue(8930,8931),this.mirroringShapeCharacters.setValue(8931,8930),this.mirroringShapeCharacters.setValue(8932,8933),this.mirroringShapeCharacters.setValue(8933,8932),this.mirroringShapeCharacters.setValue(8934,8935),this.mirroringShapeCharacters.setValue(8935,8934),this.mirroringShapeCharacters.setValue(8936,8937),this.mirroringShapeCharacters.setValue(8937,8936),this.mirroringShapeCharacters.setValue(8938,8939),this.mirroringShapeCharacters.setValue(8939,8938),this.mirroringShapeCharacters.setValue(8940,8941),this.mirroringShapeCharacters.setValue(8941,8940),this.mirroringShapeCharacters.setValue(8944,8945),this.mirroringShapeCharacters.setValue(8945,8944),this.mirroringShapeCharacters.setValue(8946,8954),this.mirroringShapeCharacters.setValue(8947,8955),this.mirroringShapeCharacters.setValue(8948,8956),this.mirroringShapeCharacters.setValue(8950,8957),this.mirroringShapeCharacters.setValue(8951,8958),this.mirroringShapeCharacters.setValue(8954,8946),this.mirroringShapeCharacters.setValue(8955,8947),this.mirroringShapeCharacters.setValue(8956,8948),this.mirroringShapeCharacters.setValue(8957,8950),this.mirroringShapeCharacters.setValue(8958,8951),this.mirroringShapeCharacters.setValue(8968,8969),this.mirroringShapeCharacters.setValue(8969,8968),this.mirroringShapeCharacters.setValue(8970,8971),this.mirroringShapeCharacters.setValue(8971,8970),this.mirroringShapeCharacters.setValue(9001,9002),this.mirroringShapeCharacters.setValue(9002,9001),this.mirroringShapeCharacters.setValue(10088,10089),this.mirroringShapeCharacters.setValue(10089,10088),this.mirroringShapeCharacters.setValue(10090,10091),this.mirroringShapeCharacters.setValue(10091,10090),this.mirroringShapeCharacters.setValue(10092,10093),this.mirroringShapeCharacters.setValue(10093,10092),this.mirroringShapeCharacters.setValue(10094,10095),this.mirroringShapeCharacters.setValue(10095,10094),this.mirroringShapeCharacters.setValue(10096,10097),this.mirroringShapeCharacters.setValue(10097,10096),this.mirroringShapeCharacters.setValue(10098,10099),this.mirroringShapeCharacters.setValue(10099,10098),this.mirroringShapeCharacters.setValue(10100,10101),this.mirroringShapeCharacters.setValue(10101,10100),this.mirroringShapeCharacters.setValue(10197,10198),this.mirroringShapeCharacters.setValue(10198,10197),this.mirroringShapeCharacters.setValue(10205,10206),this.mirroringShapeCharacters.setValue(10206,10205),this.mirroringShapeCharacters.setValue(10210,10211),this.mirroringShapeCharacters.setValue(10211,10210),this.mirroringShapeCharacters.setValue(10212,10213),this.mirroringShapeCharacters.setValue(10213,10212),this.mirroringShapeCharacters.setValue(10214,10215),this.mirroringShapeCharacters.setValue(10215,10214),this.mirroringShapeCharacters.setValue(10216,10217),this.mirroringShapeCharacters.setValue(10217,10216),this.mirroringShapeCharacters.setValue(10218,10219),this.mirroringShapeCharacters.setValue(10219,10218),this.mirroringShapeCharacters.setValue(10627,10628),this.mirroringShapeCharacters.setValue(10628,10627),this.mirroringShapeCharacters.setValue(10629,10630),this.mirroringShapeCharacters.setValue(10630,10629),this.mirroringShapeCharacters.setValue(10631,10632),this.mirroringShapeCharacters.setValue(10632,10631),this.mirroringShapeCharacters.setValue(10633,10634),this.mirroringShapeCharacters.setValue(10634,10633),this.mirroringShapeCharacters.setValue(10635,10636),this.mirroringShapeCharacters.setValue(10636,10635),this.mirroringShapeCharacters.setValue(10637,10640),this.mirroringShapeCharacters.setValue(10638,10639),this.mirroringShapeCharacters.setValue(10639,10638),this.mirroringShapeCharacters.setValue(10640,10637),this.mirroringShapeCharacters.setValue(10641,10642),this.mirroringShapeCharacters.setValue(10642,10641),this.mirroringShapeCharacters.setValue(10643,10644),this.mirroringShapeCharacters.setValue(10644,10643),this.mirroringShapeCharacters.setValue(10645,10646),this.mirroringShapeCharacters.setValue(10646,10645),this.mirroringShapeCharacters.setValue(10647,10648),this.mirroringShapeCharacters.setValue(10648,10647),this.mirroringShapeCharacters.setValue(10680,8856),this.mirroringShapeCharacters.setValue(10688,10689),this.mirroringShapeCharacters.setValue(10689,10688),this.mirroringShapeCharacters.setValue(10692,10693),this.mirroringShapeCharacters.setValue(10693,10692),this.mirroringShapeCharacters.setValue(10703,10704),this.mirroringShapeCharacters.setValue(10704,10703),this.mirroringShapeCharacters.setValue(10705,10706),this.mirroringShapeCharacters.setValue(10706,10705),this.mirroringShapeCharacters.setValue(10708,10709),this.mirroringShapeCharacters.setValue(10709,10708),this.mirroringShapeCharacters.setValue(10712,10713),this.mirroringShapeCharacters.setValue(10713,10712),this.mirroringShapeCharacters.setValue(10714,10715),this.mirroringShapeCharacters.setValue(10715,10714),this.mirroringShapeCharacters.setValue(10741,8725),this.mirroringShapeCharacters.setValue(10744,10745),this.mirroringShapeCharacters.setValue(10745,10744),this.mirroringShapeCharacters.setValue(10748,10749),this.mirroringShapeCharacters.setValue(10749,10748),this.mirroringShapeCharacters.setValue(10795,10796),this.mirroringShapeCharacters.setValue(10796,10795),this.mirroringShapeCharacters.setValue(10797,10796),this.mirroringShapeCharacters.setValue(10798,10797),this.mirroringShapeCharacters.setValue(10804,10805),this.mirroringShapeCharacters.setValue(10805,10804),this.mirroringShapeCharacters.setValue(10812,10813),this.mirroringShapeCharacters.setValue(10813,10812),this.mirroringShapeCharacters.setValue(10852,10853),this.mirroringShapeCharacters.setValue(10853,10852),this.mirroringShapeCharacters.setValue(10873,10874),this.mirroringShapeCharacters.setValue(10874,10873),this.mirroringShapeCharacters.setValue(10877,10878),this.mirroringShapeCharacters.setValue(10878,10877),this.mirroringShapeCharacters.setValue(10879,10880),this.mirroringShapeCharacters.setValue(10880,10879),this.mirroringShapeCharacters.setValue(10881,10882),this.mirroringShapeCharacters.setValue(10882,10881),this.mirroringShapeCharacters.setValue(10883,10884),this.mirroringShapeCharacters.setValue(10884,10883),this.mirroringShapeCharacters.setValue(10891,10892),this.mirroringShapeCharacters.setValue(10892,10891),this.mirroringShapeCharacters.setValue(10897,10898),this.mirroringShapeCharacters.setValue(10898,10897),this.mirroringShapeCharacters.setValue(10899,10900),this.mirroringShapeCharacters.setValue(10900,10899),this.mirroringShapeCharacters.setValue(10901,10902),this.mirroringShapeCharacters.setValue(10902,10901),this.mirroringShapeCharacters.setValue(10903,10904),this.mirroringShapeCharacters.setValue(10904,10903),this.mirroringShapeCharacters.setValue(10905,10906),this.mirroringShapeCharacters.setValue(10906,10905),this.mirroringShapeCharacters.setValue(10907,10908),this.mirroringShapeCharacters.setValue(10908,10907),this.mirroringShapeCharacters.setValue(10913,10914),this.mirroringShapeCharacters.setValue(10914,10913),this.mirroringShapeCharacters.setValue(10918,10919),this.mirroringShapeCharacters.setValue(10919,10918),this.mirroringShapeCharacters.setValue(10920,10921),this.mirroringShapeCharacters.setValue(10921,10920),this.mirroringShapeCharacters.setValue(10922,10923),this.mirroringShapeCharacters.setValue(10923,10922),this.mirroringShapeCharacters.setValue(10924,10925),this.mirroringShapeCharacters.setValue(10925,10924),this.mirroringShapeCharacters.setValue(10927,10928),this.mirroringShapeCharacters.setValue(10928,10927),this.mirroringShapeCharacters.setValue(10931,10932),this.mirroringShapeCharacters.setValue(10932,10931),this.mirroringShapeCharacters.setValue(10939,10940),this.mirroringShapeCharacters.setValue(10940,10939),this.mirroringShapeCharacters.setValue(10941,10942),this.mirroringShapeCharacters.setValue(10942,10941),this.mirroringShapeCharacters.setValue(10943,10944),this.mirroringShapeCharacters.setValue(10944,10943),this.mirroringShapeCharacters.setValue(10945,10946),this.mirroringShapeCharacters.setValue(10946,10945),this.mirroringShapeCharacters.setValue(10947,10948),this.mirroringShapeCharacters.setValue(10948,10947),this.mirroringShapeCharacters.setValue(10949,10950),this.mirroringShapeCharacters.setValue(10950,10949),this.mirroringShapeCharacters.setValue(10957,10958),this.mirroringShapeCharacters.setValue(10958,10957),this.mirroringShapeCharacters.setValue(10959,10960),this.mirroringShapeCharacters.setValue(10960,10959),this.mirroringShapeCharacters.setValue(10961,10962),this.mirroringShapeCharacters.setValue(10962,10961),this.mirroringShapeCharacters.setValue(10963,10964),this.mirroringShapeCharacters.setValue(10964,10963),this.mirroringShapeCharacters.setValue(10965,10966),this.mirroringShapeCharacters.setValue(10966,10965),this.mirroringShapeCharacters.setValue(10974,8870),this.mirroringShapeCharacters.setValue(10979,8873),this.mirroringShapeCharacters.setValue(10980,8872),this.mirroringShapeCharacters.setValue(10981,8875),this.mirroringShapeCharacters.setValue(10988,10989),this.mirroringShapeCharacters.setValue(10989,10988),this.mirroringShapeCharacters.setValue(10999,11e3),this.mirroringShapeCharacters.setValue(11e3,10999),this.mirroringShapeCharacters.setValue(11001,11002),this.mirroringShapeCharacters.setValue(11002,11001),this.mirroringShapeCharacters.setValue(12296,12297),this.mirroringShapeCharacters.setValue(12297,12296),this.mirroringShapeCharacters.setValue(12298,12299),this.mirroringShapeCharacters.setValue(12299,12298),this.mirroringShapeCharacters.setValue(12300,12301),this.mirroringShapeCharacters.setValue(12301,12300),this.mirroringShapeCharacters.setValue(12302,12303),this.mirroringShapeCharacters.setValue(12303,12302),this.mirroringShapeCharacters.setValue(12304,12305),this.mirroringShapeCharacters.setValue(12305,12304),this.mirroringShapeCharacters.setValue(12308,12309),this.mirroringShapeCharacters.setValue(12309,12308),this.mirroringShapeCharacters.setValue(12310,12311),this.mirroringShapeCharacters.setValue(12311,12310),this.mirroringShapeCharacters.setValue(12312,12313),this.mirroringShapeCharacters.setValue(12313,12312),this.mirroringShapeCharacters.setValue(12314,12315),this.mirroringShapeCharacters.setValue(12315,12314),this.mirroringShapeCharacters.setValue(65288,65289),this.mirroringShapeCharacters.setValue(65289,65288),this.mirroringShapeCharacters.setValue(65308,65310),this.mirroringShapeCharacters.setValue(65310,65308),this.mirroringShapeCharacters.setValue(65339,65341),this.mirroringShapeCharacters.setValue(65341,65339),this.mirroringShapeCharacters.setValue(65371,65373),this.mirroringShapeCharacters.setValue(65373,65371),this.mirroringShapeCharacters.setValue(65375,65376),this.mirroringShapeCharacters.setValue(65376,65375),this.mirroringShapeCharacters.setValue(65378,65379),this.mirroringShapeCharacters.setValue(65379,65378)},t}(),Na=function(){function t(){this.types=[],this.textOrder=-1,this.rtlCharacterTypes=new Array(65536),this.L=0,this.LRE=1,this.LRO=2,this.R=3,this.AL=4,this.RLE=5,this.RLO=6,this.PDF=7,this.EN=8,this.ES=9,this.ET=10,this.AN=11,this.CS=12,this.NSM=13,this.BN=14,this.B=15,this.S=16,this.WS=17,this.ON=18,this.charTypes=[this.L,this.EN,this.BN,this.ES,this.ES,this.S,this.ET,this.ET,this.B,this.AN,this.AN,this.S,this.CS,this.CS,this.WS,this.NSM,this.NSM,this.B,this.BN,27,this.BN,28,30,this.B,31,31,this.S,32,32,this.WS,33,34,this.ON,35,37,this.ET,38,42,this.ON,43,43,this.ET,44,44,this.CS,45,45,this.ET,46,46,this.CS,47,47,this.CS,48,57,this.EN,58,58,this.CS,59,64,this.ON,65,90,this.L,91,96,this.ON,97,122,this.L,123,126,this.ON,127,132,this.BN,133,133,this.B,134,159,this.BN,160,160,this.CS,161,161,this.ON,162,165,this.ET,166,169,this.ON,170,170,this.L,171,175,this.ON,176,177,this.ET,178,179,this.EN,180,180,this.ON,181,181,this.L,182,184,this.ON,185,185,this.EN,186,186,this.L,187,191,this.ON,192,214,this.L,215,215,this.ON,216,246,this.L,247,247,this.ON,248,696,this.L,697,698,this.ON,699,705,this.L,706,719,this.ON,720,721,this.L,722,735,this.ON,736,740,this.L,741,749,this.ON,750,750,this.L,751,767,this.ON,768,855,this.NSM,856,860,this.L,861,879,this.NSM,880,883,this.L,884,885,this.ON,886,893,this.L,894,894,this.ON,895,899,this.L,900,901,this.ON,902,902,this.L,903,903,this.ON,904,1013,this.L,1014,1014,this.ON,1015,1154,this.L,1155,1158,this.NSM,1159,1159,this.L,1160,1161,this.NSM,1162,1417,this.L,1418,1418,this.ON,1419,1424,this.L,1425,1441,this.NSM,1442,1442,this.L,1443,1465,this.NSM,1466,1466,this.L,1467,1469,this.NSM,1470,1470,this.R,1471,1471,this.NSM,1472,1472,this.R,1473,1474,this.NSM,1475,1475,this.R,1476,1476,this.NSM,1477,1487,this.L,1488,1514,this.R,1515,1519,this.L,1520,1524,this.R,1525,1535,this.L,1536,1539,this.AL,1540,1547,this.L,1548,1548,this.CS,1549,1549,this.AL,1550,1551,this.ON,1552,1557,this.NSM,1558,1562,this.L,1563,1563,this.AL,1564,1566,this.L,1567,1567,this.AL,1568,1568,this.L,1569,1594,this.AL,1595,1599,this.L,1600,1610,this.AL,1611,1624,this.NSM,1625,1631,this.L,1632,1641,this.AN,1642,1642,this.ET,1643,1644,this.AN,1645,1647,this.AL,1648,1648,this.NSM,1649,1749,this.AL,1750,1756,this.NSM,1757,1757,this.AL,1758,1764,this.NSM,1765,1766,this.AL,1767,1768,this.NSM,1769,1769,this.ON,1770,1773,this.NSM,1774,1775,this.AL,1776,1785,this.EN,1786,1805,this.AL,1806,1806,this.L,1807,1807,this.BN,1808,1808,this.AL,1809,1809,this.NSM,1810,1839,this.AL,1840,1866,this.NSM,1867,1868,this.L,1869,1871,this.AL,1872,1919,this.L,1920,1957,this.AL,1958,1968,this.NSM,1969,1969,this.AL,1970,2304,this.L,2305,2306,this.NSM,2307,2363,this.L,2364,2364,this.NSM,2365,2368,this.L,2369,2376,this.NSM,2377,2380,this.L,2381,2381,this.NSM,2382,2384,this.L,2385,2388,this.NSM,2389,2401,this.L,2402,2403,this.NSM,2404,2432,this.L,2433,2433,this.NSM,2434,2491,this.L,2492,2492,this.NSM,2493,2496,this.L,2497,2500,this.NSM,2501,2508,this.L,2509,2509,this.NSM,2510,2529,this.L,2530,2531,this.NSM,2532,2545,this.L,2546,2547,this.ET,2548,2560,this.L,2561,2562,this.NSM,2563,2619,this.L,2620,2620,this.NSM,2621,2624,this.L,2625,2626,this.NSM,2627,2630,this.L,2631,2632,this.NSM,2633,2634,this.L,2635,2637,this.NSM,2638,2671,this.L,2672,2673,this.NSM,2674,2688,this.L,2689,2690,this.NSM,2691,2747,this.L,2748,2748,this.NSM,2749,2752,this.L,2753,2757,this.NSM,2758,2758,this.L,2759,2760,this.NSM,2761,2764,this.L,2765,2765,this.NSM,2766,2785,this.L,2786,2787,this.NSM,2788,2800,this.L,2801,2801,this.ET,2802,2816,this.L,2817,2817,this.NSM,2818,2875,this.L,2876,2876,this.NSM,2877,2878,this.L,2879,2879,this.NSM,2880,2880,this.L,2881,2883,this.NSM,2884,2892,this.L,2893,2893,this.NSM,2894,2901,this.L,2902,2902,this.NSM,2903,2945,this.L,2946,2946,this.NSM,2947,3007,this.L,3008,3008,this.NSM,3009,3020,this.L,3021,3021,this.NSM,3022,3058,this.L,3059,3064,this.ON,3065,3065,this.ET,3066,3066,this.ON,3067,3133,this.L,3134,3136,this.NSM,3137,3141,this.L,3142,3144,this.NSM,3145,3145,this.L,3146,3149,this.NSM,3150,3156,this.L,3157,3158,this.NSM,3159,3259,this.L,3260,3260,this.NSM,3261,3275,this.L,3276,3277,this.NSM,3278,3392,this.L,3393,3395,this.NSM,3396,3404,this.L,3405,3405,this.NSM,3406,3529,this.L,3530,3530,this.NSM,3531,3537,this.L,3538,3540,this.NSM,3541,3541,this.L,3542,3542,this.NSM,3543,3632,this.L,3633,3633,this.NSM,3634,3635,this.L,3636,3642,this.NSM,3643,3646,this.L,3647,3647,this.ET,3648,3654,this.L,3655,3662,this.NSM,3663,3760,this.L,3761,3761,this.NSM,3762,3763,this.L,3764,3769,this.NSM,3770,3770,this.L,3771,3772,this.NSM,3773,3783,this.L,3784,3789,this.NSM,3790,3863,this.L,3864,3865,this.NSM,3866,3892,this.L,3893,3893,this.NSM,3894,3894,this.L,3895,3895,this.NSM,3896,3896,this.L,3897,3897,this.NSM,3898,3901,this.ON,3902,3952,this.L,3953,3966,this.NSM,3967,3967,this.L,3968,3972,this.NSM,3973,3973,this.L,3974,3975,this.NSM,3976,3983,this.L,3984,3991,this.NSM,3992,3992,this.L,3993,4028,this.NSM,4029,4037,this.L,4038,4038,this.NSM,4039,4140,this.L,4141,4144,this.NSM,4145,4145,this.L,4146,4146,this.NSM,4147,4149,this.L,4150,4151,this.NSM,4152,4152,this.L,4153,4153,this.NSM,4154,4183,this.L,4184,4185,this.NSM,4186,5759,this.L,5760,5760,this.WS,5761,5786,this.L,5787,5788,this.ON,5789,5905,this.L,5906,5908,this.NSM,5909,5937,this.L,5938,5940,this.NSM,5941,5969,this.L,5970,5971,this.NSM,5972,6001,this.L,6002,6003,this.NSM,6004,6070,this.L,6071,6077,this.NSM,6078,6085,this.L,6086,6086,this.NSM,6087,6088,this.L,6089,6099,this.NSM,6100,6106,this.L,6107,6107,this.ET,6108,6108,this.L,6109,6109,this.NSM,6110,6127,this.L,6128,6137,this.ON,6138,6143,this.L,6144,6154,this.ON,6155,6157,this.NSM,6158,6158,this.WS,6159,6312,this.L,6313,6313,this.NSM,6314,6431,this.L,6432,6434,this.NSM,6435,6438,this.L,6439,6443,this.NSM,6444,6449,this.L,6450,6450,this.NSM,6451,6456,this.L,6457,6459,this.NSM,6460,6463,this.L,6464,6464,this.ON,6465,6467,this.L,6468,6469,this.ON,6470,6623,this.L,6624,6655,this.ON,6656,8124,this.L,8125,8125,this.ON,8126,8126,this.L,8127,8129,this.ON,8130,8140,this.L,8141,8143,this.ON,8144,8156,this.L,8157,8159,this.ON,8160,8172,this.L,8173,8175,this.ON,8176,8188,this.L,8189,8190,this.ON,8191,8191,this.L,8192,8202,this.WS,8203,8205,this.BN,8206,8206,this.L,8207,8207,this.R,8208,8231,this.ON,8232,8232,this.WS,8233,8233,this.B,8234,8234,this.LRE,8235,8235,this.RLE,8236,8236,this.PDF,8237,8237,this.LRO,8238,8238,this.RLO,8239,8239,this.WS,8240,8244,this.ET,8245,8276,this.ON,8277,8278,this.L,8279,8279,this.ON,8280,8286,this.L,8287,8287,this.WS,8288,8291,this.BN,8292,8297,this.L,8298,8303,this.BN,8304,8304,this.EN,8305,8307,this.L,8308,8313,this.EN,8314,8315,this.ET,8316,8318,this.ON,8319,8319,this.L,8320,8329,this.EN,8330,8331,this.ET,8332,8334,this.ON,8335,8351,this.L,8352,8369,this.ET,8370,8399,this.L,8400,8426,this.NSM,8427,8447,this.L,8448,8449,this.ON,8450,8450,this.L,8451,8454,this.ON,8455,8455,this.L,8456,8457,this.ON,8458,8467,this.L,8468,8468,this.ON,8469,8469,this.L,8470,8472,this.ON,8473,8477,this.L,8478,8483,this.ON,8484,8484,this.L,8485,8485,this.ON,8486,8486,this.L,8487,8487,this.ON,8488,8488,this.L,8489,8489,this.ON,8490,8493,this.L,8494,8494,this.ET,8495,8497,this.L,8498,8498,this.ON,8499,8505,this.L,8506,8507,this.ON,8508,8511,this.L,8512,8516,this.ON,8517,8521,this.L,8522,8523,this.ON,8524,8530,this.L,8531,8543,this.ON,8544,8591,this.L,8592,8721,this.ON,8722,8723,this.ET,8724,9013,this.ON,9014,9082,this.L,9083,9108,this.ON,9109,9109,this.L,9110,9168,this.ON,9169,9215,this.L,9216,9254,this.ON,9255,9279,this.L,9280,9290,this.ON,9291,9311,this.L,9312,9371,this.EN,9372,9449,this.L,9450,9450,this.EN,9451,9751,this.ON,9752,9752,this.L,9753,9853,this.ON,9854,9855,this.L,9856,9873,this.ON,9874,9887,this.L,9888,9889,this.ON,9890,9984,this.L,9985,9988,this.ON,9989,9989,this.L,9990,9993,this.ON,9994,9995,this.L,9996,10023,this.ON,10024,10024,this.L,10025,10059,this.ON,10060,10060,this.L,10061,10061,this.ON,10062,10062,this.L,10063,10066,this.ON,10067,10069,this.L,10070,10070,this.ON,10071,10071,this.L,10072,10078,this.ON,10079,10080,this.L,10081,10132,this.ON,10133,10135,this.L,10136,10159,this.ON,10160,10160,this.L,10161,10174,this.ON,10175,10191,this.L,10192,10219,this.ON,10220,10223,this.L,10224,11021,this.ON,11022,11903,this.L,11904,11929,this.ON,11930,11930,this.L,11931,12019,this.ON,12020,12031,this.L,12032,12245,this.ON,12246,12271,this.L,12272,12283,this.ON,12284,12287,this.L,12288,12288,this.WS,12289,12292,this.ON,12293,12295,this.L,12296,12320,this.ON,12321,12329,this.L,12330,12335,this.NSM,12336,12336,this.ON,12337,12341,this.L,12342,12343,this.ON,12344,12348,this.L,12349,12351,this.ON,12352,12440,this.L,12441,12442,this.NSM,12443,12444,this.ON,12445,12447,this.L,12448,12448,this.ON,12449,12538,this.L,12539,12539,this.ON,12540,12828,this.L,12829,12830,this.ON,12831,12879,this.L,12880,12895,this.ON,12896,12923,this.L,12924,12925,this.ON,12926,12976,this.L,12977,12991,this.ON,12992,13003,this.L,13004,13007,this.ON,13008,13174,this.L,13175,13178,this.ON,13179,13277,this.L,13278,13279,this.ON,13280,13310,this.L,13311,13311,this.ON,13312,19903,this.L,19904,19967,this.ON,19968,42127,this.L,42128,42182,this.ON,42183,64284,this.L,64285,64285,this.R,64286,64286,this.NSM,64287,64296,this.R,64297,64297,this.ET,64298,64310,this.R,64311,64311,this.L,64312,64316,this.R,64317,64317,this.L,64318,64318,this.R,64319,64319,this.L,64320,64321,this.R,64322,64322,this.L,64323,64324,this.R,64325,64325,this.L,64326,64335,this.R,64336,64433,this.AL,64434,64466,this.L,64467,64829,this.AL,64830,64831,this.ON,64832,64847,this.L,64848,64911,this.AL,64912,64913,this.L,64914,64967,this.AL,64968,65007,this.L,65008,65020,this.AL,65021,65021,this.ON,65022,65023,this.L,65024,65039,this.NSM,65040,65055,this.L,65056,65059,this.NSM,65060,65071,this.L,65072,65103,this.ON,65104,65104,this.CS,65105,65105,this.ON,65106,65106,this.CS,65107,65107,this.L,65108,65108,this.ON,65109,65109,this.CS,65110,65118,this.ON,65119,65119,this.ET,65120,65121,this.ON,65122,65123,this.ET,65124,65126,this.ON,65127,65127,this.L,65128,65128,this.ON,65129,65130,this.ET,65131,65131,this.ON,65132,65135,this.L,65136,65140,this.AL,65141,65141,this.L,65142,65276,this.AL,65277,65278,this.L,65279,65279,this.BN,65280,65280,this.L,65281,65282,this.ON,65283,65285,this.ET,65286,65290,this.ON,65291,65291,this.ET,65292,65292,this.CS,65293,65293,this.ET,65294,65294,this.CS,65295,65295,this.ES,65296,65305,this.EN,65306,65306,this.CS,65307,65312,this.ON,65313,65338,this.L,65339,65344,this.ON,65345,65370,this.L,65371,65381,this.ON,65382,65503,this.L,65504,65505,this.ET,65506,65508,this.ON,65509,65510,this.ET,65511,65511,this.L,65512,65518,this.ON,65519,65528,this.L,65529,65531,this.BN,65532,65533,this.ON,65534,65535,this.L];for(var t=0;t<this.charTypes.length;++t)for(var e=this.charTypes[t],i=this.charTypes[++t],r=this.charTypes[++t];e<=i;)this.rtlCharacterTypes[e++]=r}return t.prototype.getVisualOrder=function(t,e){this.types=this.getCharacterCode(t),this.textOrder=e?this.LRE:this.L,this.doVisualOrder();for(var i=[],r=0;r<this.levels.length;r++)i[r]=this.levels[r];return i},t.prototype.getCharacterCode=function(t){for(var e=[],i=0;i<t.length;i++)e[i]=this.rtlCharacterTypes[t[i].charCodeAt(0)];return e},t.prototype.setDefaultLevels=function(){for(var t=0;t<this.length;t++)this.levels[t]=this.textOrder},t.prototype.setLevels=function(){this.setDefaultLevels();for(var t=0;t<this.length;++t){var e=this.levels[t];0!=(128&e)&&(e&=127,this.result[t]=0==(1&e)?this.L:this.R),this.levels[t]=e}},t.prototype.updateLevels=function(t,e,i){if(0==(1&e))for(var r=t;r<i;++r)this.result[r]===this.R?this.levels[r]+=1:this.result[r]!==this.L&&(this.levels[r]+=2);else for(r=t;r<i;++r)this.result[r]!==this.R&&(this.levels[r]+=1)},t.prototype.doVisualOrder=function(){this.length=this.types.length,this.result=this.types,this.levels=[],this.setLevels(),this.length=this.getEmbeddedCharactersLength();for(var t=this.textOrder,e=0;e<this.length;){for(var i=this.levels[e],r=0==(1&Math.max(t,i))?this.L:this.R,n=e+1;n<this.length&&this.levels[n]===i;)++n;var o=n<this.length?this.levels[n]:this.textOrder,s=0==(1&Math.max(o,i))?this.L:this.R;this.checkNSM(e,n,i,r,s),this.updateLevels(e,i,n),t=i,e=n}this.checkEmbeddedCharacters(this.length)},t.prototype.getEmbeddedCharactersLength=function(){for(var t=0,e=0;e<this.length;++e)this.types[e]!==this.LRE&&this.types[e]!==this.RLE&&this.types[e]!==this.LRO&&this.types[e]!==this.RLO&&this.types[e]!==this.PDF&&this.types[e]!==this.BN&&(this.result[t]=this.result[e],this.levels[t]=this.levels[e],t++);return t},t.prototype.checkEmbeddedCharacters=function(t){for(var e=this.types.length-1;e>=0;--e)this.types[e]===this.LRE||this.types[e]===this.RLE||this.types[e]===this.LRO||this.types[e]===this.RLO||this.types[e]===this.PDF||this.types[e]===this.BN?(this.result[e]=this.types[e],this.levels[e]=-1):(t-=1,this.result[e]=this.result[t],this.levels[e]=this.levels[t]);for(e=0;e<this.types.length;e++)-1===this.levels[e]&&(this.levels[e]=0===e?this.textOrder:this.levels[e-1])},t.prototype.checkNSM=function(t,e,i,r,n){for(var o=r,s=t;s<e;++s)this.result[s]===this.NSM?this.result[s]=o:o=this.result[s];this.checkEuropeanDigits(t,e,i,r,n)},t.prototype.checkEuropeanDigits=function(t,e,i,r,n){for(var o=t;o<e;++o)if(this.result[o]===this.EN)for(var s=o-1;s>=t;--s)if(this.result[s]===this.L||this.result[s]===this.R||this.result[s]===this.AL){this.result[s]===this.AL&&(this.result[o]=this.AN);break}this.checkArabicCharacters(t,e,i,r,n)},t.prototype.checkArabicCharacters=function(t,e,i,r,n){for(var o=t;o<e;++o)this.result[o]===this.AL&&(this.result[o]=this.R);this.checkEuropeanNumberSeparator(t,e,i,r,n)},t.prototype.checkEuropeanNumberSeparator=function(t,e,i,r,n){for(var o=t+1;o<e-1;++o)if(this.result[o]===this.ES||this.result[o]===this.CS){var s=this.result[o-1],a=this.result[o+1];s===this.EN&&a===this.EN?this.result[o]=this.EN:this.result[o]===this.CS&&s===this.AN&&a===this.AN&&(this.result[o]=this.AN)}this.checkEuropeanNumberTerminator(t,e,i,r,n)},t.prototype.checkEuropeanNumberTerminator=function(t,e,i,r,n){for(var o=t;o<e;++o)if(this.result[o]===this.ET){var s=o,a=[];a.push(this.ET);var l=this.getLength(s,e,a),h=s===t?r:this.result[s-1];if(h!==this.EN&&(h=l===e?n:this.result[l]),h===this.EN)for(var u=s;u<l;++u)this.result[u]=this.EN;o=l}this.checkOtherNeutrals(t,e,i,r,n)},t.prototype.checkOtherNeutrals=function(t,e,i,r,n){for(var o=t;o<e;++o)this.result[o]!==this.ES&&this.result[o]!==this.ET&&this.result[o]!==this.CS||(this.result[o]=this.ON);this.checkOtherCharacters(t,e,i,r,n)},t.prototype.checkOtherCharacters=function(t,e,i,r,n){for(var o=t;o<e;++o)if(this.result[o]===this.EN){for(var s=r,a=o-1;a>=t;--a)if(this.result[a]===this.L||this.result[a]===this.R){s=this.result[a];break}s===this.L&&(this.result[o]=this.L)}this.checkCommanCharacters(t,e,i,r,n)},t.prototype.getLength=function(t,e,i){for(--t;++t<e;){for(var r=this.result[t],n=0;n<i.length;++n)r===i[n]&&(t=this.getLength(++t,e,i));return t}return e},t.prototype.checkCommanCharacters=function(t,e,i,r,n){for(var o=t;o<e;++o)if(this.result[o]===this.WS||this.result[o]===this.ON||this.result[o]===this.B||this.result[o]===this.S){var s=o,a=[this.B,this.S,this.WS,this.ON],l=this.getLength(s,e,a),h=0,u=0,c=0;s===t?h=r:(h=this.result[s-1])===this.AN?h=this.R:h===this.EN&&(h=this.R),l===e?u=n:(u=this.result[l])===this.AN?u=this.R:u===this.EN&&(u=this.R),c=h===u?h:0==(1&i)?this.L:this.R;for(var p=s;p<l;++p)this.result[p]=c;o=l}},t}(),Fa=function(){function t(){this.openBracket="(",this.closeBracket=")"}return t.prototype.layout=function(t,e,i,r,n){if(null==t)throw new Error("ArgumentNullException : line");if(null==e)throw new Error("ArgumentNullException : font");var o=[];return e.Unicode?o=this.customLayout(t,i,n,e,r):(o=[])[0]=t,o},t.prototype.splitLayout=function(t,e,i,r,n){if(null==t)throw new Error("ArgumentNullException : line");if(null==e)throw new Error("ArgumentNullException : font");return this.customSplitLayout(t,e,i,r,n)},t.prototype.getGlyphIndex=function(t,e,i,r,n){if(null==t)throw new Error("ArgumentNullException : line");if(null==e)throw new Error("ArgumentNullException : font");if(r=null,0===t.length)return{success:!1,glyphs:r};var o=(new Ia).shape(t,0),s=e.fontInternal.ttfReader;r=new Uint16Array(o.length);for(var a=0,l=0,h=o.length;l<h;l++){var u=o[l],c=s.getGlyph(u);null!==c&&void 0!==c&&(r[a++]=c.index)}return{success:!0,glyphs:r}},t.prototype.customLayout=function(t,e,i,r,n){if(null===n||void 0===n){if(null==t)throw new Error("ArgumentNullException : line");var o=null;if(null!==i&&void 0!==i&&i.textDirection!==$o.None){o=(new Aa).getLogicalToVisualString(t,e)}return o}if(null==t)throw new Error("ArgumentNullException : line");if(null==r)throw new Error("ArgumentNullException : font");var s=null;if(null!==i&&void 0!==i&&i.textDirection!==$o.None){var a=(new Ia).shape(t,0);s=this.customLayout(a,e,i)}o=[];if(n){for(var l=s.split(""),h=l.length,u=0;u<h;u++)l[u]=this.addChars(r,l[u]);o=l}else(o=[])[0]=this.addChars(r,s);return o},t.prototype.addChars=function(t,e){var i=e;if(null==t)throw new Error("ArgumentNullException : font");if(null==i)throw new Error("ArgumentNullException : line");var r=i,n=t.fontInternal.ttfReader;t.setSymbols(r),r=n.convertString(r);var o=Eo.toUnicodeArray(r,!1);return r=Eo.byteToString(o)},t.prototype.customSplitLayout=function(t,e,i,r,n){if(null==t)throw new Error("ArgumentNullException : line");if(null==e)throw new Error("ArgumentNullException : font");return this.customLayout(t,i,n).split("")},t}();!function(t){t[t.Paginate=0]="Paginate",t[t.OnePage=1]="OnePage"}(na||(na={}));var Va;!function(t){t[t.FitPage=0]="FitPage",t[t.FitElement=1]="FitElement",t[t.FitColumnsToPage=2]="FitColumnsToPage"}(Va||(Va={}));var za;!function(t){t[t.Start=0]="Start",t[t.Line=1]="Line",t[t.Bezier3=3]="Bezier3",t[t.Bezier=3]="Bezier",t[t.PathTypeMask=7]="PathTypeMask",t[t.DashMode=16]="DashMode",t[t.PathMarker=32]="PathMarker",t[t.CloseSubpath=128]="CloseSubpath"}(za||(za={}));var Ga,_a=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ha=function(t){function e(e){var i=t.call(this)||this;return i.mbackground=new Xo(255,255,255),i.mbStroking=!1,i.mfunction=null,i.dictionaryProperties=new eo,i.mpatternDictionary=new io,i.mpatternDictionary.items.setValue(i.dictionaryProperties.type,new Zn(i.dictionaryProperties.pattern)),i.mpatternDictionary.items.setValue(i.dictionaryProperties.patternType,new ho(2)),i.shading=e,i.colorSpace=Uo.Rgb,i}return _a(e,t),Object.defineProperty(e.prototype,"background",{get:function(){return this.mbackground},set:function(t){this.mbackground=t;var e=this.shading;t.isEmpty?e.remove(this.dictionaryProperties.background):e.items.setValue(this.dictionaryProperties.background,t.toArray(this.colorSpace))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"antiAlias",{get:function(){return this.shading.items.getValue(this.dictionaryProperties.antiAlias).value},set:function(t){var e=this.shading,i=e.items.getValue(this.dictionaryProperties.antiAlias);null==i&&void 0===i?(i=new ra(t),e.items.setValue(this.dictionaryProperties.antiAlias,i)):i.value=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"function",{get:function(){return this.mfunction},set:function(t){this.mfunction=t,null!=t&&void 0!==t?this.shading.items.setValue(this.dictionaryProperties.function,new Io(this.mfunction)):this.shading.remove(this.dictionaryProperties.function)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bBox",{get:function(){return this.shading.items.getValue(this.dictionaryProperties.bBox)},set:function(t){var e=this.shading;null==t&&void 0===t?e.remove(this.dictionaryProperties.bBox):e.items.setValue(this.dictionaryProperties.bBox,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorSpace",{get:function(){return this.mcolorSpace},set:function(t){var e=this.shading.items.getValue(this.dictionaryProperties.colorSpace);if(t!==this.mcolorSpace||null==e){this.mcolorSpace=t;var i=this.colorSpaceToDeviceName(t);this.shading.items.setValue(this.dictionaryProperties.colorSpace,new Zn(i))}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stroking",{get:function(){return this.mbStroking},set:function(t){this.mbStroking=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"patternDictionary",{get:function(){return null==this.mpatternDictionary&&(this.mpatternDictionary=new io),this.mpatternDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"shading",{get:function(){return this.mshading},set:function(t){if(null==t)throw new Error("ArgumentNullException : Shading");t!==this.mshading&&(this.mshading=t,this.patternDictionary.items.setValue(this.dictionaryProperties.shading,new Io(this.mshading)))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"matrix",{get:function(){return this.mmatrix},set:function(t){if(null==t)throw new Error("ArgumentNullException : Matrix");if(t!==this.mmatrix){this.mmatrix=t.clone();var e=new uo(this.mmatrix.matrix.elements);this.mpatternDictionary.items.setValue(this.dictionaryProperties.matrix,e)}},enumerable:!0,configurable:!0}),e.prototype.monitorChanges=function(t,i,r,n,o){var s=!1;if(t instanceof e){this.colorSpace!==o&&(this.colorSpace=o,this.resetFunction()),i.setColorSpace("Pattern",this.mbStroking);var a=r.getResources().getName(this);i.setColourWithPattern(null,a,this.mbStroking),s=!0}return s},e.prototype.resetChanges=function(t){},e.prototype.colorSpaceToDeviceName=function(t){var e;switch(t){case Uo.Rgb:e="DeviceRGB"}return e},e.prototype.resetPatternDictionary=function(t){this.mpatternDictionary=t},e.prototype.cloneAntiAliasingValue=function(t){if(null==t)throw new Error("ArgumentNullException : brush");var e=this.shading.items.getValue(this.dictionaryProperties.antiAlias);null!=e&&t.shading.items.setValue(this.dictionaryProperties.antiAlias,new ra(e.value))},e.prototype.cloneBackgroundValue=function(t){var e=this.background;e.isEmpty||(t.background=e)},Object.defineProperty(e.prototype,"element",{get:function(){return this.patternDictionary},enumerable:!0,configurable:!0}),e}(is),Wa=function(){function t(t,e){if(this.dictionaryProperties=new eo,this.writeTransformation=!0,void 0===t);else if(t instanceof Zo&&void 0===e){this.content=new To;var i=new Zo(t.width,t.height);this.setSize(i),this.initialize()}else this.content=new To,this.setSize(new Zo(t,e)),this.initialize()}return Object.defineProperty(t.prototype,"size",{get:function(){return this.templateSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.size.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.size.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphics",{get:function(){if(null==this.pdfGraphics||void 0===this.pdfGraphics){var t=new Xa(this),e=new Ja(this.size,t,this.content);this.pdfGraphics=e,this.pdfGraphics.initializeCoordinates()}return this.pdfGraphics},enumerable:!0,configurable:!0}),t.prototype.getResources=function(){return null==this.resources&&(this.resources=new qa,this.content.items.setValue(this.dictionaryProperties.resources,this.resources)),this.resources},t.prototype.initialize=function(){this.addType(),this.addSubType()},t.prototype.addType=function(){var t=new Zn(this.dictionaryProperties.xObject);this.content.items.setValue(this.dictionaryProperties.type,t)},t.prototype.addSubType=function(){var t=new Zn(this.dictionaryProperties.form);this.content.items.setValue(this.dictionaryProperties.subtype,t)},t.prototype.reset=function(t){void 0===t?(null!=this.resources&&(this.resources=null,this.content.remove(this.dictionaryProperties.resources)),null!=this.graphics&&this.graphics.reset(this.size)):(this.setSize(t),this.reset())},t.prototype.setSize=function(t){var e=new ts(new Qo(0,0),t),i=uo.fromRectangle(e);this.content.items.setValue(this.dictionaryProperties.bBox,i),this.templateSize=t},Object.defineProperty(t.prototype,"element",{get:function(){return this.content},enumerable:!0,configurable:!0}),t}(),Ua=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),qa=function(t){function e(e){var i=t.call(this,e)||this;return i.properties=new io,i}return Ua(e,t),Object.defineProperty(e.prototype,"names",{get:function(){return this.getNames()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"document",{get:function(){return this.pdfDocument},set:function(t){this.pdfDocument=t},enumerable:!0,configurable:!0}),e.prototype.getName=function(t){var e=t.element,i=null;if(this.names.containsKey(e)&&(i=this.names.getValue(e)),null==i){var r=this.generateName();i=new Zn(r),this.names.setValue(e,i),t instanceof xs?this.add(t,i):t instanceof Wa?this.add(t,i):t instanceof Ha||t instanceof $a?this.add(t,i):t instanceof Js?this.add(t,i):(t instanceof aa||t instanceof ha)&&this.add(t,i)}return i},e.prototype.getNames=function(){null==this.pdfNames&&(this.pdfNames=new $s);var t=this.items.getValue(this.dictionaryProperties.font);if(null!=t){js.dereference(t)}return this.pdfNames},e.prototype.requireProcedureSet=function(t){if(null==t)throw new Error("ArgumentNullException:procedureSetName");var e=this.items.getValue(this.dictionaryProperties.procset);null==e&&(e=new uo,this.items.setValue(this.dictionaryProperties.procset,e));var i=new Zn(t);e.contains(i)||e.add(i)},e.prototype.removeFont=function(t){for(var e=null,i=this.pdfNames.keys(),r=0;r<this.pdfNames.size();r++)if(this.pdfNames.getValue(i[r])===new Zn(t)){e=i[r];break}null!=e&&this.pdfNames.remove(e)},e.prototype.generateName=function(){return Ka.getNewGuidString()},e.prototype.add=function(t,e){if(t instanceof xs){var i=null,r=this.items.getValue(this.dictionaryProperties.font);if(null!=r){var n=r;i=r,i=r}else i=new io,this.items.setValue(this.dictionaryProperties.font,i);i.items.setValue(e.value,new Io(t.element))}else if(t instanceof Wa){var o=void 0;null==(o=this.items.getValue(this.dictionaryProperties.xObject))&&(o=new io,this.items.setValue(this.dictionaryProperties.xObject,o)),o.items.setValue(e.value,new Io(t.element))}else if(t instanceof is){if(t instanceof Ha||t instanceof $a){if(null!=(a=t.element)){var s=this.items.getValue(this.dictionaryProperties.pattern);null==s&&(s=new io,this.items.setValue(this.dictionaryProperties.pattern,s)),s.items.setValue(e.value,new Io(a))}}}else if(t instanceof Js){var a=t.element,l=null;null==(l=this.items.getValue(this.dictionaryProperties.extGState))&&(l=new io,this.items.setValue(this.dictionaryProperties.extGState,l)),l.items.setValue(e.value,new Io(a))}else{o=this.Dictionary.items.getValue(this.dictionaryProperties.xObject);var h=void 0;void 0!==this.pdfDocument&&(h=this.pdfDocument.sections.element.items.getValue(this.dictionaryProperties.resources).items.getValue(this.dictionaryProperties.xObject));this.Dictionary.items.values();var u=!1,c=void 0;if(void 0===this.pdfDocument||void 0!==typeof h&&null!=h){if(void 0!==this.pdfDocument)for(var p=h.items.values(),d=0;d<p.length;d++)void 0!==p[d]&&void 0!==p[d].element&&p[d].element.data[0]===t.element.data[0]&&(c=p[d],u=!0)}else h=new io,this.pdfDocument.sections.element.items.getValue(this.dictionaryProperties.resources).items.setValue(this.dictionaryProperties.xObject,h);if(null==o&&(o=new io,this.Dictionary.items.setValue(this.dictionaryProperties.xObject,o)),u&&void 0!==c)o.items.setValue(e.value,c);else{n=new Io(t.element);o.items.setValue(e.value,n),void 0!==this.pdfDocument&&h.items.setValue(e.value,n)}}},e}(io),Ka=function(){function t(){}return t.getNewGuidString=function(){return"aaaaaaaa-aaaa-4aaa-baaa-aaaaaaaaaaaa".replace(/[ab]/g,function(t){var e=16*Math.random()|0;return("a"===t?e:3&e|8).toString(16)})},t}(),Ya=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),$a=function(t){function e(e,i){var r=t.call(this)||this;r.mStroking=!1,r.mLocation=new Qo(0,0),r.mDictionaryProperties=new eo;var n=null;return e instanceof es?n=e:e instanceof Zo&&(n=new es(0,0,e.width,e.height)),null!==i&&i instanceof al&&(r.mPage=i),r.brushStream=new To,r.mResources=new qa,r.brushStream.items.setValue(r.mDictionaryProperties.resources,r.mResources),r.setBox(n),r.setObligatoryFields(),null!==i&&i instanceof al&&(r.mPage=i,r.graphics.colorSpace=i.document.colorSpace),r}return Ya(e,t),e.prototype.initialize=function(t,e,i,r){this.mPage=e,this.mLocation=i,this.mTransformationMatrix=r,this.tempBrushStream=this.brushStream,this.brushStream=new To;var n=new qa;return this.brushStream.items.setValue(this.mDictionaryProperties.resources,n),this.setBox(t),this.setObligatoryFields(),this},Object.defineProperty(e.prototype,"location",{get:function(){return this.mLocation},set:function(t){this.mLocation=t},enumerable:!0,configurable:!0}),e.prototype.setObligatoryFields=function(){if(this.brushStream.items.setValue(this.mDictionaryProperties.patternType,new ho(1)),this.brushStream.items.setValue(this.mDictionaryProperties.paintType,new ho(1)),this.brushStream.items.setValue(this.mDictionaryProperties.tilingType,new ho(1)),this.brushStream.items.setValue(this.mDictionaryProperties.xStep,new ho(this.mBox.right-this.mBox.left)),this.brushStream.items.setValue(this.mDictionaryProperties.yStep,new ho(this.mBox.bottom-this.mBox.top)),null!=this.mPage&&null!=this.mLocation)if(null==this.mTransformationMatrix&&void 0===this.mTransformationMatrix){var t=this.mPage.size.height%this.rectangle.size.height-this.mLocation.y;this.brushStream.items.setValue(this.mDictionaryProperties.matrix,new uo([1,0,0,1,this.mLocation.x,t]))}else{t=0;var e=this.mTransformationMatrix.matrix.elements;t=this.mPage.size.height>this.rectangle.size.height?this.mTransformationMatrix.matrix.offsetY-this.mPage.size.height%this.rectangle.size.height:this.mPage.size.height%this.rectangle.size.height+this.mTransformationMatrix.matrix.offsetY,this.brushStream.items.setValue(this.mDictionaryProperties.matrix,new uo([e[0],e[1],e[2],e[3],e[4],t]))}},e.prototype.setBox=function(t){this.mBox=t;var e=new ts(this.mBox.left,this.mBox.top,this.mBox.right,this.mBox.bottom);this.brushStream.items.setValue(this.mDictionaryProperties.bBox,uo.fromRectangle(e))},Object.defineProperty(e.prototype,"rectangle",{get:function(){return this.mBox},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.mBox.size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"graphics",{get:function(){if(null==this.mGraphics&&void 0===this.mGraphics){var t=new Xa(this),e=new Ja(this.size,t,this.brushStream);this.mGraphics=e,this.mResources=this.getResources(),this.mGraphics.initializeCoordinates()}return this.mGraphics},enumerable:!0,configurable:!0}),e.prototype.getResources=function(){return this.mResources},Object.defineProperty(e.prototype,"stroking",{get:function(){return this.mStroking},set:function(t){this.mStroking=t},enumerable:!0,configurable:!0}),e.prototype.clone=function(){var t=this.initialize(this.rectangle,this.mPage,this.location,this.mTransformationMatrix);return null!=this.mTransformationMatrix&&null!=this.mTransformationMatrix.matrix&&t.brushStream.items.setValue(this.mDictionaryProperties.matrix,new uo(this.mTransformationMatrix.matrix.elements)),t.brushStream.data=this.tempBrushStream.data,t.mResources=new qa(this.mResources),t.brushStream.items.setValue(this.mDictionaryProperties.resources,t.mResources),t},e.prototype.monitorChanges=function(t,i,r,n,o){var s=!1;if(t!==this){i.setColorSpace("Pattern",this.mStroking);var a=r.getResources().getName(this);i.setColourWithPattern(null,a,this.mStroking),s=!0}else if(t instanceof e){i.setColorSpace("Pattern",this.mStroking);var l=r.getResources().getName(this);i.setColourWithPattern(null,l,this.mStroking),s=!0}return s},e.prototype.resetChanges=function(t){},Object.defineProperty(e.prototype,"element",{get:function(){return this.brushStream},enumerable:!0,configurable:!0}),e}(is),Ja=function(){function t(t,e,i){this.currentColorSpace=Uo.Rgb,this.previousTextRenderingMode=zo.Fill,this.previousCharacterSpacing=0,this.previousWordSpacing=0,this.previousTextScaling=100,this.procedureSets=new Ys,this.isNormalRender=!0,this.isUseFontSize=!1,this.isItalic=!1,this.isEmfTextScaled=!1,this.isEmf=!1,this.isEmfPlus=!1,this.isBaselineFormat=!0,this.emfScalingFactor=new Zo(0,0),this.colorSpaceChanged=!1,this.dictionaryProperties=new eo,this.isOverloadWithPosition=!1,this.isPointOverload=!1,this.currentColorSpaces=["RGB","CMYK","GrayScale","Indexed"],this.isImageOptimized=!1,this.graphicsState=[],this.istransparencySet=!1,this.internalAutomaticFields=null,this.startCutIndex=-1,this.getResources=e,this.canvasSize=t,this.pdfStreamWriter=i instanceof Ws?i:new Ws(i),this.initialize()}return Object.defineProperty(t.prototype,"stringLayoutResult",{get:function(){return this.pdfStringLayoutResult},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.canvasSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mediaBoxUpperRightBound",{get:function(){return void 0===this.internalMediaBoxUpperRightBound&&(this.internalMediaBoxUpperRightBound=0),this.internalMediaBoxUpperRightBound},set:function(t){this.internalMediaBoxUpperRightBound=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"clientSize",{get:function(){return new Zo(this.clipBounds.width,this.clipBounds.height)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"colorSpace",{get:function(){return this.currentColorSpace},set:function(t){this.currentColorSpace=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"streamWriter",{get:function(){return this.pdfStreamWriter},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"matrix",{get:function(){return null==this.transformationMatrix&&(this.transformationMatrix=new qs),this.transformationMatrix},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layer",{get:function(){return this.pageLayer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"page",{get:function(){return this.pageLayer.page},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"automaticFields",{get:function(){return null!=this.internalAutomaticFields&&void 0!==this.internalAutomaticFields||(this.internalAutomaticFields=new Xs),this.internalAutomaticFields},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){this.bStateSaved=!1,this.currentPen=null,this.currentBrush=null,this.currentFont=null,this.currentColorSpace=Uo.Rgb,this.bCSInitialized=!1,this.transformationMatrix=null,this.previousTextRenderingMode=-1,this.previousCharacterSpacing=-1,this.previousWordSpacing=-1,this.previousTextScaling=-100,this.currentStringFormat=null,this.clipBounds=new ts(new Qo(0,0),this.size),this.getResources.getResources().requireProcedureSet(this.procedureSets.pdf)},t.prototype.drawPdfTemplate=function(t,e,i){if(void 0===i){if(null==t)throw Error("ArgumentNullException-template");this.drawPdfTemplate(t,e,t.size)}else{if(null==t)throw Error("ArgumentNullException-template");var r=t.width>0?i.width/t.width:1,n=t.height>0?i.height/t.height:1,o=!(1===r&&1===n),s=this.save(),a=new qs;null!=this.pageLayer&&this.getTranslateTransform(e.x,e.y+i.height,a),o&&this.getScaleTransform(r,n,a),this.pdfStreamWriter.modifyCtm(a);var l=this.getResources.getResources().getName(t);this.pdfStreamWriter.executeObject(l),this.restore(s);var h=t.graphics;if(null!=h)for(var u=0;u<h.automaticFields.automaticFields.length;u++){var c=h.automaticFields.automaticFields[u],p=new Qo(c.location.x+e.x,c.location.y+e.y),d=0==t.size.width?0:i.width/t.size.width,f=0==t.size.height?0:i.height/t.size.height;this.automaticFields.add(new ea(c.field,p,d,f)),this.page.dictionary.modify()}this.getResources.getResources().requireProcedureSet(this.procedureSets.imageB),this.getResources.getResources().requireProcedureSet(this.procedureSets.imageC),this.getResources.getResources().requireProcedureSet(this.procedureSets.imageI),this.getResources.getResources().requireProcedureSet(this.procedureSets.text)}},t.prototype.drawString=function(t,e,i,r,n,o,s,a,l){if("string"==typeof t&&e instanceof xs&&(i instanceof Us||null===i)&&(r instanceof is||null===r)&&"number"==typeof n&&"number"==typeof o&&(s instanceof bs||null===s)&&void 0===a)this.isOverloadWithPosition=!0,this.drawString(t,e,i,r,n,o,this.clientSize.width-n,0,s);else{var h=i,u=r,c=n,p=o,d=s,f=a,g=l,m=(new ws).layout(t,e,g,new Zo(d,f),this.isOverloadWithPosition,this.clientSize);if(!m.empty){var y=this.checkCorrectLayoutRectangle(m.actualSize,c,p,g);d<=0&&(c=y.x,d=y.width),f<=0&&(p=y.y,f=y.height),this.drawStringLayoutResult(m,e,h,u,new ts(c,p,d,f),g),this.isEmfTextScaled=!1,this.emfScalingFactor=new Zo(0,0)}this.getResources.getResources().requireProcedureSet(this.procedureSets.text),this.isNormalRender=!0,this.pdfStringLayoutResult=m,this.isUseFontSize=!1}},t.prototype.drawLine=function(t,e,i,r,n){if(e instanceof Qo){var o=e,s=i;this.drawLine(t,o.x,o.y,s.x,s.y)}else{o=e,s=i;var a=r,l=n;this.stateControl(t,null,null);var h=this.streamWriter;h.beginPath(o,s),h.appendLineSegment(a,l),h.strokePath(),this.getResources.getResources().requireProcedureSet(this.procedureSets.pdf)}},t.prototype.drawRectangle=function(t,e,i,r,n,o){if(t instanceof Us&&"number"==typeof e){var s=i;this.drawRectangle(t,null,e,s,r,n)}else if(t instanceof is&&"number"==typeof e){s=i;this.drawRectangle(null,t,e,s,r,n)}else{s=i;var a=r,l=n,h=o;if(e instanceof $a){this.bCSInitialized=!1;var u=this.matrix.matrix.offsetX+s,c=void 0;c=null!=this.layer&&null!=this.layer.page?this.layer.page.size.height-this.matrix.matrix.offsetY+a:this.clientSize.height-this.matrix.matrix.offsetY+a,e.location=new Qo(u,c),e.graphics.colorSpace=this.colorSpace}else e instanceof Ha&&(e.colorSpace=this.colorSpace);e instanceof ns&&e.color.isEmpty&&(e=null);var p=t,d=e;this.stateControl(p,d,null),this.streamWriter.appendRectangle(s,a,l,h),this.drawPathHelper(p,d,!1)}},t.prototype.drawPathHelper=function(t,e,i,r){if("boolean"==typeof i){var n=i;this.drawPathHelper(t,e,Wo.Winding,n)}else{var o=null!=t,s=null!=e,a=(n=i)===Wo.Alternate;o&&s?this.streamWriter.fillStrokePath(a):o||s?o?this.streamWriter.strokePath():this.streamWriter.fillPath(a):this.streamWriter.endPath()}},t.prototype.drawImage=function(t,e,i,r,n){if("number"==typeof e&&"number"==typeof i&&void 0===r){var o=t.physicalDimension;this.drawImage(t,e,i,o.width,o.height)}else{var s=e,a=i,l=n;t.save();var h=new qs;this.getTranslateTransform(s,a+l,h),this.getScaleTransform(r,n,h),this.pdfStreamWriter.write("q"),this.pdfStreamWriter.modifyCtm(h);var u=this.getResources.getResources();void 0!==this.pageLayer&&null!=this.page&&(u.document=this.page.document);var c=u.getName(t);void 0!==this.pageLayer&&this.page.setResources(u),this.pdfStreamWriter.executeObject(c),this.pdfStreamWriter.write(to.restoreState),this.pdfStreamWriter.write(to.newLine);var p=this.getResources.getResources();p.requireProcedureSet(this.procedureSets.imageB),p.requireProcedureSet(this.procedureSets.imageC),p.requireProcedureSet(this.procedureSets.imageI),p.requireProcedureSet(this.procedureSets.text)}},t.prototype.getLineBounds=function(t,e,i,r,n){var o;if(!e.empty&&t<e.lineCount&&t>=0){var s=e.lines[t],a=this.getTextVerticalAlignShift(e.actualSize.height,r.height,n)+r.y+e.lineHeight*t,l=s.width,h=this.getHorizontalAlignShift(l,r.width,n),u=this.getLineIndent(s,n,r,0===t);h+=this.rightToLeft(n)?0:u;var c=r.x+h,p=this.shouldJustify(s,r.width,n)?r.width-u:l-u,d=e.lineHeight;o=new ts(c,a,p,d)}else o=new ts(0,0,0,0);return o},t.prototype.checkCorrectLayoutRectangle=function(t,e,i,r){var n=new ts(e,i,t.width,t.width);if(null!=r){switch(r.alignment){case Vo.Center:n.x-=n.width/2;break;case Vo.Right:n.x-=n.width}switch(r.lineAlignment){case Fo.Middle:n.y-=n.height/2;break;case Fo.Bottom:n.y-=n.height}}return n},t.prototype.setLayer=function(t){this.pageLayer=t;var e=t.page;null!=e&&void 0!==e&&(e.beginSave=this.pageSave)},t.prototype.pageSave=function(t){if(null!=t.graphics.automaticFields)for(var e=0;e<t.graphics.automaticFields.automaticFields.length;e++){var i=t.graphics.automaticFields.automaticFields[e];i.field.performDraw(t.graphics,i.location,i.scalingX,i.scalingY)}},t.prototype.drawStringLayoutResult=function(t,e,i,r,n,o){if(t.empty)throw new Error("ArgumentNullException:result");this.applyStringSettings(e,i,r,o,n);var s=null!=o?o.horizontalScalingFactor:100;s===this.previousTextScaling||this.isEmfTextScaled||(this.pdfStreamWriter.setTextScaling(s),this.previousTextScaling=s);var a=null==o||0===o.lineSpacing?e.height:o.lineSpacing+e.height,l=0;l=null!=o&&o.subSuperScript===ls.SubScript?a-(e.height+e.metrics.getDescent(o)):a-e.metrics.getAscent(o),this.shift=l,this.pdfStreamWriter.startNextLine(n.x,n.y-l),this.pdfStreamWriter.setLeading(+a);for(var h=0,u="",c=0;c<t.lines.length;c++)if(h+=t.lineHeight,n.y+h>this.clientSize.height){this.startCutIndex=c;break}for(var p=this.startCutIndex;p<t.lines.length&&p>=0;p++)u+=t.lines[p].text;var d=new ts(n.x,n.y,n.width,n.height);if(this.drawLayoutResult(t,e,o,n),this.underlineStrikeoutText(i,r,t,e,d,o),this.isEmfPlus=!1,this.isUseFontSize=!1,-1!==this.startCutIndex){this.getNextPage().graphics.drawString(u,e,i,r,n.x,0,n.width,0,o)}},t.prototype.getNextPage=function(){var t=this.currentPage.section,e=t.indexOf(this.currentPage);return e===t.count-1?t.add():t.getPages()[e+1]},t.prototype.setClip=function(t,e){void 0===e?this.setClip(t,Wo.Winding):(this.pdfStreamWriter.appendRectangle(t),this.pdfStreamWriter.clipPath(e===Wo.Alternate))},t.prototype.applyStringSettings=function(t,e,i,r,n){i instanceof $a?(this.bCSInitialized=!1,i.graphics.colorSpace=this.colorSpace):i instanceof Ha&&(this.bCSInitialized=!1,i.colorSpace=this.colorSpace);var o=this.getTextRenderingMode(e,i,r);this.stateControl(e,i,t,r),this.pdfStreamWriter.beginText(),o!==this.previousTextRenderingMode&&(this.pdfStreamWriter.setTextRenderingMode(o),this.previousTextRenderingMode=o);var s=null!=r?r.characterSpacing:0;s===this.previousCharacterSpacing||this.isEmfTextScaled||(this.pdfStreamWriter.setCharacterSpacing(s),this.previousCharacterSpacing=s);var a=null!=r?r.wordSpacing:0;a!==this.previousWordSpacing&&(this.pdfStreamWriter.setWordSpacing(a),this.previousWordSpacing=a)},t.prototype.getTextVerticalAlignShift=function(t,e,i){var r=0;if(e>=0&&null!=i&&i.lineAlignment!==Fo.Top)switch(i.lineAlignment){case Fo.Middle:r=(e-t)/2;break;case Fo.Bottom:r=e-t}return r},t.prototype.drawLayoutResult=function(t,e,i,r){var n=this.getTextVerticalAlignShift(t.actualSize.height,r.height,i);0!==n&&this.pdfStreamWriter.startNextLine(0,n);for(var o=e,s=null!=o&&o.isUnicode,a=(null!=o&&o.isEmbedFont,t.lines),l=0,h=a.length;l<h&&l!==this.startCutIndex;l++){var u=a[l],c=(u.text,u.width),p=this.getHorizontalAlignShift(c,r.width,i),d=this.getLineIndent(u,i,r,0===l);0===(p+=this.rightToLeft(i)?0:d)||this.isEmfTextScaled||this.pdfStreamWriter.startNextLine(p,0),s?this.drawUnicodeLine(u,r,e,i):this.drawAsciiLine(u,r,e,i),0===p||this.isEmfTextScaled||this.pdfStreamWriter.startNextLine(-p,0),this.isOverloadWithPosition&&a.length>1&&(this.pdfStreamWriter.startNextLine(-r.x,0),r.x=0,r.width=this.clientSize.width,this.isOverloadWithPosition=!1,this.isPointOverload=!0)}this.getResources.getResources().requireProcedureSet(this.procedureSets.text),0!==n&&this.pdfStreamWriter.startNextLine(0,-(n-t.lineHeight)),this.pdfStreamWriter.endText()},t.prototype.drawAsciiLine=function(t,e,i,r){this.justifyLine(t,e.width,r);var n="";if(-1!==t.text.indexOf("(")||-1!==t.text.indexOf(")"))for(var o=0;o<t.text.length;o++)"("===t.text[o]?n+="\\(":")"===t.text[o]?n+="\\)":n+=t.text[o];""===n&&(n=t.text);var s="("+n+")";this.pdfStreamWriter.showNextLineText(new Eo(s))},t.prototype.drawUnicodeLine=function(t,e,i,r){var n=t.text,o=(t.width,null!==r&&void 0!==r&&r.rightToLeft),s=null!==r&&void 0!==r&&(0!==r.wordSpacing||r.alignment===Vo.Justify),a=i,l=this.justifyLine(t,e.width,r),h=new Fa;if(o||null!==r&&void 0!==r&&r.textDirection!==$o.None){var u=null,c=null!==r&&void 0!==r&&r.alignment===Vo.Right,p=null;p=(u=null!==r&&void 0!==r&&r.textDirection!==$o.None?h.layout(n,a,r.textDirection===$o.RightToLeft,s,r):h.layout(n,a,c,s,r)).length>1?null!==r&&void 0!==r&&r.textDirection!==$o.None?h.splitLayout(n,a,r.textDirection===$o.RightToLeft,s,r):h.splitLayout(n,a,c,s,r):[n],this.drawUnicodeBlocks(u,p,a,r,l)}else if(s){var d=this.breakUnicodeLine(n,a,null);u=d.tokens,p=d.words;this.drawUnicodeBlocks(u,p,a,r,l)}else{var f=this.convertToUnicode(n,a),g=this.getUnicodeString(f);this.streamWriter.showNextLineText(g)}},t.prototype.drawUnicodeBlocks=function(t,e,i,r,n){if(null==t)throw new Error("Argument Null Exception : blocks");if(null==e)throw new Error("Argument Null Exception : words");if(null==i)throw new Error("Argument Null Exception : font");this.streamWriter.startNextLine();var o=0,s=0,a=0,l=0;try{null!==r&&void 0!==r&&(a=r.firstLineIndent,l=r.paragraphIndent,r.firstLineIndent=0,r.paragraphIndent=0);var h=i.getCharWidth(vs.whiteSpace,r)+n,u=null!=r?r.characterSpacing:0;h+=u+(null!==r&&void 0!==r&&0===n?r.wordSpacing:0);for(var c=0;c<t.length;c++){var p=t[c],d=e[c],f=0;if(0!==o&&this.streamWriter.startNextLine(o,0),d.length>0){f+=i.measureString(d,r).width,f+=u;var g=this.getUnicodeString(p);this.streamWriter.showText(g)}c!==t.length-1&&(s+=o=f+h)}s>0&&this.streamWriter.startNextLine(-s,0)}finally{null!==r&&void 0!==r&&(r.firstLineIndent=a,r.paragraphIndent=l)}},t.prototype.breakUnicodeLine=function(t,e,i){if(null===t)throw new Error("Argument Null Exception : line");i=t.split(null);for(var r=[],n=0;n<i.length;n++){var o=i[n],s=this.convertToUnicode(o,e);r[n]=s}return{tokens:r,words:i}},t.prototype.getUnicodeString=function(t){if(null===t)throw new Error("Argument Null Exception : token");var e=new Eo(t);return e.converted=!0,e.encode=$n.ForceEncoding.Ascii,e},t.prototype.convertToUnicode=function(t,e){var i=null;if(null==t)throw new Error("Argument Null Exception : text");if(null==e)throw new Error("Argument Null Exception : ttfFont");if(e.fontInternal instanceof ja){var r=e.fontInternal.ttfReader;e.setSymbols(t),i=r.convertString(t);var n=Eo.toUnicodeArray(i,!1);i=Eo.byteToString(n)}return i},t.prototype.justifyLine=function(t,e,i){var r=t.text,n=t.width,o=this.shouldJustify(t,e,i),s=null!=i&&0!==i.wordSpacing,a=vs.spaces,l=vs.getCharsCount(r,a),h=0;if(o){s&&(n-=l*i.wordSpacing);h=(e-n)/l,this.pdfStreamWriter.setWordSpacing(h)}else s?this.pdfStreamWriter.setWordSpacing(i.wordSpacing):this.pdfStreamWriter.setWordSpacing(0);return h},t.prototype.reset=function(t){this.canvasSize=t,this.streamWriter.clear(),this.initialize(),this.initializeCoordinates()},t.prototype.shouldJustify=function(t,e,i){var r=t.text,n=t.width,o=null!=i&&i.alignment===Vo.Justify,s=e>=0&&n<e,a=vs.spaces,l=vs.getCharsCount(r,a)>0&&r[0]!==vs.whiteSpace,h=(t.lineType&ys.LayoutBreak)>0;return o&&s&&l&&(h||i.alignment===Vo.Justify)},t.prototype.underlineStrikeoutText=function(t,e,i,r,n,o){if(r.underline||r.strikeout){var s=this.createUnderlineStikeoutPen(t,e,r,o);if(null!=s){var a=this.getTextVerticalAlignShift(i.actualSize.height,n.height,o),l=0;l=n.y+a+r.metrics.getAscent(o)+1.5*s.width;for(var h=n.y+a+r.metrics.getHeight(o)/2+1.5*s.width,u=i.lines,c=0,p=i.lineCount;c<p;c++){var d=u[c],f=(d.text,d.width),g=this.getHorizontalAlignShift(f,n.width,o),m=this.getLineIndent(d,o,n,0===c);g+=this.rightToLeft(o)?0:m;var y=n.x+g,b=this.shouldJustify(d,n.width,o)?y+n.width-m:y+f-m;if(r.underline){var v=l;this.drawLine(s,y,v,b,v),l+=i.lineHeight}if(r.strikeout){v=h;this.drawLine(s,y,v,b,v),h+=i.lineHeight}this.isPointOverload&&u.length>1&&(n.x=0,n.width=this.clientSize.width)}this.isPointOverload=!1}}},t.prototype.createUnderlineStikeoutPen=function(t,e,i,r){var n=i.metrics.getSize(r)/20,o=null;return null!=t?o=new Us(t.color,n):null!=e&&(o=new Us(e,n)),o},t.prototype.getTextRenderingMode=function(t,e,i){var r=zo.None;return r=null!=t&&null!=e?zo.FillStroke:null!=t?zo.Stroke:zo.Fill,null!=i&&i.clipPath&&(r|=zo.ClipFlag),r},t.prototype.getLineIndent=function(t,e,i,r){var n=0,o=(t.lineType&ys.FirstParagraphLine)>0;return null!=e&&o&&(n=r?e.firstLineIndent:e.paragraphIndent,n=i.width>0?Math.min(i.width,n):n),n},t.prototype.getHorizontalAlignShift=function(t,e,i){var r=0;if(e>=0&&null!=i&&i.alignment!==Vo.Left)switch(i.alignment){case Vo.Center:r=(e-t)/2;break;case Vo.Right:r=e-t}return r},t.prototype.rightToLeft=function(t){var e=null!==t&&void 0!==t&&t.rightToLeft;return null!==t&&void 0!==t&&t.textDirection!==$o.None&&void 0!==t.textDirection&&(e=!0),e},t.prototype.stateControl=function(t,e,i,r){if(void 0===r)this.stateControl(t,e,i,null);else{e instanceof Ha&&(this.bCSInitialized=!1,e.colorSpace=this.colorSpace),e instanceof $a&&(this.bCSInitialized=!1,e.graphics.colorSpace=this.colorSpace);null!==e?(void 0!==this.pageLayer&&null!=this.pageLayer&&!1===this.colorSpaceChanged&&(this.lastDocumentCS=this.pageLayer.page.document.colorSpace,this.lastGraphicsCS=this.pageLayer.page.graphics.colorSpace,this.colorSpace=this.pageLayer.page.document.colorSpace,this.currentColorSpace=this.pageLayer.page.document.colorSpace,this.colorSpaceChanged=!0),this.initCurrentColorSpace(this.currentColorSpace)):null!=t&&(void 0!==this.pageLayer&&null!=this.pageLayer&&(this.colorSpace=this.pageLayer.page.document.colorSpace,this.currentColorSpace=this.pageLayer.page.document.colorSpace),this.initCurrentColorSpace(this.currentColorSpace)),this.penControl(t,!1),this.brushControl(e,!1),this.fontControl(i,r,!1)}},t.prototype.initCurrentColorSpace=function(t){this.getResources.getResources();this.bCSInitialized||(this.currentColorSpace!=Uo.GrayScale?(this.pdfStreamWriter.setColorSpace("Device"+this.currentColorSpaces[this.currentColorSpace],!0),this.pdfStreamWriter.setColorSpace("Device"+this.currentColorSpaces[this.currentColorSpace],!1),this.bCSInitialized=!0):(this.pdfStreamWriter.setColorSpace("DeviceGray",!0),this.pdfStreamWriter.setColorSpace("DeviceGray",!1),this.bCSInitialized=!0))},t.prototype.penControl=function(t,e){null!=t&&(this.currentPen=t,t.monitorChanges(this.currentPen,this.pdfStreamWriter,this.getResources,e,this.colorSpace,this.matrix.clone()),this.currentPen=t.clone())},t.prototype.brushControl=function(t,e){if(null!=t&&void 0!==t){var i=t.clone(),r=i;if(!(null===r||void 0===r||t instanceof ns||t instanceof $a)){var n=r.matrix,o=this.matrix.clone();null!=n&&(n.multiply(o),o=n),r.matrix=o}this.currentBrush=r,i.monitorChanges(this.currentBrush,this.pdfStreamWriter,this.getResources,e,this.colorSpace),this.currentBrush=t,t=null}},t.prototype.fontControl=function(t,e,i){if(null!=t){var r=null!=e?e.subSuperScript:ls.None,n=null!=this.currentStringFormat?this.currentStringFormat.subSuperScript:ls.None;if(i||t!==this.currentFont||r!==n){var o=this.getResources.getResources();this.currentFont=t,this.currentStringFormat=e;var s=t.metrics.getSize(e);this.isEmfTextScaled=!1;var a=o.getName(t);this.pdfStreamWriter.setFont(t,a,s)}}},t.prototype.setTransparency=function(t,e,i){if(void 0===e)this.istransparencySet=!0,this.setTransparency(t,t,qo.Normal);else if("number"==typeof e&&void 0===i)this.setTransparency(t,e,qo.Normal);else{null==this.trasparencies&&(this.trasparencies=new $s);var r=null,n=new Za(t,e,i);this.trasparencies.containsKey(n)&&(r=this.trasparencies.getValue(n)),null==r&&(r=new Js(t,e,i),this.trasparencies.setValue(n,r));var o=this.getResources.getResources().getName(r);this.streamWriter.setGraphicsState(o)}},t.prototype.clipTranslateMargins=function(t,e,i,r,n,o){if(t instanceof ts&&void 0===e)this.clipBounds=t,this.pdfStreamWriter.writeComment("Clip margins."),this.pdfStreamWriter.appendRectangle(t),this.pdfStreamWriter.closePath(),this.pdfStreamWriter.clipPath(!1),this.pdfStreamWriter.writeComment("Translate co-ordinate system."),this.translateTransform(t.x,t.y);else if("number"==typeof t){var s=new ts(i,r,this.size.width-i-n,this.size.height-r-o);this.clipBounds=s,this.pdfStreamWriter.writeComment("Clip margins."),this.pdfStreamWriter.appendRectangle(s),this.pdfStreamWriter.closePath(),this.pdfStreamWriter.clipPath(!1),this.pdfStreamWriter.writeComment("Translate co-ordinate system."),this.translateTransform(t,e)}},t.prototype.updateY=function(t){return-t},t.prototype.translateTransform=function(t,e){var i=new qs;this.getTranslateTransform(t,e,i),this.pdfStreamWriter.modifyCtm(i),this.matrix.multiply(i)},t.prototype.getTranslateTransform=function(t,e,i){return i.translate(t,this.updateY(e)),i},t.prototype.scaleTransform=function(t,e){var i=new qs;this.getScaleTransform(t,e,i),this.pdfStreamWriter.modifyCtm(i),this.matrix.multiply(i)},t.prototype.getScaleTransform=function(t,e,i){return null==i&&(i=new qs),i.scale(t,e),i},t.prototype.rotateTransform=function(t){var e=new qs;this.getRotateTransform(t,e),this.pdfStreamWriter.modifyCtm(e),this.matrix.multiply(e)},t.prototype.initializeCoordinates=function(){this.pdfStreamWriter.writeComment("Change co-ordinate system to left/top."),this.mediaBoxUpperRightBound!==-this.size.height&&null==this.cropBox&&(this.mediaBoxUpperRightBound===this.size.height||0===this.mediaBoxUpperRightBound?this.translateTransform(0,this.updateY(this.size.height)):this.translateTransform(0,this.updateY(this.mediaBoxUpperRightBound)))},t.prototype.getRotateTransform=function(t,e){return null!=e&&void 0!==e||(e=new qs),e.rotate(this.updateY(t)),e},t.prototype.save=function(){var t=new Qa(this,this.matrix.clone());return t.brush=this.currentBrush,t.pen=this.currentPen,t.font=this.currentFont,t.colorSpace=this.currentColorSpace,t.characterSpacing=this.previousCharacterSpacing,t.wordSpacing=this.previousWordSpacing,t.textScaling=this.previousTextScaling,t.textRenderingMode=this.previousTextRenderingMode,this.graphicsState.push(t),this.pdfStreamWriter.saveGraphicsState(),t},t.prototype.restore=function(t){if(void 0===t)this.graphicsState.length>0&&this.doRestoreState();else if(-1!==this.graphicsState.indexOf(t))for(;0!==this.graphicsState.length;){if(this.doRestoreState()===t)break}},t.prototype.doRestoreState=function(){var t=this.graphicsState.pop();return this.transformationMatrix=t.matrix,this.currentBrush=t.brush,this.currentPen=t.pen,this.currentFont=t.font,this.currentColorSpace=t.colorSpace,this.previousCharacterSpacing=t.characterSpacing,this.previousWordSpacing=t.wordSpacing,this.previousTextScaling=t.textScaling,this.previousTextRenderingMode=t.textRenderingMode,this.pdfStreamWriter.restoreGraphicsState(),t},t.prototype.drawPath=function(t,e,i){e instanceof $a?(this.bCSInitialized=!1,e.graphics.colorSpace=this.colorSpace):e instanceof Ha&&(this.bCSInitialized=!1,e.colorSpace=this.colorSpace),this.stateControl(t,e,null),this.buildUpPath(i.pathPoints,i.pathTypes),this.drawPathHelper(t,e,i.fillMode,!1)},t.prototype.drawArc=function(t,e,i,r,n,o,s){e instanceof ts?this.drawArc(t,e.x,e.y,e.width,e.height,i,r):0!==s&&(this.stateControl(t,null,null),this.constructArcPath(e,i,e+r,i+n,o,s),this.drawPathHelper(t,null,!1))},t.prototype.buildUpPath=function(e,i){for(var r=e.length,n=0;n<r;++n){var o=0,s=e[n];switch(i[n]&t.pathTypesValuesMask){case za.Start:this.pdfStreamWriter.beginPath(s.x,s.y);break;case za.Bezier3:var a=new Qo(0,0),l=new Qo(0,0),h=this.getBezierPoints(e,i,n,a,l);this.pdfStreamWriter.appendBezierSegment(s,h.p2,h.p3),n=h.i;break;case za.Line:this.pdfStreamWriter.appendLineSegment(s);break;default:throw new Error("ArithmeticException - Incorrect path formation.")}o=i[n],this.checkFlags(o)}},t.prototype.getBezierPoints=function(e,i,r,n,o){if(++r,(i[r]&t.pathTypesValuesMask)!==za.Bezier3)throw new Error("ArgumentException : errorMsg");if(n=e[r],++r,(i[r]&t.pathTypesValuesMask)!==za.Bezier3)throw new Error("ArgumentException : errorMsg");return o=e[r],{i:r,p2:n,p3:o}},t.prototype.checkFlags=function(t){(t&za.CloseSubpath)===za.CloseSubpath&&this.pdfStreamWriter.closePath()},t.prototype.constructArcPath=function(t,e,i,r,n,o){var s=this.getBezierArc(t,e,i,r,n,o);if(0!==s.length){var a=[s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7]];this.pdfStreamWriter.beginPath(a[0],a[1]);var l=0;for(l=0;l<s.length;l+=8)a=[s[l],s[l+1],s[l+2],s[l+3],s[l+4],s[l+5],s[l+6],s[l+7]],this.pdfStreamWriter.appendBezierSegment(a[2],a[3],a[4],a[5],a[6],a[7])}},t.prototype.getBezierArc=function(t,e,i,r,n,o){if(t>i){var s=void 0;s=t,t=i,i=s}if(r>e){s=void 0;s=e,e=r,r=s}var a,l;Math.abs(o)<=90?(a=o,l=1):a=o/(l=Math.ceil(Math.abs(o)/90));for(var h=(t+i)/2,u=(e+r)/2,c=(i-t)/2,p=(r-e)/2,d=a*(Math.PI/360),f=Math.abs(4/3*(1-Math.cos(d))/Math.sin(d)),g=[],m=0;m<l;m++){var y=(n+m*a)*(Math.PI/180),b=(n+(m+1)*a)*(Math.PI/180),v=Math.cos(y),w=Math.cos(b),S=Math.sin(y),P=Math.sin(b);a>0?g.push(h+c*v,u-p*S,h+c*(v-f*S),u-p*(S+f*v),h+c*(w+f*P),u-p*(P-f*w),h+c*w,u-p*P):g.push(h+c*v,u-p*S,h+c*(v+f*S),u-p*(S-f*v),h+c*(w-f*P),u-p*(P+f*w),h+c*w,u-p*P)}return g},t.pathTypesValuesMask=15,t.transparencyObject=!1,t}(),Xa=function(){function t(t){this.sender=t}return t.prototype.getResources=function(){return this.sender.getResources()},t}(),Qa=function(){function t(t,e){this.internalTextRenderingMode=zo.Fill,this.internalCharacterSpacing=0,this.internalWordSpacing=0,this.internalTextScaling=100,this.pdfColorSpace=Uo.Rgb,void 0!==t&&(this.pdfGraphics=t,this.transformationMatrix=e)}return Object.defineProperty(t.prototype,"graphics",{get:function(){return this.pdfGraphics},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"matrix",{get:function(){return this.transformationMatrix},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"characterSpacing",{get:function(){return this.internalCharacterSpacing},set:function(t){this.internalCharacterSpacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wordSpacing",{get:function(){return this.internalWordSpacing},set:function(t){this.internalWordSpacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textScaling",{get:function(){return this.internalTextScaling},set:function(t){this.internalTextScaling=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pen",{get:function(){return this.pdfPen},set:function(t){this.pdfPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"brush",{get:function(){return this.pdfBrush},set:function(t){this.pdfBrush=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"font",{get:function(){return this.pdfFont},set:function(t){this.pdfFont=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"colorSpace",{get:function(){return this.pdfColorSpace},set:function(t){this.pdfColorSpace=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textRenderingMode",{get:function(){return this.internalTextRenderingMode},set:function(t){this.internalTextRenderingMode=t},enumerable:!0,configurable:!0}),t}(),Za=function(){return function(t,e,i){this.alphaPen=t,this.alphaBrush=e,this.blendMode=i}}(),tl=function(){function t(t,e){if(this.pdfColorSpace=Uo.Rgb,this.isVisible=!0,this.sublayer=!1,this.contentLength=0,this.dictionaryProperties=new eo,null===t)throw new Error("ArgumentNullException:page");if(this.pdfPage=t,this.clipPageTemplates=!0,void 0===e)this.content=new To;else if(e instanceof To||null===e){if(null===e)throw new Error("ArgumentNullException:stream");this.content=e}else this.content=new To,this.clipPageTemplates=e}return Object.defineProperty(t.prototype,"colorSpace",{get:function(){return this.pdfColorSpace},set:function(t){this.pdfColorSpace=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"page",{get:function(){return this.pdfPage},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layerId",{get:function(){return this.layerid},set:function(t){this.layerid=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.layerName},set:function(t){this.layerName=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visible",{get:function(){return this.isVisible},set:function(t){this.isVisible=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphics",{get:function(){return null==this.pdfGraphics&&this.initializeGraphics(this.page),this.pdfGraphics},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layers",{get:function(){return null==this.layer?(this.layer=new rl(this.page),this.layer.sublayer=!0,this.layer):this.layer},enumerable:!0,configurable:!0}),t.prototype.add=function(){var e=new t(this.pdfPage);return e.name="",e},t.prototype.sign=function(t){return 0===t?0:t>0?1:-1},t.prototype.initializeGraphics=function(t){var e=t,i=new Xa(this.page);if(this.pdfGraphics=new Ja(t.size,i,this.content),this.pdfGraphics.mediaBoxUpperRightBound=0,null!=e){var r=e.section.parent;null!=r&&(this.pdfGraphics.colorSpace=r.document.colorSpace,this.colorSpace=r.document.colorSpace)}var n=this.sign(t.origin.y)===this.sign(t.origin.x);(t.origin.x>=0&&t.origin.y>=0||!n)&&this.pdfGraphics.initializeCoordinates();var o=e.section.getActualBounds(e,!0),s=e.section.pageSettings.margins;this.clipPageTemplates?t.origin.x>=0&&t.origin.y>=0&&this.pdfGraphics.clipTranslateMargins(o):this.graphics.clipTranslateMargins(o.x,o.y,s.left,s.top,s.right,s.bottom),this.pdfGraphics.setLayer(this)},Object.defineProperty(t.prototype,"element",{get:function(){return this.content},enumerable:!0,configurable:!0}),t}(),el=function(){function t(){}return Object.defineProperty(t.prototype,"count",{get:function(){return void 0===this.collection&&(this.collection=[]),this.collection.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"list",{get:function(){return void 0===this.collection&&(this.collection=[]),this.collection},enumerable:!0,configurable:!0}),t}(),il=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),rl=function(t){function e(e){var i=t.call(this)||this;if(i.parentLayerCount=0,i.sublayer=!1,i.optionalContent=new io,e instanceof nl){i.page=e;var r=e;i.parseLayers(r)}return i}return il(e,t),e.prototype.items=function(t,e){if("number"==typeof t&&void 0===e){return this.list[t]}if(null==e)throw new Error("ArgumentNullException: layer");if(e.page!==this.page)throw new Error("ArgumentException: The layer belongs to another page")},e.prototype.add=function(t,e){if(void 0===t){var i=new tl(this.page);return i.name="",this.add(i),i}if(t instanceof tl){var r=this.list.push(t);return this.addLayer(r,t),r}return 0},e.prototype.addLayer=function(t,e){var i=new Io(e);this.page.contents.add(i)},e.prototype.insert=function(t,e){for(var i=[],r=this.list.length,n=t;n<r;n++)i.push(this.list.pop());this.list.push(e);for(n=0;n<i.length;n++)this.list.push(i[n]);this.insertLayer(t,e)},e.prototype.insertLayer=function(t,e){if(null==e)throw new Error("ArgumentNullException:layer");var i=new Io(e);this.page.contents.insert(t,i)},e.prototype.parseLayers=function(t){var e=this.page.contents;this.page.getResources();t.crossTable;var i=new To,r=new To,n=[];n.push("q"),i.data=n,e.insert(0,new Io(i)),(n=[]).push("Q"),r.data=n,e.insert(e.count,new Io(r))},e.prototype.indexOf=function(t){if(null==t)throw new Error("ArgumentNullException: layer");return this.list.indexOf(t)},e}(el),nl=function(){function t(t){this.defLayerIndex=-1,this.modified=!1,this.dictionaryProperties=new eo,this.pageDictionary=t}return Object.defineProperty(t.prototype,"section",{get:function(){return this.pdfSection},set:function(t){this.pdfSection=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dictionary",{get:function(){return this.pageDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.pageDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"defaultLayer",{get:function(){var t=this.layers,e=this.defaultLayerIndex;return t.items(e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"defaultLayerIndex",{get:function(){if(0===this.layerCollection.count||-1===this.defLayerIndex){var t=this.layerCollection.add();this.defLayerIndex=this.layerCollection.indexOf(t)}return this.defLayerIndex},set:function(t){if(t<0||t>this.layers.count-1)throw new Error("ArgumentOutOfRangeException : value, Index can not be less 0 and greater Layers.Count - 1");this.defLayerIndex=t,this.modified=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"layers",{get:function(){return null!=this.layerCollection&&void 0!==this.layerCollection||(this.layerCollection=new rl(this)),this.layerCollection},enumerable:!0,configurable:!0}),t.prototype.getResources=function(){return null==this.resources&&(this.resources=new qa,this.dictionary.items.setValue(this.dictionaryProperties.resources,this.resources)),this.resources},Object.defineProperty(t.prototype,"contents",{get:function(){var t=this.pageDictionary.items.getValue(this.dictionaryProperties.contents);return null==t&&(t=new uo,this.pageDictionary.items.setValue(this.dictionaryProperties.contents,t)),t},enumerable:!0,configurable:!0}),t.prototype.setResources=function(t){this.resources=t,this.dictionary.items.setValue(this.dictionaryProperties.resources,this.resources),this.modified=!0},t}(),ol=function(){function t(t){this.alreadyExistsAnnotationError="This annotatation had been already added to page",this.missingAnnotationException="Annotation is not contained in collection.",this.dictionaryProperties=new eo,this.internalAnnotations=new uo,this.lists=[],void 0!==t&&(this.page=t)}return Object.defineProperty(t.prototype,"annotations",{get:function(){return this.internalAnnotations},set:function(t){this.internalAnnotations=t},enumerable:!0,configurable:!0}),t.prototype.add=function(t){this.doAdd(t)},t.prototype.doAdd=function(t){if(void 0===t.destination)return t.setPage(this.page),this.internalAnnotations.add(new Io(t)),this.lists.push(t);var e=(new ws).layout(t.text,t.font,t.stringFormat,new Zo(t.bounds.width,0),!1,new Zo(0,0)),i=t.bounds.y;if(1===e.lines.length){var r=t.font.measureString(e.lines[0].text);t.bounds=new ts(new Qo(t.bounds.x,i),r),t.text=e.lines[0].text,this.page.graphics.drawString(t.text,t.font,null,t.brush,t.bounds.x,t.bounds.y,t.bounds.width,t.bounds.height,null),t.setPage(this.page),this.setColor(t),this.internalAnnotations.add(new Io(t)),this.lists.push(t)}else for(var n=0;n<e.lines.length;n++){r=t.font.measureString(e.lines[n].text);if(0===n)t.bounds=new ts(t.bounds.x,i,r.width,r.height),t.text=e.lines[n].text,this.page.graphics.drawString(t.text,t.font,null,t.brush,t.bounds.x,i,r.width,r.height,null),t.setPage(this.page),this.setColor(t),this.internalAnnotations.add(new Io(t)),this.lists.push(t),i+=t.bounds.height;else{var o=t.clone();o.bounds=new ts(new Qo(t.bounds.x,i),r),o.text=e.lines[n].text,this.page.graphics.drawString(o.text,o.font,null,o.brush,o.bounds.x,o.bounds.y,o.bounds.width,o.bounds.height,null),o.setPage(this.page),this.setColor(o),this.internalAnnotations.add(new Io(o)),this.lists.push(o),i+=o.bounds.height}}},t.prototype.setColor=function(t){var e=Uo.Rgb,i=t.color.toArray(e);t.dictionary.items.setValue(this.dictionaryProperties.c,i)},Object.defineProperty(t.prototype,"element",{get:function(){return this.internalAnnotations},enumerable:!0,configurable:!0}),t}(),sl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),al=function(t){function e(){var e=t.call(this,new io)||this;return e.annotationCollection=null,e.beginSave=null,e.initialize(),e}return sl(e,t),Object.defineProperty(e.prototype,"document",{get:function(){return null!==this.section&&null!==this.section.parent?this.section.parent.document:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"graphics",{get:function(){var t=this.defaultLayer.graphics;return t.currentPage=this,t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"crossTable",{get:function(){if(null===this.section)throw new Error("PdfDocumentException : Page is not created");return null===this.section.parent?this.section.parentDocument.crossTable:this.section.parent.document.crossTable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this.section.pageSettings.size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"origin",{get:function(){return this.section.pageSettings.origin},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"annotations",{get:function(){return null==this.annotationCollection&&(this.annotationCollection=new ol(this),this.dictionary.items.setValue(this.dictionaryProperties.annots,this.annotationCollection.element),this.annotationCollection.annotations=this.dictionary.items.getValue(this.dictionaryProperties.annots)),this.annotationCollection},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){this.dictionary.items.setValue(this.dictionaryProperties.type,new Zn("Page")),this.dictionary.pageBeginDrawTemplate=new lo(this)},e.prototype.setSection=function(t){this.section=t,this.dictionary.items.setValue(this.dictionaryProperties.parent,new Io(t))},e.prototype.resetProgress=function(){this.isProgressOn=!1},e.prototype.getClientSize=function(){var t=this.section.getActualBounds(this,!0);return new Zo(t.width,t.height)},e.prototype.pageBeginSave=function(){var t=this.document;void 0!==typeof t&&null!=t&&this.drawPageTemplates(t),null!=this.beginSave&&void 0!==this.beginSave&&this.beginSave(this)},e.prototype.drawPageTemplates=function(t){if(this.section.containsTemplates(t,this,!1)){var e=new tl(this,!1);if(this.layers.insert(0,e),this.section.drawTemplates(this,e,t,!1),null!==e.graphics&&void 0!==e.graphics)for(var i=0;i<e.graphics.automaticFields.automaticFields.length;i++){var r=e.graphics.automaticFields.automaticFields[i];r.field.performDraw(e.graphics,r.location,r.scalingX,r.scalingY)}}if(this.section.containsTemplates(t,this,!0)){var n=new tl(this,!1);this.layers.add(n),this.section.drawTemplates(this,n,t,!0)}},e}(nl),ll=function(){function t(t){this.pdfPage=void 0!==t?t:null}return Object.defineProperty(t.prototype,"page",{get:function(){return this.pdfPage},enumerable:!0,configurable:!0}),t}(),hl=function(){function t(t){if(this.pdfSection=null,null==t)throw Error('ArgumentNullException("section")');this.section=t}return Object.defineProperty(t.prototype,"section",{get:function(){return this.pdfSection},set:function(t){this.pdfSection=t},enumerable:!0,configurable:!0}),t.prototype.contains=function(t){return this.section.contains(t)},t.prototype.remove=function(t){this.section.remove(t)},t.prototype.add=function(){return this.section.add()},t}(),ul=function(){function t(){}return Object.defineProperty(t.prototype,"left",{get:function(){return this.leftTemplate},set:function(t){this.leftTemplate=this.checkElement(t,zs.Left)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.topTemplate},set:function(t){this.topTemplate=this.checkElement(t,zs.Top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.rightTemplate},set:function(t){this.rightTemplate=this.checkElement(t,zs.Right)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.bottomTemplate},set:function(t){this.bottomTemplate=this.checkElement(t,zs.Bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"EvenLeft",{get:function(){return this.evenLeft},set:function(t){this.evenLeft=this.checkElement(t,zs.Left)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"EvenTop",{get:function(){return this.evenTop},set:function(t){this.evenTop=this.checkElement(t,zs.Top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"EvenRight",{get:function(){return this.evenRight},set:function(t){this.evenRight=this.checkElement(t,zs.Right)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"EvenBottom",{get:function(){return this.evenBottom},set:function(t){this.evenBottom=this.checkElement(t,zs.Bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OddLeft",{get:function(){return this.oddLeft},set:function(t){this.oddLeft=this.checkElement(t,zs.Left)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OddTop",{get:function(){return this.oddTop},set:function(t){this.oddTop=this.checkElement(t,zs.Top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OddRight",{get:function(){return this.oddRight},set:function(t){this.oddRight=this.checkElement(t,zs.Right)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OddBottom",{get:function(){return this.oddBottom},set:function(t){this.oddBottom=this.checkElement(t,zs.Bottom)},enumerable:!0,configurable:!0}),t.prototype.getLeft=function(t){if(null==t)throw new Error("ArgumentNullException:page");return this.isEven(t)?null!=this.EvenLeft?this.EvenLeft:this.left:null!=this.OddLeft?this.OddLeft:this.left},t.prototype.getTop=function(t){if(null==t)throw new Error("ArgumentNullException:page");return this.isEven(t)?null!=this.EvenTop?this.EvenTop:this.top:null!=this.OddTop?this.OddTop:this.top},t.prototype.getRight=function(t){if(null==t)throw new Error("ArgumentNullException:page");return this.isEven(t)?null!=this.EvenRight?this.EvenRight:this.right:null!=this.OddRight?this.OddRight:this.right},t.prototype.getBottom=function(t){if(null==t)throw new Error("ArgumentNullException:page");return this.isEven(t)?null!=this.EvenBottom?this.EvenBottom:this.bottom:null!=this.OddBottom?this.OddBottom:this.bottom},t.prototype.isEven=function(t){var e=t.section.document.pages;return(e.pageCollectionIndex.containsKey(t)?e.pageCollectionIndex.getValue(t)+1:e.indexOf(t)+1)%2==0},t.prototype.checkElement=function(t,e){if(null!=t){if(void 0!==t.type&&t.type!==zs.None)throw new Error("NotSupportedException:Can not reassign the template element. Please, create new one.");t.type=e}return t},t}(),cl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),pl=function(t){function e(){var e=t.call(this)||this;return e.leftValue=e.topValue=e.rightValue=e.bottomValue=e.stampValue=!0,e}return cl(e,t),Object.defineProperty(e.prototype,"applyDocumentLeftTemplate",{get:function(){return this.leftValue},set:function(t){this.leftValue=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"applyDocumentTopTemplate",{get:function(){return this.topValue},set:function(t){this.topValue=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"applyDocumentRightTemplate",{get:function(){return this.rightValue},set:function(t){this.rightValue=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"applyDocumentBottomTemplate",{get:function(){return this.bottomValue},set:function(t){this.bottomValue=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"applyDocumentStamps",{get:function(){return this.stampValue},set:function(t){this.stampValue=t},enumerable:!0,configurable:!0}),e}(ul),dl=function(){function t(t,e){this.pageAdded=new ll,this.pdfPages=[],this.dictionaryProperties=new eo,this.pdfDocument=t,void 0===e?(this.settings=t.pageSettings.clone(),this.initialSettings=this.settings.clone()):(this.settings=e.clone(),this.initialSettings=this.settings.clone()),this.initialize()}return Object.defineProperty(t.prototype,"parent",{get:function(){return this.sectionCollection},set:function(t){this.sectionCollection=t,this.section.items.setValue(this.dictionaryProperties.parent,new Io(t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentDocument",{get:function(){return this.pdfDocument},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pageSettings",{get:function(){return this.settings},set:function(t){if(null==t)throw Error("Value can not be null.");this.settings=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.section},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.pagesReferences.count},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"template",{get:function(){return null==this.pageTemplate&&(this.pageTemplate=new pl),this.pageTemplate},set:function(t){this.pageTemplate=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"document",{get:function(){return this.sectionCollection.document},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pages",{get:function(){return null!=this.pagesCollection&&void 0!==this.pagesCollection||(this.pagesCollection=new hl(this)),this.pagesCollection},enumerable:!0,configurable:!0}),t.prototype.getPages=function(){return this.pdfPages},t.prototype.pointToNativePdf=function(t,e){var i=this.getActualBounds(t,!0);return e.x+=i.x,e.y=this.pageSettings.height-e.y,e},t.prototype.setPageSettings=function(t){this.settings=t,this.state.orientation=t.orientation,this.state.rotate=t.rotate,this.state.size=t.size,this.state.origin=t.origin},t.prototype.initialize=function(){this.pagesReferences=new uo,this.section=new io,this.state=new fl(this.pdfDocument),this.section.sectionBeginSave=new ao(this,this.state),this.pageCount=new ho(0),this.section.items.setValue(this.dictionaryProperties.count,this.pageCount),this.section.items.setValue(this.dictionaryProperties.type,new Zn(this.dictionaryProperties.pages)),this.section.items.setValue(this.dictionaryProperties.kids,this.pagesReferences)},t.prototype.containsTemplates=function(t,e,i){var r=this.getDocumentTemplates(t,e,i),n=this.getSectionTemplates(e,i);return r.length>0||n.length>0},t.prototype.getDocumentTemplates=function(t,e,i){var r=[];return this.template.applyDocumentTopTemplate&&null!=t.template.getTop(e)&&(!t.template.getTop(e).foreground&&!i||t.template.getTop(e).foreground&&i)&&r.push(t.template.getTop(e)),this.template.applyDocumentBottomTemplate&&null!=t.template.getBottom(e)&&(!t.template.getBottom(e).foreground&&!i||t.template.getBottom(e).foreground&&i)&&r.push(t.template.getBottom(e)),this.template.applyDocumentLeftTemplate&&null!=t.template.getLeft(e)&&(!t.template.getLeft(e).foreground&&!i||t.template.getLeft(e).foreground&&i)&&r.push(t.template.getLeft(e)),this.template.applyDocumentRightTemplate&&null!=t.template.getRight(e)&&(!t.template.getRight(e).foreground&&!i||t.template.getRight(e).foreground&&i)&&r.push(t.template.getRight(e)),r},t.prototype.getSectionTemplates=function(t,e){var i=[];if(null!=this.template.getTop(t)){(!(r=this.template.getTop(t)).foreground&&!e||r.foreground&&e)&&i.push(r)}if(null!=this.template.getBottom(t)){(!(r=this.template.getBottom(t)).foreground&&!e||r.foreground&&e)&&i.push(r)}if(null!=this.template.getLeft(t)){(!(r=this.template.getLeft(t)).foreground&&!e||r.foreground&&e)&&i.push(r)}if(null!=this.template.getRight(t)){var r;(!(r=this.template.getRight(t)).foreground&&!e||r.foreground&&e)&&i.push(r)}return i},t.prototype.add=function(t){if(void 0===t){var e=new al;return this.add(e),e}var i=this.checkPresence(t);this.pdfPages.push(t),this.pagesReferences.add(i),t.setSection(this),t.resetProgress(),this.pageAddedMethod(t)},t.prototype.checkPresence=function(t){for(var e=new Io(t),i=!1,r=this.parent,n=0;n<r.section.length;n++){var o=r.section[n];i=i||o.contains(t)}return e},t.prototype.contains=function(t){return 0<=this.indexOf(t)},t.prototype.indexOf=function(t){for(var e=0;e<this.pdfPages.length;e++)if(this.pdfPages[e]===t)return this.pdfPages.indexOf(t);var i=new Io(t);return this.pagesReferences.indexOf(i)},t.prototype.pageAddedMethod=function(t){var e=new ll(t);this.onPageAdded(e);this.parent.document.pages.onPageAdded(e),this.pageCount.intValue=this.count},t.prototype.onPageAdded=function(t){},t.prototype.getActualBounds=function(t,e,i){if(t instanceof al&&"boolean"==typeof e){var r=this.parent.document;return this.getActualBounds(r,t,e)}t=t,e=e,i=i;var n=new ts(0,0,0,0);n.height=i?this.pageSettings.size.height:this.pageSettings.getActualSize().height,n.width=i?this.pageSettings.size.width:this.pageSettings.getActualSize().width;var o=this.getLeftIndentWidth(t,e,i),s=this.getTopIndentHeight(t,e,i),a=this.getRightIndentWidth(t,e,i),l=this.getBottomIndentHeight(t,e,i);return n.x+=o,n.y+=s,n.width-=o+a,n.height-=s+l,n},t.prototype.getLeftIndentWidth=function(t,e,i){if(null==t)throw new Error("ArgumentNullException:document");if(null==e)throw new Error("ArgumentNullException:page");var r=i?this.pageSettings.margins.left:0,n=null!=this.template.getLeft(e)?this.template.getLeft(e).width:0,o=null!=t.template.getLeft(e)?t.template.getLeft(e).width:0;return r+=this.template.applyDocumentLeftTemplate?Math.max(n,o):n},t.prototype.getTopIndentHeight=function(t,e,i){if(null==t)throw new Error("ArgumentNullException:document");if(null==e)throw new Error("ArgumentNullException:page");var r=i?this.pageSettings.margins.top:0,n=null!=this.template.getTop(e)?this.template.getTop(e).height:0,o=null!=t.template.getTop(e)?t.template.getTop(e).height:0;return r+=this.template.applyDocumentTopTemplate?Math.max(n,o):n},t.prototype.getRightIndentWidth=function(t,e,i){if(null==t)throw new Error("ArgumentNullException:document");if(null==e)throw new Error("ArgumentNullException:page");var r=i?this.pageSettings.margins.right:0,n=null!=this.template.getRight(e)?this.template.getRight(e).width:0,o=null!=t.template.getRight(e)?t.template.getRight(e).width:0;return r+=this.template.applyDocumentRightTemplate?Math.max(n,o):n},t.prototype.getBottomIndentHeight=function(t,e,i){if(null==t)throw new Error("ArgumentNullException:document");if(null==e)throw new Error("ArgumentNullException:page");var r=i?this.pageSettings.margins.bottom:0,n=null!=this.template.getBottom(e)?this.template.getBottom(e).height:0,o=null!=t.template.getBottom(e)?t.template.getBottom(e).height:0;return r+=this.template.applyDocumentBottomTemplate?Math.max(n,o):n},t.prototype.remove=function(t){if(null==t)throw Error('ArgumentNullException("page")');var e=this.pdfPages.indexOf(t);this.pagesReferences.removeAt(e);for(var i=[],r=0;r<e;r++)i.push(this.pdfPages[r]);for(r=e+1;r<this.pdfPages.length;r++)i.push(this.pdfPages[r]);this.pdfPages=i},t.prototype.applyPageSettings=function(t,e,i){var r=new ts(i.origin,i.size);t.items.setValue(this.dictionaryProperties.mediaBox,uo.fromRectangle(r));var n=0;n=gl.rotateFactor*i.rotate;var o=new ho(n);t.items.setValue(this.dictionaryProperties.rotate,o)},t.prototype.beginSave=function(t,e){var i=e.document;this.applyPageSettings(this.section,i.pageSettings,t)},t.prototype.drawTemplates=function(t,e,i,r){var n=this.getDocumentTemplates(i,t,r),o=this.getSectionTemplates(t,r);this.drawTemplatesHelper(e,i,n),this.drawTemplatesHelper(e,i,o)},t.prototype.drawTemplatesHelper=function(t,e,i){if(null!=i&&i.length>0)for(var r=i.length,n=0;n<r;n++){i[n].draw(t,e)}},t}(),fl=function(){function t(t){this.pageOrientation=t.pageSettings.orientation,this.pageRotate=t.pageSettings.rotate,this.pageSize=t.pageSettings.size,this.pageOrigin=t.pageSettings.origin}return Object.defineProperty(t.prototype,"orientation",{get:function(){return this.pageOrientation},set:function(t){this.pageOrientation=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rotate",{get:function(){return this.pageRotate},set:function(t){this.pageRotate=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.pageSize},set:function(t){this.pageSize=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"origin",{get:function(){return this.pageOrigin},set:function(t){this.pageOrigin=t},enumerable:!0,configurable:!0}),t}(),gl=function(){function t(t){this.sections=[],this.dictionaryProperties=new eo,this.pdfDocument=t.clone(),this.initialize()}return Object.defineProperty(t.prototype,"section",{get:function(){return this.sections},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"document",{get:function(){return this.pdfDocument},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.sections.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.pages},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){this.sectionCount=new ho(0),this.sectionCollection=new uo,this.pages=new io,this.pages.beginSave=new ro(this),this.pages.items.setValue(this.dictionaryProperties.type,new Zn("Pages")),this.pages.items.setValue(this.dictionaryProperties.kids,this.sectionCollection),this.pages.items.setValue(this.dictionaryProperties.count,this.sectionCount),this.pages.items.setValue(this.dictionaryProperties.resources,new io),this.setPageSettings(this.pages,this.pdfDocument.pageSettings)},t.prototype.pdfSectionCollection=function(t){if(t<0||t>=this.count)throw new Error("IndexOutOfRangeException()");return this.sections[t]},t.prototype.setPageSettings=function(t,e){var i=new ts(new Qo,e.size);t.items.setValue(this.dictionaryProperties.mediaBox,uo.fromRectangle(i))},t.prototype.add=function(t){if(void 0===t){var e=new dl(this.pdfDocument);return this.add(e),e}var i=this.checkSection(t);return this.sections.push(t),t.parent=this,this.sectionCollection.add(i),this.sections.indexOf(t)},t.prototype.checkSection=function(t){var e=new Io(t);this.sectionCollection.contains(e);return e},t.prototype.countPages=function(){var t=0;return this.sections.forEach(function(e){return t+=e.count}),t},t.prototype.beginSave=function(){this.sectionCount.intValue=this.countPages()},t.rotateFactor=90,t}(),ml=function(){function t(t){this.pdfPageCollectionIndex=new Qn,this.document=t}return Object.defineProperty(t.prototype,"count",{get:function(){return this.countPages()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pageCollectionIndex",{get:function(){return this.pdfPageCollectionIndex},enumerable:!0,configurable:!0}),t.prototype.add=function(t){if(void 0===t){var e=new al;return this.add(e),e}this.getLastSection().add(t)},t.prototype.getLastSection=function(){var t=this.document.sections;0===t.section.length&&t.add();return t.section[t.section.length-1]},t.prototype.onPageAdded=function(t){},t.prototype.countPages=function(){for(var t=this.document.sections,e=0,i=0;i<t.section.length;i++)e+=t.section[i].count;return e},t.prototype.getPageByIndex=function(t){return this.getPage(t)},t.prototype.getPage=function(t){if(t<0||t>=this.count)throw Error('ArgumentOutOfRangeException("index", "Value can not be less 0")');for(var e=null,i=0,r=0,n=0,o=this.document.sections.count,s=0;s<o;s++){var a=this.document.sections.section[s];if(r=a.count,n=t-i,t>=i&&n<r){e=a.getPages()[n];break}i+=r}return e},t.prototype.indexOf=function(t){var e=-1;if(null==t)throw new Error("ArgumentNullException: page");for(var i=0,r=0,n=this.document.sections.count;r<n;r++){var o=this.document.sections.pdfSectionCollection(r);if((e=o.indexOf(t))>=0){e+=i;break}e=-1,i+=o.count}return e},t.prototype.remove=function(t){if(null==t)throw Error('ArgumentNullException("page")');for(var e=null,i=0,r=this.document.sections.count;i<r;i++)if((e=this.document.sections.pdfSectionCollection(i)).pages.contains(t)){e.pages.remove(t);break}return e},t}(),yl=function(){function t(){this.referenceObjects=[],this.pdfFontCollection=new Qn}return t.prototype.search=function(t){var e=null,i=this.getGroup(t);return null==i?i=this.createNewGroup():i.length>0&&(e=i[0]),i.push(t),e},t.prototype.createNewGroup=function(){var t=[];return this.referenceObjects.push(t),t},t.prototype.getGroup=function(t){var e=null;if(null!==t)for(var i=this.referenceObjects.length,r=0;r<i;r++){if(this.referenceObjects.length>0){var n=this.referenceObjects[r];if(n.length>0){var o=n[0];if(t.equalsTo(o)){e=n;break}}else this.removeGroup(n)}i=this.referenceObjects.length}return e},t.prototype.removeGroup=function(t){if(null!==t){var e=this.referenceObjects.indexOf(t);this.referenceObjects.slice(e,e+1)}},t.prototype.destroy=function(){this.pdfFontCollection=void 0,this.referenceObjects=void 0},t}(),bl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),vl=function(t){function e(i){var r=t.call(this)||this;r.defaultMargin=40,r.streamWriter=null,r.document=r;var n=!1;void 0===i?(e.cacheCollection=new yl,n=!1):n=i;var o=new Ls;r.setMainObjectCollection(o);var s=new js;s.isMerging=n,s.document=r,r.setCrossTable(s);var a=new Es;return r.setCatalog(a),o.add(a),a.position=-1,r.sectionCollection=new gl(r),r.documentPageCollection=new ml(r),a.pages=r.sectionCollection,r}return bl(e,t),Object.defineProperty(e,"defaultFont",{get:function(){return null==this.defaultStandardFont&&(this.defaultStandardFont=new Pl(os.Helvetica,8)),this.defaultStandardFont},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"sections",{get:function(){return this.sectionCollection},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pageSettings",{get:function(){return null==this.settings&&(this.settings=new Hs(this.defaultMargin)),this.settings},set:function(t){this.settings=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pages",{get:function(){return this.documentPageCollection},enumerable:!0,configurable:!0}),Object.defineProperty(e,"cache",{get:function(){return void 0===e.cacheCollection||null==e.cacheCollection?new yl:e.cacheCollection},set:function(t){this.cacheCollection=t},enumerable:!0,configurable:!0}),Object.defineProperty(e,"enableCache",{get:function(){return this.isCacheEnabled},set:function(t){this.isCacheEnabled=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"colorSpace",{get:function(){return this.pdfColorSpace===Uo.Rgb||this.pdfColorSpace===Uo.Cmyk||this.pdfColorSpace===Uo.GrayScale?this.pdfColorSpace:Uo.Rgb},set:function(t){t===Uo.Rgb||t===Uo.Cmyk||t===Uo.GrayScale?this.pdfColorSpace=t:this.pdfColorSpace=Uo.Rgb},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"template",{get:function(){return null==this.pageTemplate&&(this.pageTemplate=new ul),this.pageTemplate},set:function(t){this.pageTemplate=t},enumerable:!0,configurable:!0}),e.prototype.docSave=function(t,e,i){if(this.checkPagesPresence(),null===t)throw new Error("ArgumentNullException : stream");this.streamWriter=t;var r=new Os(t);if(r.document=this,"boolean"==typeof e&&void 0===i)return this.crossTable.save(r);this.crossTable.save(r,e)},e.prototype.checkPagesPresence=function(){0===this.pages.count&&this.pages.add()},e.prototype.destroy=function(){this.catalog=void 0,this.colorSpace=void 0,this.currentSavingObj=void 0,this.documentPageCollection=void 0,this.isStreamCopied=void 0,this.pageSettings=void 0,this.pageTemplate=void 0,this.pdfColorSpace=void 0,this.sectionCollection=void 0,e.cache.destroy(),this.crossTable.pdfObjects.destroy(),e.cache=void 0,this.streamWriter.destroy()},e.defaultStandardFont=null,e.isCacheEnabled=!0,e}(Ms),wl=function(){function t(){}return t.getMetrics=function(t,e,i){var r=null;switch(t){case os.Helvetica:r=this.getHelveticaMetrics(t,e,i);break;case os.Courier:r=this.getCourierMetrics(t,e,i);break;case os.TimesRoman:r=this.getTimesMetrics(t,e,i);break;case os.Symbol:r=this.getSymbolMetrics(t,e,i);break;case os.ZapfDingbats:r=this.getZapfDingbatsMetrics(t,e,i);break;default:r=this.getHelveticaMetrics(os.Helvetica,e,i)}return r.name=t.toString(),r.subScriptSizeFactor=this.subSuperScriptFactor,r.superscriptSizeFactor=this.subSuperScriptFactor,r},t.getHelveticaMetrics=function(t,e,i){var r=new Da;return(e&Jo.Bold)>0&&(e&Jo.Italic)>0?(r.ascent=this.helveticaBoldItalicAscent,r.descent=this.helveticaBoldItalicDescent,r.postScriptName=this.helveticaBoldItalicName,r.size=i,r.widthTable=new Ea(this.arialBoldWidth),r.height=r.ascent-r.descent):(e&Jo.Bold)>0?(r.ascent=this.helveticaBoldAscent,r.descent=this.helveticaBoldDescent,r.postScriptName=this.helveticaBoldName,r.size=i,r.widthTable=new Ea(this.arialBoldWidth),r.height=r.ascent-r.descent):(e&Jo.Italic)>0?(r.ascent=this.helveticaItalicAscent,r.descent=this.helveticaItalicDescent,r.postScriptName=this.helveticaItalicName,r.size=i,r.widthTable=new Ea(this.arialWidth),r.height=r.ascent-r.descent):(r.ascent=this.helveticaAscent,r.descent=this.helveticaDescent,r.postScriptName=this.helveticaName,r.size=i,r.widthTable=new Ea(this.arialWidth),r.height=r.ascent-r.descent),r},t.getCourierMetrics=function(t,e,i){var r=new Da;return(e&Jo.Bold)>0&&(e&Jo.Italic)>0?(r.ascent=this.courierBoldItalicAscent,r.descent=this.courierBoldItalicDescent,r.postScriptName=this.courierBoldItalicName,r.size=i,r.widthTable=new Ea(this.fixedWidth),r.height=r.ascent-r.descent):(e&Jo.Bold)>0?(r.ascent=this.courierBoldAscent,r.descent=this.courierBoldDescent,r.postScriptName=this.courierBoldName,r.size=i,r.widthTable=new Ea(this.fixedWidth),r.height=r.ascent-r.descent):(e&Jo.Italic)>0?(r.ascent=this.courierItalicAscent,r.descent=this.courierItalicDescent,r.postScriptName=this.courierItalicName,r.size=i,r.widthTable=new Ea(this.fixedWidth),r.height=r.ascent-r.descent):(r.ascent=this.courierAscent,r.descent=this.courierDescent,r.postScriptName=this.courierName,r.size=i,r.widthTable=new Ea(this.fixedWidth),r.height=r.ascent-r.descent),r},t.getTimesMetrics=function(t,e,i){var r=new Da;return(e&Jo.Bold)>0&&(e&Jo.Italic)>0?(r.ascent=this.timesBoldItalicAscent,r.descent=this.timesBoldItalicDescent,r.postScriptName=this.timesBoldItalicName,r.size=i,r.widthTable=new Ea(this.timesRomanBoldItalicWidths),r.height=r.ascent-r.descent):(e&Jo.Bold)>0?(r.ascent=this.timesBoldAscent,r.descent=this.timesBoldDescent,r.postScriptName=this.timesBoldName,r.size=i,r.widthTable=new Ea(this.timesRomanBoldWidth),r.height=r.ascent-r.descent):(e&Jo.Italic)>0?(r.ascent=this.timesItalicAscent,r.descent=this.timesItalicDescent,r.postScriptName=this.timesItalicName,r.size=i,r.widthTable=new Ea(this.timesRomanItalicWidth),r.height=r.ascent-r.descent):(r.ascent=this.timesAscent,r.descent=this.timesDescent,r.postScriptName=this.timesName,r.size=i,r.widthTable=new Ea(this.timesRomanWidth),r.height=r.ascent-r.descent),r},t.getSymbolMetrics=function(t,e,i){var r=new Da;return r.ascent=this.symbolAscent,r.descent=this.symbolDescent,r.postScriptName=this.symbolName,r.size=i,r.widthTable=new Ea(this.symbolWidth),r.height=r.ascent-r.descent,r},t.getZapfDingbatsMetrics=function(t,e,i){var r=new Da;return r.ascent=this.zapfDingbatsAscent,r.descent=this.zapfDingbatsDescent,r.postScriptName=this.zapfDingbatsName,r.size=i,r.widthTable=new Ea(this.zapfDingbatsWidth),r.height=r.ascent-r.descent,r},t.subSuperScriptFactor=1.52,t.helveticaAscent=931,t.helveticaDescent=-225,t.helveticaName="Helvetica",t.helveticaBoldAscent=962,t.helveticaBoldDescent=-228,t.helveticaBoldName="Helvetica-Bold",t.helveticaItalicAscent=931,t.helveticaItalicDescent=-225,t.helveticaItalicName="Helvetica-Oblique",t.helveticaBoldItalicAscent=962,t.helveticaBoldItalicDescent=-228,t.helveticaBoldItalicName="Helvetica-BoldOblique",t.courierAscent=805,t.courierDescent=-250,t.courierName="Courier",t.courierBoldAscent=801,t.courierBoldDescent=-250,t.courierBoldName="Courier-Bold",t.courierItalicAscent=805,t.courierItalicDescent=-250,t.courierItalicName="Courier-Oblique",t.courierBoldItalicAscent=801,t.courierBoldItalicDescent=-250,t.courierBoldItalicName="Courier-BoldOblique",t.timesAscent=898,t.timesDescent=-218,t.timesName="Times-Roman",t.timesBoldAscent=935,t.timesBoldDescent=-218,t.timesBoldName="Times-Bold",t.timesItalicAscent=883,t.timesItalicDescent=-217,t.timesItalicName="Times-Italic",t.timesBoldItalicAscent=921,t.timesBoldItalicDescent=-218,t.timesBoldItalicName="Times-BoldItalic",t.symbolAscent=1010,t.symbolDescent=-293,t.symbolName="Symbol",t.zapfDingbatsAscent=820,t.zapfDingbatsDescent=-143,t.zapfDingbatsName="ZapfDingbats",t.arialWidth=[278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,0,556,0,222,556,333,1e3,556,556,333,1e3,667,333,1e3,0,611,0,0,222,222,333,333,350,556,1e3,333,1e3,500,333,944,0,500,667,0,333,556,556,556,556,260,556,333,737,370,556,584,0,737,333,400,584,333,333,333,556,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,584,611,556,556,556,556,500,556,500],t.arialBoldWidth=[278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,0,556,0,278,556,500,1e3,556,556,333,1e3,667,333,1e3,0,611,0,0,278,278,500,500,350,556,1e3,333,1e3,556,333,944,0,500,667,0,333,556,556,556,556,280,556,333,737,370,556,584,0,737,333,400,584,333,333,333,611,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,584,611,611,611,611,611,556,611,556],t.fixedWidth=[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600],t.timesRomanWidth=[250,333,408,500,500,833,778,180,333,333,500,564,250,333,250,278,500,500,500,500,500,500,500,500,500,500,278,278,564,564,564,444,921,722,667,667,722,611,556,722,722,333,389,722,611,889,722,722,556,722,667,556,611,722,722,944,722,722,611,333,278,333,469,500,333,444,500,444,500,444,333,500,500,278,278,500,278,778,500,500,500,500,333,389,278,500,500,722,500,500,444,480,200,480,541,0,500,0,333,500,444,1e3,500,500,333,1e3,556,333,889,0,611,0,0,333,333,444,444,350,500,1e3,333,980,389,333,722,0,444,722,0,333,500,500,500,500,200,500,333,760,276,500,564,0,760,333,400,564,300,300,333,500,453,250,333,300,310,500,750,750,750,444,722,722,722,722,722,722,889,667,611,611,611,611,333,333,333,333,722,722,722,722,722,722,722,564,722,722,722,722,722,722,556,500,444,444,444,444,444,444,667,444,444,444,444,444,278,278,278,278,500,500,500,500,500,500,500,564,500,500,500,500,500,500,500,500],t.timesRomanBoldWidth=[250,333,555,500,500,1e3,833,278,333,333,500,570,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500,930,722,667,722,722,667,611,778,778,389,500,778,667,944,722,778,611,778,722,556,667,722,722,1e3,722,722,667,333,278,333,581,500,333,500,556,444,556,444,333,500,556,278,333,556,278,833,556,500,556,556,444,389,333,556,500,722,500,500,444,394,220,394,520,0,500,0,333,500,500,1e3,500,500,333,1e3,556,333,1e3,0,667,0,0,333,333,500,500,350,500,1e3,333,1e3,389,333,722,0,444,722,0,333,500,500,500,500,220,500,333,747,300,500,570,0,747,333,400,570,300,300,333,556,540,250,333,300,330,500,750,750,750,500,722,722,722,722,722,722,1e3,722,667,667,667,667,389,389,389,389,722,722,778,778,778,778,778,570,778,722,722,722,722,722,611,556,500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278,500,556,500,500,500,500,500,570,500,556,556,556,556,500,556,500],t.timesRomanItalicWidth=[250,333,420,500,500,833,778,214,333,333,500,675,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,675,675,675,500,920,611,611,667,722,611,611,722,722,333,444,667,556,833,667,722,611,722,611,500,556,722,611,833,611,556,556,389,278,389,422,500,333,500,500,444,500,444,278,500,500,278,278,444,278,722,500,500,500,500,389,389,278,500,444,667,444,444,389,400,275,400,541,0,500,0,333,500,556,889,500,500,333,1e3,500,333,944,0,556,0,0,333,333,556,556,350,500,889,333,980,389,333,667,0,389,556,0,389,500,500,500,500,275,500,333,760,276,500,675,0,760,333,400,675,300,300,333,500,523,250,333,300,310,500,750,750,750,500,611,611,611,611,611,611,889,667,611,611,611,611,333,333,333,333,722,667,722,722,722,722,722,675,722,722,722,722,722,556,611,500,500,500,500,500,500,500,667,444,444,444,444,444,278,278,278,278,500,500,500,500,500,500,500,675,500,500,500,500,500,444,500,444],t.timesRomanBoldItalicWidths=[250,389,555,500,500,833,778,278,333,333,500,570,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500,832,667,667,667,722,667,667,722,778,389,500,667,611,889,722,722,611,722,667,556,611,722,667,889,667,611,611,333,278,333,570,500,333,500,500,444,500,444,333,500,556,278,278,500,278,778,556,500,500,500,389,389,278,556,444,667,500,444,389,348,220,348,570,0,500,0,333,500,500,1e3,500,500,333,1e3,556,333,944,0,611,0,0,333,333,500,500,350,500,1e3,333,1e3,389,333,722,0,389,611,0,389,500,500,500,500,220,500,333,747,266,500,606,0,747,333,400,570,300,300,333,576,500,250,333,300,300,500,750,750,750,500,667,667,667,667,667,667,944,667,667,667,667,667,389,389,389,389,722,722,722,722,722,722,722,570,722,722,722,722,722,611,611,500,500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278,500,556,500,500,500,500,500,570,500,556,556,556,556,444,500,444],t.symbolWidth=[250,333,713,500,549,833,778,439,333,333,500,549,250,549,250,278,500,500,500,500,500,500,500,500,500,500,278,278,549,549,549,444,549,722,667,722,612,611,763,603,722,333,631,722,686,889,722,722,768,741,556,592,611,690,439,768,645,795,611,333,863,333,658,500,500,631,549,549,494,439,521,411,603,329,603,549,549,576,521,549,549,521,549,603,439,576,713,686,493,686,494,480,200,480,549,750,620,247,549,167,713,500,753,753,753,753,1042,987,603,987,603,400,549,411,549,549,713,494,460,549,549,549,549,1e3,603,1e3,658,823,686,795,987,768,768,823,768,768,713,713,713,713,713,713,713,768,713,790,790,890,823,549,250,713,603,603,1042,987,603,987,603,494,329,790,790,786,713,384,384,384,384,384,384,494,494,494,494,329,274,686,686,686,384,384,384,384,384,384,494,494,494,-1],t.zapfDingbatsWidth=[278,974,961,974,980,719,789,790,791,690,960,939,549,855,911,933,911,945,974,755,846,762,761,571,677,763,760,759,754,494,552,537,577,692,786,788,788,790,793,794,816,823,789,841,823,833,816,831,923,744,723,749,790,792,695,776,768,792,759,707,708,682,701,826,815,789,789,707,687,696,689,786,787,713,791,785,791,873,761,762,762,759,759,892,892,788,784,438,138,277,415,392,392,668,668,390,390,317,317,276,276,509,509,410,410,234,234,334,334,732,544,544,910,667,760,760,776,595,694,626,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,894,838,1016,458,748,924,748,918,927,928,928,834,873,828,924,924,917,930,931,463,883,836,836,867,867,696,696,874,874,760,946,771,865,771,888,967,888,831,873,927,970,918],t}(),Sl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Pl=function(t){function e(i,r,n){var o=t.call(this,r,void 0===n?i instanceof e?i.style:Jo.Regular:n)||this;return o.dictionaryProperties=new eo,o.encodings=["Unknown","StandardEncoding","MacRomanEncoding","MacExpertEncoding","WinAnsiEncoding","PDFDocEncoding","IdentityH"],o.pdfFontFamily=void 0===i?os.Helvetica:i instanceof e?i.fontFamily:i,o.checkStyle(),o.initializeInternals(),o}return Sl(e,t),Object.defineProperty(e.prototype,"fontFamily",{get:function(){return this.pdfFontFamily},enumerable:!0,configurable:!0}),e.prototype.checkStyle=function(){if(this.fontFamily===os.Symbol||this.fontFamily===os.ZapfDingbats){var t=this.style;t&=~(Jo.Bold|Jo.Italic),this.setStyle(t)}},e.prototype.getLineWidth=function(t,i){if(null==t)throw new Error("ArgumentNullException:line");for(var r=0,n=(this.name,0),o=(t=e.convert(t)).length;n<o;n++){var s=t[n];r+=this.getCharWidthInternal(s,i)}var a=this.metrics.getSize(i);return r*=xs.charSizeMultiplier*a,r=this.applyFormatSettings(t,i,r)},e.prototype.equalsToFont=function(t){var e=!1,i=t;if(null!=i){var r=this.fontFamily===i.fontFamily,n=~(Jo.Underline|Jo.Strikeout),o=(this.style&n)==(i.style&n);e=r&&o}return e},e.prototype.initializeInternals=function(){vl.cache.search(this);var t=null,e=wl.getMetrics(this.pdfFontFamily,this.style,this.size);this.metrics=e,t=this.createInternals(),this.setInternals(t)},e.prototype.createInternals=function(){var t=new io;if(t.items.setValue(this.dictionaryProperties.type,new Zn(this.dictionaryProperties.font)),t.items.setValue(this.dictionaryProperties.subtype,new Zn(this.dictionaryProperties.type1)),t.items.setValue(this.dictionaryProperties.baseFont,new Zn(this.metrics.postScriptName)),this.fontFamily!==os.Symbol&&this.fontFamily!==os.ZapfDingbats){var e=this.encodings[hs.WinAnsiEncoding];t.items.setValue(this.dictionaryProperties.encoding,new Zn(e))}return t},e.prototype.getCharWidthInternal=function(t,i){var r=0;r=t.charCodeAt(0),"0"!==this.name&&"1"!==this.name&&"2"!==this.name&&"3"!==this.name&&"4"!==this.name||(r-=e.charOffset),r=r>=0&&128!==r?r:0;return this.metrics.widthTable.items(r)},e.convert=function(t){return t},e.charOffset=32,e}(xs),Cl=function(){function t(t){this.dictionaryProperties=new eo,this.pdfColor=new Xo(255,255,255),this.rectangle=new ts(0,0,0,0),this.pdfPage=null,this.textBrush=new ns(new Xo(0,0,0)),this.textFont=new Pl(os.TimesRoman,10),this.format=new bs(Vo.Left),this.content="",this.pdfDictionary=new io,this.internalColor=new Xo,this.darkness=1,void 0===t?this.initialize():(this.initialize(),this.bounds=t)}return Object.defineProperty(t.prototype,"color",{get:function(){return this.pdfColor},set:function(t){this.pdfColor=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"innerColor",{get:function(){return this.internalColor},set:function(t){this.internalColor=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return this.rectangle},set:function(t){this.rectangle=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"page",{get:function(){return this.pdfPage},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"font",{get:function(){return this.textFont},set:function(t){this.textFont=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stringFormat",{get:function(){return this.format},set:function(t){this.format=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"brush",{get:function(){return this.textBrush},set:function(t){this.textBrush=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return this.content},set:function(t){this.content=t,this.dictionary.items.setValue(this.dictionaryProperties.contents,new Eo(this.content))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dictionary",{get:function(){return this.pdfDictionary},set:function(t){this.pdfDictionary=t},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){this.pdfDictionary.annotationBeginSave=new so(this),this.pdfDictionary.items.setValue(this.dictionaryProperties.type,new Zn(this.dictionaryProperties.annot))},t.prototype.setPage=function(t){this.pdfPage=t,this.pdfDictionary.items.setValue(this.dictionaryProperties.p,new Io(this.pdfPage))},t.prototype.beginSave=function(){this.save()},t.prototype.save=function(){var t=new ts(this.rectangle.x,this.rectangle.y,this.rectangle.width,this.rectangle.height),e=this.pdfPage.section,i=t.height,r=e.pointToNativePdf(this.page,new Qo(t.x,t.y));t.x=r.x,t.width=r.x+t.width,t.y=r.y-this.page.document.pageSettings.margins.top,t.height=t.y-i,this.pdfDictionary.items.setValue(this.dictionaryProperties.rect,uo.fromRectangle(t)),this.dictionary.items.setValue(this.dictionaryProperties.ca,new ho(this.darkness))},Object.defineProperty(t.prototype,"element",{get:function(){return this.pdfDictionary},enumerable:!0,configurable:!0}),t}(),xl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ol=function(t){function e(e){return t.call(this,e)||this}return xl(e,t),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.dictionary.items.setValue(this.dictionaryProperties.subtype,new Zn(this.dictionaryProperties.link))},e}(Cl),Bl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ll=function(t){function e(e){var i=t.call(this,e)||this;return i.pdfAction=null,i}return Bl(e,t),e.prototype.getSetAction=function(t){if(void 0===t)return this.pdfAction;this.pdfAction=t},e}(Ol),Tl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ml=(function(t){function e(e,i){var r=t.call(this,e)||this;return r.pdfDestination=null,void 0!==i&&(r.destination=i),r}Tl(e,t),Object.defineProperty(e.prototype,"destination",{get:function(){return this.pdfDestination},set:function(t){this.pdfDestination=t},enumerable:!0,configurable:!0}),e.prototype.save=function(){t.prototype.save.call(this),null!=this.pdfDestination&&this.dictionary.items.setValue(this.dictionaryProperties.dest,this.pdfDestination.element)},e.prototype.clone=function(){var t=new e(this.bounds,this.destination);return t.color=this.color,t.brush=this.brush,t.destination=this.destination,t.font=this.font,t}}(Ol),function(){function t(t){this.layoutElement=t}return Object.defineProperty(t.prototype,"elements",{get:function(){return this.layoutElement},enumerable:!0,configurable:!0}),t.prototype.getElement=function(){return this.layoutElement},t.prototype.layout=function(t){return this.layoutInternal(t)},t.prototype.Layouter=function(t){return this.layoutInternal(t)},t.prototype.getNextPage=function(t){return t.section.add()},t.prototype.getPaginateBounds=function(t){if(null==t)throw new Error("ArgumentNullException : param");return t.format.usePaginateBounds?t.format.paginateBounds:new ts(t.bounds.x,0,t.bounds.width,t.bounds.height)},t}()),Dl=function(){function t(t){void 0===t||(this.break=t.break,this.layout=t.layout,this.paginateBounds=t.paginateBounds,this.boundsSet=t.usePaginateBounds)}return Object.defineProperty(t.prototype,"layout",{get:function(){return this.layoutType},set:function(t){this.layoutType=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"break",{get:function(){return this.breakType},set:function(t){this.breakType=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paginateBounds",{get:function(){return void 0===this.layoutPaginateBounds&&null==this.layoutPaginateBounds&&(this.layoutPaginateBounds=new ts(0,0,0,0)),this.layoutPaginateBounds},set:function(t){this.layoutPaginateBounds=t,this.boundsSet=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"usePaginateBounds",{get:function(){return this.boundsSet},enumerable:!0,configurable:!0}),t}(),kl=function(){function t(){}return Object.defineProperty(t.prototype,"page",{get:function(){return this.pdfPage},set:function(t){this.pdfPage=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return new ts(this.layoutBounds.x,this.layoutBounds.y,this.layoutBounds.width,this.layoutBounds.height)},set:function(t){this.layoutBounds=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"format",{get:function(){return this.layoutFormat},set:function(t){this.layoutFormat=t},enumerable:!0,configurable:!0}),t}(),El=function(){function t(t,e){this.pdfPage=t,this.layoutBounds=e}return Object.defineProperty(t.prototype,"page",{get:function(){return this.pdfPage},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return this.layoutBounds},enumerable:!0,configurable:!0}),t}(),jl=function(){function t(){var t=new Us(new Xo(0,0,0));t.dashStyle=Ho.Solid;var e=new Us(new Xo(0,0,0));e.dashStyle=Ho.Solid;var i=new Us(new Xo(0,0,0));i.dashStyle=Ho.Solid;var r=new Us(new Xo(0,0,0));r.dashStyle=Ho.Solid,this.leftPen=t,this.rightPen=e,this.topPen=i,this.bottomPen=r}return Object.defineProperty(t.prototype,"left",{get:function(){return this.leftPen},set:function(t){this.leftPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.rightPen},set:function(t){this.rightPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.topPen},set:function(t){this.topPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.bottomPen},set:function(t){this.bottomPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"all",{set:function(t){this.leftPen=this.rightPen=this.topPen=this.bottomPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isAll",{get:function(){return this.leftPen===this.rightPen&&this.leftPen===this.topPen&&this.leftPen===this.bottomPen},enumerable:!0,configurable:!0}),Object.defineProperty(t,"default",{get:function(){return new t},enumerable:!0,configurable:!0}),t}(),Il=function(){function t(t,e,i,r){this.hasLeftPad=!1,this.hasRightPad=!1,this.hasTopPad=!1,this.hasBottomPad=!1,void 0===t?(this.leftPad=this.rightPad=5.76,this.bottomPad=this.topPad=.5):(this.leftPad=t,this.rightPad=e,this.topPad=i,this.bottomPad=r,this.hasLeftPad=!0,this.hasRightPad=!0,this.hasTopPad=!0,this.hasBottomPad=!0)}return Object.defineProperty(t.prototype,"left",{get:function(){return this.leftPad},set:function(t){this.leftPad=t,this.hasLeftPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.rightPad},set:function(t){this.rightPad=t,this.hasRightPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.topPad},set:function(t){this.topPad=t,this.hasTopPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.bottomPad},set:function(t){this.bottomPad=t,this.hasBottomPad=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"all",{set:function(t){this.leftPad=this.rightPad=this.topPad=this.bottomPad=t,this.hasLeftPad=!0,this.hasRightPad=!0,this.hasTopPad=!0,this.hasBottomPad=!0},enumerable:!0,configurable:!0}),t}(),Rl=function(){function t(){}return Object.defineProperty(t.prototype,"raiseBeginPageLayout",{get:function(){return void 0!==this.beginPageLayout},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"raiseEndPageLayout",{get:function(){return void 0!==this.endPageLayout},enumerable:!0,configurable:!0}),t.prototype.onBeginPageLayout=function(t){this.beginPageLayout&&this.beginPageLayout(this,t)},t.prototype.onEndPageLayout=function(t){this.endPageLayout&&this.endPageLayout(this,t)},t.prototype.drawHelper=function(t,e,i,r){if(e instanceof Qo&&void 0===e.width&&void 0===i)return this.drawHelper(t,e.x,e.y);if("number"==typeof e&&"number"==typeof i&&void 0===r)return this.drawHelper(t,e,i,null);if(e instanceof ts&&void 0!==e.width&&void 0===i)return this.drawHelper(t,e,null);if(e instanceof Qo&&void 0===e.width&&i instanceof Dl)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&"number"==typeof i&&(r instanceof Dl||null==r)){var n=t.graphics.clientSize.width-e,o=new ts(e,i,n,0);return this.drawHelper(t,o,r)}if(e instanceof ts&&void 0!==e.width&&"boolean"==typeof i)return this.bEmbedFonts=i,this.drawHelper(t,e,null);var s=new kl,a=e,l=i;if(s.page=t,s.bounds=a,null!=s){var h=s.bounds.x,u=s.bounds.y;0===s.bounds.x&&(h=jl.default.right.width/2),0===s.bounds.y&&(u=jl.default.top.width/2);var c=new ts(h,u,s.bounds.width,s.bounds.height);s.bounds=c}s.format=null!=l?l:new Dl;return this.layout(s)},t}(),Al=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Nl=function(t){function e(e){return t.call(this,e)||this}return Al(e,t),Object.defineProperty(e.prototype,"element",{get:function(){return t.prototype.getElement.call(this)},enumerable:!0,configurable:!0}),e.prototype.layoutInternal=function(t){this.format=null!==this.element.stringFormat&&void 0!==this.element.stringFormat?this.element.stringFormat:null;var e=t.page,i=t.bounds,r=this.element.value,n=null,o=new Fl;for(o.page=e,o.remainder=r;;){o=this.layoutOnPage(r,e,i,t),n=this.getLayoutResult(o);break}return n},e.prototype.getLayoutResult=function(t){return new Vl(t.page,t.bounds,t.remainder,t.lastLineBounds)},e.prototype.layoutOnPage=function(t,e,i,r){var n=new Fl;n.remainder=t,n.page=e,i=this.checkCorrectBounds(e,i);var o=(new ws).layout(t,this.element.font,this.format,i,e.getClientSize().height,!1,new Zo(0,0)),s=null==o.remainder,a=(r.format.break===Va.FitElement||o.empty,e.graphics),l=this.element.getBrush();this.element instanceof Ul&&(l.color=new Xo(0,0,255)),a.drawStringLayoutResult(o,this.element.font,this.element.pen,l,i,this.format);o.lines[o.lineCount-1];return n.lastLineBounds=a.getLineBounds(o.lineCount-1,o,this.element.font,i,this.format),n.bounds=this.getTextPageBounds(e,i,o),n.remainder=o.remainder,n.end=s,n},e.prototype.checkCorrectBounds=function(t,e){var i=t.graphics.clientSize;return e.height=e.height>0?e.height:i.height-e.y,e},e.prototype.getTextPageBounds=function(t,e,i){var r=i.actualSize,n=e.x,o=e.y,s=e.width>0?e.width:r.width,a=r.height;n=t.graphics.checkCorrectLayoutRectangle(r,e.x,e.y,this.format).x;var l=t.graphics.getTextVerticalAlignShift(r.height,e.height,this.format);return new ts(n,o+=l,s,a)},e}(Ml),Fl=function(){return function(){}}(),Vl=function(t){function e(e,i,r,n){var o=t.call(this,e,i)||this;return o.remainderText=r,o.lastLineTextBounds=n,o}return Al(e,t),Object.defineProperty(e.prototype,"remainder",{get:function(){return this.remainderText},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastLineBounds",{get:function(){return this.lastLineTextBounds},enumerable:!0,configurable:!0}),e}(El),zl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Gl=function(t){function e(e,i,r,n,o){var s=t.call(this)||this;return s.content="",s.elementValue="",s.hasPointOverload=!1,s.isPdfTextElement=!1,void 0===e||("string"==typeof e&&void 0===i?(s.content=e,s.elementValue=e):"string"==typeof e&&i instanceof xs&&void 0===r?(s.content=e,s.elementValue=e,s.pdfFont=i):"string"==typeof e&&i instanceof xs&&r instanceof Us&&void 0===n?(s.content=e,s.elementValue=e,s.pdfFont=i,s.pdfPen=r):"string"==typeof e&&i instanceof xs&&r instanceof is&&void 0===n?(s.content=e,s.elementValue=e,s.pdfFont=i,s.pdfBrush=r):(s.content=e,s.elementValue=e,s.pdfFont=i,s.pdfPen=r,s.pdfBrush=n,s.format=o)),s}return zl(e,t),Object.defineProperty(e.prototype,"text",{get:function(){return this.content},set:function(t){this.elementValue=t,this.content=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.elementValue},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pen",{get:function(){return this.pdfPen},set:function(t){this.pdfPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"brush",{get:function(){return this.pdfBrush},set:function(t){this.pdfBrush=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"font",{get:function(){return this.pdfFont},set:function(t){this.pdfFont=t,this.pdfFont instanceof Pl&&null!=this.content?this.elementValue=Pl.convert(this.content):this.elementValue=this.content},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"stringFormat",{get:function(){return this.format},set:function(t){this.format=t},enumerable:!0,configurable:!0}),e.prototype.getBrush=function(){return null==this.pdfBrush||void 0===this.pdfBrush?new ns(new Xo(0,0,0)):this.pdfBrush},e.prototype.layout=function(t){return new Nl(this).layout(t)},e.prototype.drawText=function(t,e,i,r){if(e instanceof Qo&&void 0===e.width&&void 0===i)return this.hasPointOverload=!0,this.drawText(t,e.x,e.y);if("number"==typeof e&&"number"==typeof i&&void 0===r)return this.hasPointOverload=!0,this.drawText(t,e,i,null);if(e instanceof ts&&void 0!==e.width&&void 0===i)return this.drawText(t,e,null);if(e instanceof Qo&&void 0===e.width&&i instanceof Dl)return this.hasPointOverload=!0,this.drawText(t,e.x,e.y,i);if("number"==typeof e&&"number"==typeof i&&(r instanceof Dl||null==r)){this.hasPointOverload=!0;var n=t.graphics.clientSize.width-e,o=new ts(e,i,n,0);return this.drawText(t,o,r)}if(e instanceof ts&&void 0!==e.width&&"boolean"==typeof i)return this.drawText(t,e,null);var s=new ws;if(this.hasPointOverload){var a=s.layout(this.value,this.font,this.stringFormat,new Zo(t.graphics.clientSize.width-e.x,0),!0,t.graphics.clientSize),l=void 0,h=e,u=i;if((m=new kl).page=t,m.bounds=h,m.format=null!=u?u:new Dl,a.lines.length>1){if(this.text=a.layoutLines[0].text,m.bounds.y<=m.page.graphics.clientSize.height){var c=new Qo(m.bounds.x,m.bounds.y);l=this.layout(m);for(var p=new ts(0,l.bounds.y+a.lineHeight,t.graphics.clientSize.width,a.lineHeight),d=1;d<a.lines.length;d++)if(m.page=l.page,m.bounds=new ts(new Qo(p.x,p.y),new Zo(p.width,p.height)),this.text=a.layoutLines[d].text,p.y+a.lineHeight>l.page.graphics.clientSize.height&&(m.page=m.page.graphics.getNextPage(),p=c.y>l.page.graphics.clientSize.height-l.bounds.height?new ts(0,l.bounds.height,l.page.graphics.clientSize.width,a.lineHeight):new ts(0,0,l.page.graphics.clientSize.width,a.lineHeight),m.bounds=p),l=this.layout(m),d!==a.lines.length-1)p=new ts(0,l.bounds.y+a.lineHeight,l.page.graphics.clientSize.width,a.lineHeight);else{var f=this.font.measureString(this.text,this.format).width;l=this.calculateResultBounds(l,f,l.page.graphics.clientSize.width,0)}}return l}var g=this.font.measureString(this.text,this.format);return m.bounds.y<=m.page.graphics.clientSize.height&&(l=this.layout(m),l=this.calculateResultBounds(l,g.width,l.page.graphics.clientSize.width,0)),l}l=s.layout(this.value,this.font,this.stringFormat,new Zo(e.width,0),!1,t.graphics.clientSize);var m,y=void 0;h=e,u=i;if((m=new kl).page=t,m.bounds=h,m.format=null!=u?u:new Dl,l.lines.length>1){if(this.text=l.layoutLines[0].text,m.bounds.y<=m.page.graphics.clientSize.height){c=new Qo(m.bounds.x,m.bounds.y);y=this.layout(m);for(p=new ts(h.x,y.bounds.y+l.lineHeight,h.width,l.lineHeight),d=1;d<l.lines.length;d++)if(m.page=y.page,m.bounds=new ts(p.x,p.y,p.width,p.height),this.text=l.layoutLines[d].text,p.y+l.lineHeight>y.page.graphics.clientSize.height&&(m.page=m.page.graphics.getNextPage(),p=c.y>y.page.graphics.clientSize.height-y.bounds.height?new ts(h.x,l.lineHeight,h.width,l.lineHeight):new ts(h.x,0,h.width,l.lineHeight),m.bounds=p),y=this.layout(m),d!==l.lines.length-1)p=new ts(h.x,y.bounds.y+l.lineHeight,h.width,l.lineHeight);else{f=this.font.measureString(this.text,this.format).width;y=this.calculateResultBounds(y,f,h.width,h.x)}}return y}g=this.font.measureString(this.text,this.format);return m.bounds.y<=m.page.graphics.clientSize.height&&(y=this.layout(m),y=this.calculateResultBounds(y,g.width,h.width,h.x)),y},e.prototype.calculateResultBounds=function(t,e,i,r){return null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Vo.Center?(t.bounds.x=r+(i-e)/2,t.bounds.width=e):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Vo.Right?(t.bounds.x=r+(i-e),t.bounds.width=e):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Vo.Justify?(t.bounds.x=r,t.bounds.width=i):(t.bounds.width=r,t.bounds.width=e),t},e}(Rl),_l=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Hl=function(t){function e(e,i){var r=t.call(this,e)||this;return void 0!==i&&(r.uri=i),r}return _l(e,t),Object.defineProperty(e.prototype,"uriAction",{get:function(){return void 0===this.pdfUriAction&&(this.pdfUriAction=new No),this.pdfUriAction},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"uri",{get:function(){return this.uriAction.uri},set:function(t){this.uriAction.uri!==t&&(this.uriAction.uri=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"action",{get:function(){return this.getSetAction()},set:function(t){this.getSetAction(t),this.uriAction.next=t},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.dictionary.items.setValue(this.dictionaryProperties.subtype,new Zn(this.dictionaryProperties.link));this.uriAction.element;this.dictionary.items.setValue(this.dictionaryProperties.a,this.uriAction.element)},e}(Ll),Wl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Ul=function(t){function e(){var e=t.call(this)||this;e.uniformResourceLocator="",e.uriAnnotation=null,e.recalculateBounds=!1,e.defaultBorder=new uo;for(var i=0;i<3;i++)e.defaultBorder.add(new ho(0));return e}return Wl(e,t),Object.defineProperty(e.prototype,"url",{get:function(){return this.uniformResourceLocator},set:function(t){if(0===t.length)throw new Error("ArgumentException : Url - string can not be empty");this.uniformResourceLocator=t},enumerable:!0,configurable:!0}),e.prototype.draw=function(t,e){if(t instanceof al){var i=new ws,r=this.font.style;if(e instanceof Qo){this.recalculateBounds=!0,this.font.style=Jo.Underline;if(1===(a=i.layout(this.value,this.font,this.stringFormat,new Zo(t.graphics.clientSize.width-e.x,0),!0,t.graphics.clientSize)).lines.length){var n=this.font.measureString(this.value),o=new ts(e,n);o=this.calculateBounds(o,n.width,t.graphics.clientSize.width,e.x),this.uriAnnotation=new Hl(o,this.url),this.uriAnnotation.dictionary.items.setValue("Border",this.defaultBorder),t.annotations.add(this.uriAnnotation);var s=this.drawText(t,e);return this.font.style=r,s}s=this.drawMultipleLineWithPoint(a,t,e);return this.font.style=r,s}var a=i.layout(this.value,this.font,this.stringFormat,new Zo(e.width,0),!1,new Zo(0,0));if(this.font.style=Jo.Underline,1===a.lines.length){n=this.font.measureString(this.value),o=new ts(new Qo(e.x,e.y),n);o=this.calculateBounds(o,n.width,e.width,e.x),this.uriAnnotation=new Hl(o,this.url),this.uriAnnotation.dictionary.items.setValue("Border",this.defaultBorder),t.annotations.add(this.uriAnnotation);var l=this.drawText(t,e);return this.font.style=r,l}l=this.drawMultipleLineWithBounds(a,t,e);return this.font.style=r,l}var h=new al;return h=t.page,this.draw(h,e)},e.prototype.drawMultipleLineWithPoint=function(t,e,i){for(var r,n=0;n<t.layoutLines.length;n++){var o=this.font.measureString(t.lines[n].text),s=new ts(i,o);if(0!==n&&(s.x=0),this.text=t.lines[n].text,s.y+o.height>e.graphics.clientSize.height){if(0===n)break;e=e.graphics.getNextPage(),s=new ts(0,0,e.graphics.clientSize.width,o.height),i.y=0}s=this.calculateBounds(s,o.width,e.graphics.clientSize.width,s.x),this.uriAnnotation=new Hl(s,this.url),this.uriAnnotation.dictionary.items.setValue("Border",this.defaultBorder),e.annotations.add(this.uriAnnotation),r=0!==n?this.drawText(e,new Qo(0,s.y)):this.drawText(e,s.x,s.y),i.y+=o.height}return r},e.prototype.drawMultipleLineWithBounds=function(t,e,i){for(var r,n=0;n<t.layoutLines.length;n++){var o=this.font.measureString(t.lines[n].text),s=new ts(new Qo(i.x,i.y),o);if(s=this.calculateBounds(s,o.width,i.width,i.x),this.text=t.lines[n].text,i.y+o.height>e.graphics.clientSize.height){if(0===n)break;e=e.graphics.getNextPage(),i=new ts(i.x,0,i.width,o.height),s.y=0}this.uriAnnotation=new Hl(s,this.url),this.uriAnnotation.dictionary.items.setValue("Border",this.defaultBorder),e.annotations.add(this.uriAnnotation),r=this.drawText(e,i),i.y+=o.height}return r},e.prototype.calculateBounds=function(t,e,i,r){return null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Vo.Center?(t.x=r+(i-e)/2,t.width=e):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Vo.Right?(t.x=r+(i-e),t.width=e):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Vo.Justify?(t.x=r,t.width=i):(t.width=r,t.width=e),t},e}(Gl),ql=function(){function t(){}return t.convert=function(t,e){var i="";switch(e){case Ns.None:i="";break;case Ns.Numeric:i=t.toString();break;case Ns.LowerLatin:i=this.arabicToLetter(t).toLowerCase();break;case Ns.LowerRoman:i=this.arabicToRoman(t).toLowerCase();break;case Ns.UpperLatin:i=this.arabicToLetter(t);break;case Ns.UpperRoman:i=this.arabicToRoman(t)}return i},t.arabicToRoman=function(t){var e="",i=this.generateNumber(t,1e3,"M");e+=i.returnValue,t=i.intArabic;var r=this.generateNumber(t,900,"CM");e+=r.returnValue,t=r.intArabic;var n=this.generateNumber(t,500,"D");e+=n.returnValue,t=n.intArabic;var o=this.generateNumber(t,400,"CD");e+=o.returnValue,t=o.intArabic;var s=this.generateNumber(t,100,"C");e+=s.returnValue,t=s.intArabic;var a=this.generateNumber(t,90,"XC");e+=a.returnValue,t=a.intArabic;var l=this.generateNumber(t,50,"L");e+=l.returnValue,t=l.intArabic;var h=this.generateNumber(t,40,"XL");e+=h.returnValue,t=h.intArabic;var u=this.generateNumber(t,10,"X");e+=u.returnValue,t=u.intArabic;var c=this.generateNumber(t,9,"IX");e+=c.returnValue,t=c.intArabic;var p=this.generateNumber(t,5,"V");e+=p.returnValue,t=p.intArabic;var d=this.generateNumber(t,4,"IV");e+=d.returnValue,t=d.intArabic;var f=this.generateNumber(t,1,"I");return e+=f.returnValue,t=f.intArabic,e.toString()},t.arabicToLetter=function(t){for(var e=this.convertToLetter(t),i="";e.length>0;){var r=e.pop();i=this.appendChar(i,r)}return i.toString()},t.generateNumber=function(t,e,i){for(var r="";t>=e;)t-=e,r+=i;return{returnValue:r.toString(),intArabic:t}},t.convertToLetter=function(t){if(t<=0)throw Error("ArgumentOutOfRangeException-arabic, Value can not be less 0");for(var e=[];t>this.letterLimit;){var i=t%this.letterLimit;0===i?(t=t/this.letterLimit-1,i=this.letterLimit):t/=this.letterLimit,e.push(i)}return e.push(t),e},t.appendChar=function(e,i){return e+=String.fromCharCode(t.acsiiStartIndex+i)},t.letterLimit=26,t.acsiiStartIndex=64,t}(),Kl=function(){function t(t,e){this.pdfTemplate=null,this.content="",void 0===t||(this.template=t,this.value=e)}return Object.defineProperty(t.prototype,"template",{get:function(){return this.pdfTemplate},set:function(t){this.pdfTemplate=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.content},set:function(t){this.content=t},enumerable:!0,configurable:!0}),t}(),Yl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),$l=function(t){function e(){var e=t.call(this)||this;return e.list=new $s,e}return Yl(e,t),e.prototype.performDraw=function(e,i,r,n){t.prototype.performDrawHelper.call(this,e,i,r,n);var o=this.getValue(e),s=new Wa(this.getSize());this.list.setValue(e,new Kl(s,o));var a=this.getSize();s.graphics.drawString(o,this.getFont(),this.pen,this.getBrush(),0,0,a.width,a.height,this.stringFormat);var l=new Qo(i.x+this.location.x,i.y+this.location.y);e.drawPdfTemplate(s,l,new Zo(s.width*r,s.height*n))},e}(ta),Jl=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Xl=(function(t){function e(e,i){var r=t.call(this)||this;return r.internalNumberStyle=Ns.Numeric,void 0===i?r.font=e:i instanceof is?(r.font=e,r.brush=i):(r.font=e,r.bounds=i),r}Jl(e,t),Object.defineProperty(e.prototype,"numberStyle",{get:function(){return this.internalNumberStyle},set:function(t){this.internalNumberStyle=t},enumerable:!0,configurable:!0}),e.prototype.getValue=function(t){var e=this.getPageFromGraphics(t);return this.internalGetValue(e)},e.prototype.internalGetValue=function(t){var e=t.document.pages.indexOf(t)+1;return ql.convert(e,this.numberStyle)}}($l),function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),Ql=(function(t){function e(e,i,r){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o];var s=t.call(this)||this;return s.internalAutomaticFields=null,s.internalText="",s.font=e,s.brush=i,s.text=r,s.automaticFields=n,s}Xl(e,t),Object.defineProperty(e.prototype,"text",{get:function(){return this.internalText},set:function(t){this.internalText=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"automaticFields",{get:function(){return this.internalAutomaticFields},set:function(t){this.internalAutomaticFields=t},enumerable:!0,configurable:!0}),e.prototype.getValue=function(t){var e=this.text.toString();if(void 0!==this.automaticFields&&null!=this.automaticFields&&this.automaticFields.length>0)for(var i=0;i<this.automaticFields.length;i++){var r=this.automaticFields[i];e=e.replace("{"+i+"}",r.getValue(t))}return e}}($l),function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),Zl=function(t){function e(){var e=t.call(this)||this;return e.list=new $s,e.painterGraphics=[],e}return Ql(e,t),e.prototype.performDraw=function(e,i,r,n){t.prototype.performDrawHelper.call(this,e,i,r,n);var o=this.getPageFromGraphics(e).document,s=this.getValue(e);if(this.list.containsKey(o)){var a=this.list.getValue(o),l=new Qo(i.x+this.location.x,i.y+this.location.y);e.drawPdfTemplate(a.template,l,new Zo(a.template.width*r,a.template.height*n)),this.painterGraphics.push(e)}else{var h=this.getSize(),u=new Wa(h);this.list.setValue(o,new Kl(u,s)),u.graphics.drawString(s,this.getFont(),this.pen,this.getBrush(),0,0,h.width,h.height,this.stringFormat);l=new Qo(i.x+this.location.x,i.y+this.location.y);e.drawPdfTemplate(u,l,new Zo(u.width*r,u.height*n)),this.painterGraphics.push(e)}},e}(ta),th=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();!function(t){function e(e,i){var r=t.call(this)||this;return r.internalNumberStyle=Ns.Numeric,void 0===i?r.font=e:i instanceof is?(r.font=e,r.brush=i):(r.font=e,r.bounds=i),r}th(e,t),Object.defineProperty(e.prototype,"numberStyle",{get:function(){return this.internalNumberStyle},set:function(t){this.internalNumberStyle=t},enumerable:!0,configurable:!0}),e.prototype.getValue=function(t){var e=this.getPageFromGraphics(t).section.parent.document.pages.count;return ql.convert(e,this.numberStyle)}}(Zl);!function(t){t[t.Location=0]="Location",t[t.FitToPage=1]="FitToPage",t[t.FitR=2]="FitR"}(Ga||(Ga={}));!function(){function t(t,e){this.dictionaryProperties=new eo,this.destinationMode=Ga.Location,this.zoomFactor=0,this.destinationLocation=new Qo(0,0),this.bounds=new ts,this.array=new uo;As.RotateAngle0;this.destinationLocation=new Qo(0,this.destinationLocation.y),this.pdfPage=t,e instanceof Qo?this.destinationLocation=e:this.bounds=e}Object.defineProperty(t.prototype,"zoom",{get:function(){return this.zoomFactor},set:function(t){this.zoomFactor=t,this.initializePrimitive()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"page",{get:function(){return this.pdfPage},set:function(t){this.pdfPage=t,this.initializePrimitive()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mode",{get:function(){return this.destinationMode},set:function(t){this.destinationMode=t,this.initializePrimitive()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this.destinationLocation},set:function(t){this.destinationLocation=t,this.initializePrimitive()},enumerable:!0,configurable:!0}),t.prototype.pointToNativePdf=function(t,e){return t.section.pointToNativePdf(t,e)},t.prototype.initializePrimitive=function(){switch(this.array.clear(),this.array.add(new Io(this.pdfPage)),this.destinationMode){case Ga.Location:var t=this.pdfPage,e=new Qo;e=this.pointToNativePdf(t,this.destinationLocation),this.array.add(new Zn(this.dictionaryProperties.xyz)),this.array.add(new ho(e.x)),this.array.add(new ho(e.y)),this.array.add(new ho(this.zoomFactor));break;case Ga.FitToPage:this.array.add(new Zn(this.dictionaryProperties.fit))}},Object.defineProperty(t.prototype,"element",{get:function(){return this.initializePrimitive(),this.array},enumerable:!0,configurable:!0})}();var eh,ih=function(){function t(t){this.mDictionary=null,this.mDictionaryProperties=new eo,this.mDictionary=t}return Object.defineProperty(t.prototype,"domain",{get:function(){return this.mDictionary.items.getValue(this.mDictionaryProperties.domain)},set:function(t){this.mDictionary.items.setValue(this.mDictionaryProperties.domain,t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"range",{get:function(){return this.mDictionary.items.getValue(this.mDictionaryProperties.range)},set:function(t){this.mDictionary.items.setValue(this.mDictionaryProperties.range,t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dictionary",{get:function(){return this.mDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this.mDictionary},enumerable:!0,configurable:!0}),t}(),rh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),nh=function(t){function e(e,i,r,n){var o=t.call(this,new To)||this;return void 0===e?o.dictionary.items.setValue(o.mDictionaryProperties.functionType,new ho(0)):(o.dictionary.items.setValue(o.mDictionaryProperties.functionType,new ho(0)),o.checkParams(e,i,r,n),o.setDomainAndRange(e,i),o.setSizeAndValues(r,n)),o}return rh(e,t),e.prototype.checkParams=function(t,e,i,r){e.length,t.length,r.length},e.prototype.setDomainAndRange=function(t,e){this.domain=new uo(t),this.range=new uo(e)},e.prototype.setSizeAndValues=function(t,e){var i=this.dictionary;this.dictionary.items.setValue(this.mDictionaryProperties.size,new uo(t)),this.dictionary.items.setValue(this.mDictionaryProperties.bitsPerSample,new ho(8)),i.writeBytes(e)},e}(ih);!function(t){t[t.None=0]="None",t[t.Start=1]="Start",t[t.End=2]="End",t[t.Both=3]="Both"}(eh||(eh={}));var oh;!function(t){t[t.BackwardDiagonal=0]="BackwardDiagonal",t[t.ForwardDiagonal=1]="ForwardDiagonal",t[t.Horizontal=2]="Horizontal",t[t.Vertical=3]="Vertical"}(oh||(oh={}));var sh;!function(t){t[t.Function=1]="Function",t[t.Axial=2]="Axial",t[t.Radial=3]="Radial"}(sh||(sh={}));var ah;!function(t){t[t.ActiveBorder=1]="ActiveBorder",t[t.ActiveCaption=2]="ActiveCaption",t[t.ActiveCaptionText=3]="ActiveCaptionText",t[t.AppWorkspace=4]="AppWorkspace",t[t.Control=5]="Control",t[t.ControlDark=6]="ControlDark",t[t.ControlDarkDark=7]="ControlDarkDark",t[t.ControlLight=8]="ControlLight",t[t.ControlLightLight=9]="ControlLightLight",t[t.ControlText=10]="ControlText",t[t.Desktop=11]="Desktop",t[t.GrayText=12]="GrayText",t[t.Highlight=13]="Highlight",t[t.HighlightText=14]="HighlightText",t[t.HotTrack=15]="HotTrack",t[t.InactiveBorder=16]="InactiveBorder",t[t.InactiveCaption=17]="InactiveCaption",t[t.InactiveCaptionText=18]="InactiveCaptionText",t[t.Info=19]="Info",t[t.InfoText=20]="InfoText",t[t.Menu=21]="Menu",t[t.MenuText=22]="MenuText",t[t.ScrollBar=23]="ScrollBar",t[t.Window=24]="Window",t[t.WindowFrame=25]="WindowFrame",t[t.WindowText=26]="WindowText",t[t.Transparent=27]="Transparent",t[t.AliceBlue=28]="AliceBlue",t[t.AntiqueWhite=29]="AntiqueWhite",t[t.Aqua=30]="Aqua",t[t.Aquamarine=31]="Aquamarine",t[t.Azure=32]="Azure",t[t.Beige=33]="Beige",t[t.Bisque=34]="Bisque",t[t.Black=35]="Black",t[t.BlanchedAlmond=36]="BlanchedAlmond",t[t.Blue=37]="Blue",t[t.BlueViolet=38]="BlueViolet",t[t.Brown=39]="Brown",t[t.BurlyWood=40]="BurlyWood",t[t.CadetBlue=41]="CadetBlue",t[t.Chartreuse=42]="Chartreuse",t[t.Chocolate=43]="Chocolate",t[t.Coral=44]="Coral",t[t.CornflowerBlue=45]="CornflowerBlue",t[t.Cornsilk=46]="Cornsilk",t[t.Crimson=47]="Crimson",t[t.Cyan=48]="Cyan",t[t.DarkBlue=49]="DarkBlue",t[t.DarkCyan=50]="DarkCyan",t[t.DarkGoldenrod=51]="DarkGoldenrod",t[t.DarkGray=52]="DarkGray",t[t.DarkGreen=53]="DarkGreen",t[t.DarkKhaki=54]="DarkKhaki",t[t.DarkMagenta=55]="DarkMagenta",t[t.DarkOliveGreen=56]="DarkOliveGreen",t[t.DarkOrange=57]="DarkOrange",t[t.DarkOrchid=58]="DarkOrchid",t[t.DarkRed=59]="DarkRed",t[t.DarkSalmon=60]="DarkSalmon",t[t.DarkSeaGreen=61]="DarkSeaGreen",t[t.DarkSlateBlue=62]="DarkSlateBlue",t[t.DarkSlateGray=63]="DarkSlateGray",t[t.DarkTurquoise=64]="DarkTurquoise",t[t.DarkViolet=65]="DarkViolet",t[t.DeepPink=66]="DeepPink",t[t.DeepSkyBlue=67]="DeepSkyBlue",t[t.DimGray=68]="DimGray",t[t.DodgerBlue=69]="DodgerBlue",t[t.Firebrick=70]="Firebrick",t[t.FloralWhite=71]="FloralWhite",t[t.ForestGreen=72]="ForestGreen",t[t.Fuchsia=73]="Fuchsia",t[t.Gainsboro=74]="Gainsboro",t[t.GhostWhite=75]="GhostWhite",t[t.Gold=76]="Gold",t[t.Goldenrod=77]="Goldenrod",t[t.Gray=78]="Gray",t[t.Green=79]="Green",t[t.GreenYellow=80]="GreenYellow",t[t.Honeydew=81]="Honeydew",t[t.HotPink=82]="HotPink",t[t.IndianRed=83]="IndianRed",t[t.Indigo=84]="Indigo",t[t.Ivory=85]="Ivory",t[t.Khaki=86]="Khaki",t[t.Lavender=87]="Lavender",t[t.LavenderBlush=88]="LavenderBlush",t[t.LawnGreen=89]="LawnGreen",t[t.LemonChiffon=90]="LemonChiffon",t[t.LightBlue=91]="LightBlue",t[t.LightCoral=92]="LightCoral",t[t.LightCyan=93]="LightCyan",t[t.LightGoldenrodYellow=94]="LightGoldenrodYellow",t[t.LightGray=95]="LightGray",t[t.LightGreen=96]="LightGreen",t[t.LightPink=97]="LightPink",t[t.LightSalmon=98]="LightSalmon",t[t.LightSeaGreen=99]="LightSeaGreen",t[t.LightSkyBlue=100]="LightSkyBlue",t[t.LightSlateGray=101]="LightSlateGray",t[t.LightSteelBlue=102]="LightSteelBlue",t[t.LightYellow=103]="LightYellow",t[t.Lime=104]="Lime",t[t.LimeGreen=105]="LimeGreen",t[t.Linen=106]="Linen",t[t.Magenta=107]="Magenta",t[t.Maroon=108]="Maroon",t[t.MediumAquamarine=109]="MediumAquamarine",t[t.MediumBlue=110]="MediumBlue",t[t.MediumOrchid=111]="MediumOrchid",t[t.MediumPurple=112]="MediumPurple",t[t.MediumSeaGreen=113]="MediumSeaGreen",t[t.MediumSlateBlue=114]="MediumSlateBlue",t[t.MediumSpringGreen=115]="MediumSpringGreen",t[t.MediumTurquoise=116]="MediumTurquoise",t[t.MediumVioletRed=117]="MediumVioletRed",t[t.MidnightBlue=118]="MidnightBlue",t[t.MintCream=119]="MintCream",t[t.MistyRose=120]="MistyRose",t[t.Moccasin=121]="Moccasin",t[t.NavajoWhite=122]="NavajoWhite",t[t.Navy=123]="Navy",t[t.OldLace=124]="OldLace",t[t.Olive=125]="Olive",t[t.OliveDrab=126]="OliveDrab",t[t.Orange=127]="Orange",t[t.OrangeRed=128]="OrangeRed",t[t.Orchid=129]="Orchid",t[t.PaleGoldenrod=130]="PaleGoldenrod",t[t.PaleGreen=131]="PaleGreen",t[t.PaleTurquoise=132]="PaleTurquoise",t[t.PaleVioletRed=133]="PaleVioletRed",t[t.PapayaWhip=134]="PapayaWhip",t[t.PeachPuff=135]="PeachPuff",t[t.Peru=136]="Peru",t[t.Pink=137]="Pink",t[t.Plum=138]="Plum",t[t.PowderBlue=139]="PowderBlue",t[t.Purple=140]="Purple",t[t.Red=141]="Red",t[t.RosyBrown=142]="RosyBrown",t[t.RoyalBlue=143]="RoyalBlue",t[t.SaddleBrown=144]="SaddleBrown",t[t.Salmon=145]="Salmon",t[t.SandyBrown=146]="SandyBrown",t[t.SeaGreen=147]="SeaGreen",t[t.SeaShell=148]="SeaShell",t[t.Sienna=149]="Sienna",t[t.Silver=150]="Silver",t[t.SkyBlue=151]="SkyBlue",t[t.SlateBlue=152]="SlateBlue",t[t.SlateGray=153]="SlateGray",t[t.Snow=154]="Snow",t[t.SpringGreen=155]="SpringGreen",t[t.SteelBlue=156]="SteelBlue",t[t.Tan=157]="Tan",t[t.Teal=158]="Teal",t[t.Thistle=159]="Thistle",t[t.Tomato=160]="Tomato",t[t.Turquoise=161]="Turquoise",t[t.Violet=162]="Violet",t[t.Wheat=163]="Wheat",t[t.White=164]="White",t[t.WhiteSmoke=165]="WhiteSmoke",t[t.Yellow=166]="Yellow",t[t.YellowGreen=167]="YellowGreen",t[t.ButtonFace=168]="ButtonFace",t[t.ButtonHighlight=169]="ButtonHighlight",t[t.ButtonShadow=170]="ButtonShadow",t[t.GradientActiveCaption=171]="GradientActiveCaption",t[t.GradientInactiveCaption=172]="GradientInactiveCaption",t[t.MenuBar=173]="MenuBar",t[t.MenuHighlight=174]="MenuHighlight"}(ah||(ah={}));!function(){function t(){}Object.defineProperty(t,"AliceBlue",{get:function(){var t=null;return this.sBrushes.containsKey(ah.AliceBlue)&&(t=this.sBrushes.getValue(ah.AliceBlue)),null==t&&(t=this.getBrush(ah.AliceBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"AntiqueWhite",{get:function(){var t=null;return this.sBrushes.containsKey(ah.AntiqueWhite)&&(t=this.sBrushes.getValue(ah.AntiqueWhite)),null==t&&(t=this.getBrush(ah.AntiqueWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Aqua",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Aqua)&&(t=this.sBrushes.getValue(ah.Aqua)),null==t&&(t=this.getBrush(ah.Aqua)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Aquamarine",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Aquamarine)&&(t=this.sBrushes.getValue(ah.Aquamarine)),null==t&&(t=this.getBrush(ah.Aquamarine)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Azure",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Azure)&&(t=this.sBrushes.getValue(ah.Azure)),null==t&&(t=this.getBrush(ah.Azure)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Beige",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Beige)&&(t=this.sBrushes.getValue(ah.Beige)),null==t&&(t=this.getBrush(ah.Beige)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Bisque",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Bisque)&&(t=this.sBrushes.getValue(ah.Bisque)),null==t&&(t=this.getBrush(ah.Bisque)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Black",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Black)&&(t=this.sBrushes.getValue(ah.Black)),null==t&&(t=this.getBrush(ah.Black)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BlanchedAlmond",{get:function(){var t=null;return this.sBrushes.containsKey(ah.BlanchedAlmond)&&(t=this.sBrushes.getValue(ah.BlanchedAlmond)),null==t&&(t=this.getBrush(ah.BlanchedAlmond)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Blue",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Blue)&&(t=this.sBrushes.getValue(ah.Blue)),null==t&&(t=this.getBrush(ah.Blue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BlueViolet",{get:function(){var t=null;return this.sBrushes.containsKey(ah.BlueViolet)&&(t=this.sBrushes.getValue(ah.BlueViolet)),null==t&&(t=this.getBrush(ah.BlueViolet)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Brown",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Brown)&&(t=this.sBrushes.getValue(ah.Brown)),null==t&&(t=this.getBrush(ah.Brown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BurlyWood",{get:function(){var t=null;return this.sBrushes.containsKey(ah.BurlyWood)&&(t=this.sBrushes.getValue(ah.BurlyWood)),null==t&&(t=this.getBrush(ah.BurlyWood)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"CadetBlue",{get:function(){var t=null;return this.sBrushes.containsKey(ah.CadetBlue)&&(t=this.sBrushes.getValue(ah.CadetBlue)),null==t&&(t=this.getBrush(ah.CadetBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Chartreuse",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Chartreuse)&&(t=this.sBrushes.getValue(ah.Chartreuse)),null==t&&(t=this.getBrush(ah.Chartreuse)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Chocolate",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Chocolate)&&(t=this.sBrushes.getValue(ah.Chocolate)),null==t&&(t=this.getBrush(ah.Chocolate)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Coral",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Coral)&&(t=this.sBrushes.getValue(ah.Coral)),null==t&&(t=this.getBrush(ah.Coral)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"CornflowerBlue",{get:function(){var t=null;return this.sBrushes.containsKey(ah.CornflowerBlue)&&(t=this.sBrushes.getValue(ah.CornflowerBlue)),null==t&&(t=this.getBrush(ah.CornflowerBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Cornsilk",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Cornsilk)&&(t=this.sBrushes.getValue(ah.Cornsilk)),null==t&&(t=this.getBrush(ah.Cornsilk)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Crimson",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Crimson)&&(t=this.sBrushes.getValue(ah.Crimson)),null==t&&(t=this.getBrush(ah.Crimson)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Cyan",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Cyan)&&(t=this.sBrushes.getValue(ah.Cyan)),null==t&&(t=this.getBrush(ah.Cyan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkBlue",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DarkBlue)&&(t=this.sBrushes.getValue(ah.DarkBlue)),null==t&&(t=this.getBrush(ah.DarkBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkCyan",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DarkCyan)&&(t=this.sBrushes.getValue(ah.DarkCyan)),null==t&&(t=this.getBrush(ah.DarkCyan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkGoldenrod",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DarkGoldenrod)&&(t=this.sBrushes.getValue(ah.DarkGoldenrod)),null==t&&(t=this.getBrush(ah.DarkGoldenrod)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkGray",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DarkGray)&&(t=this.sBrushes.getValue(ah.DarkGray)),null==t&&(t=this.getBrush(ah.DarkGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkGreen",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DarkGreen)&&(t=this.sBrushes.getValue(ah.DarkGreen)),null==t&&(t=this.getBrush(ah.DarkGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkKhaki",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DarkKhaki)&&(t=this.sBrushes.getValue(ah.DarkKhaki)),null==t&&(t=this.getBrush(ah.DarkKhaki)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkMagenta",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DarkMagenta)&&(t=this.sBrushes.getValue(ah.DarkMagenta)),null==t&&(t=this.getBrush(ah.DarkMagenta)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkOliveGreen",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DarkOliveGreen)&&(t=this.sBrushes.getValue(ah.DarkOliveGreen)),null==t&&(t=this.getBrush(ah.DarkOliveGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkOrange",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DarkOrange)&&(t=this.sBrushes.getValue(ah.DarkOrange)),null==t&&(t=this.getBrush(ah.DarkOrange)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkOrchid",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DarkOrchid)&&(t=this.sBrushes.getValue(ah.DarkOrchid)),null==t&&(t=this.getBrush(ah.DarkOrchid)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkRed",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DarkRed)&&(t=this.sBrushes.getValue(ah.DarkRed)),null==t&&(t=this.getBrush(ah.DarkRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSalmon",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DarkSalmon)&&(t=this.sBrushes.getValue(ah.DarkSalmon)),null==t&&(t=this.getBrush(ah.DarkSalmon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DarkSeaGreen)&&(t=this.sBrushes.getValue(ah.DarkSeaGreen)),null==t&&(t=this.getBrush(ah.DarkSeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSlateBlue",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DarkSlateBlue)&&(t=this.sBrushes.getValue(ah.DarkSlateBlue)),null==t&&(t=this.getBrush(ah.DarkSlateBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSlateGray",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DarkSlateGray)&&(t=this.sBrushes.getValue(ah.DarkSlateGray)),null==t&&(t=this.getBrush(ah.DarkSlateGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkTurquoise",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DarkTurquoise)&&(t=this.sBrushes.getValue(ah.DarkTurquoise)),null==t&&(t=this.getBrush(ah.DarkTurquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkViolet",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DarkViolet)&&(t=this.sBrushes.getValue(ah.DarkViolet)),null==t&&(t=this.getBrush(ah.DarkViolet)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DeepPink",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DeepPink)&&(t=this.sBrushes.getValue(ah.DeepPink)),null==t&&(t=this.getBrush(ah.DeepPink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DeepSkyBlue",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DeepSkyBlue)&&(t=this.sBrushes.getValue(ah.DeepSkyBlue)),null==t&&(t=this.getBrush(ah.DeepSkyBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DimGray",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DimGray)&&(t=this.sBrushes.getValue(ah.DimGray)),null==t&&(t=this.getBrush(ah.DimGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DodgerBlue",{get:function(){var t=null;return this.sBrushes.containsKey(ah.DodgerBlue)&&(t=this.sBrushes.getValue(ah.DodgerBlue)),null==t&&(t=this.getBrush(ah.DodgerBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Firebrick",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Firebrick)&&(t=this.sBrushes.getValue(ah.Firebrick)),null==t&&(t=this.getBrush(ah.Firebrick)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"FloralWhite",{get:function(){var t=null;return this.sBrushes.containsKey(ah.FloralWhite)&&(t=this.sBrushes.getValue(ah.FloralWhite)),null==t&&(t=this.getBrush(ah.FloralWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"ForestGreen",{get:function(){var t=null;return this.sBrushes.containsKey(ah.ForestGreen)&&(t=this.sBrushes.getValue(ah.ForestGreen)),null==t&&(t=this.getBrush(ah.ForestGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Fuchsia",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Fuchsia)&&(t=this.sBrushes.getValue(ah.Fuchsia)),null==t&&(t=this.getBrush(ah.Fuchsia)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Gainsboro",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Gainsboro)&&(t=this.sBrushes.getValue(ah.Gainsboro)),null==t&&(t=this.getBrush(ah.Gainsboro)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"GhostWhite",{get:function(){var t=null;return this.sBrushes.containsKey(ah.GhostWhite)&&(t=this.sBrushes.getValue(ah.GhostWhite)),null==t&&(t=this.getBrush(ah.GhostWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Gold",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Gold)&&(t=this.sBrushes.getValue(ah.Gold)),null==t&&(t=this.getBrush(ah.Gold)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Goldenrod",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Goldenrod)&&(t=this.sBrushes.getValue(ah.Goldenrod)),null==t&&(t=this.getBrush(ah.Goldenrod)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Gray",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Gray)&&(t=this.sBrushes.getValue(ah.Gray)),null==t&&(t=this.getBrush(ah.Gray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Green",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Green)&&(t=this.sBrushes.getValue(ah.Green)),null==t&&(t=this.getBrush(ah.Green)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"GreenYellow",{get:function(){var t=null;return this.sBrushes.containsKey(ah.GreenYellow)&&(t=this.sBrushes.getValue(ah.GreenYellow)),null==t&&(t=this.getBrush(ah.GreenYellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Honeydew",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Honeydew)&&(t=this.sBrushes.getValue(ah.Honeydew)),null==t&&(t=this.getBrush(ah.Honeydew)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"HotPink",{get:function(){var t=null;return this.sBrushes.containsKey(ah.HotPink)&&(t=this.sBrushes.getValue(ah.HotPink)),null==t&&(t=this.getBrush(ah.HotPink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"IndianRed",{get:function(){var t=null;return this.sBrushes.containsKey(ah.IndianRed)&&(t=this.sBrushes.getValue(ah.IndianRed)),null==t&&(t=this.getBrush(ah.IndianRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Indigo",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Indigo)&&(t=this.sBrushes.getValue(ah.Indigo)),null==t&&(t=this.getBrush(ah.Indigo)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Ivory",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Ivory)&&(t=this.sBrushes.getValue(ah.Ivory)),null==t&&(t=this.getBrush(ah.Ivory)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Khaki",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Khaki)&&(t=this.sBrushes.getValue(ah.Khaki)),null==t&&(t=this.getBrush(ah.Khaki)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Lavender",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Lavender)&&(t=this.sBrushes.getValue(ah.Lavender)),null==t&&(t=this.getBrush(ah.Lavender)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LavenderBlush",{get:function(){var t=null;return this.sBrushes.containsKey(ah.LavenderBlush)&&(t=this.sBrushes.getValue(ah.LavenderBlush)),null==t&&(t=this.getBrush(ah.LavenderBlush)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LawnGreen",{get:function(){var t=null;return this.sBrushes.containsKey(ah.LawnGreen)&&(t=this.sBrushes.getValue(ah.LawnGreen)),null==t&&(t=this.getBrush(ah.LawnGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LemonChiffon",{get:function(){var t=null;return this.sBrushes.containsKey(ah.LemonChiffon)&&(t=this.sBrushes.getValue(ah.LemonChiffon)),null==t&&(t=this.getBrush(ah.LemonChiffon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightBlue",{get:function(){var t=null;return this.sBrushes.containsKey(ah.LightBlue)&&(t=this.sBrushes.getValue(ah.LightBlue)),null==t&&(t=this.getBrush(ah.LightBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightCoral",{get:function(){var t=null;return this.sBrushes.containsKey(ah.LightCoral)&&(t=this.sBrushes.getValue(ah.LightCoral)),null==t&&(t=this.getBrush(ah.LightCoral)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightCyan",{get:function(){var t=null;return this.sBrushes.containsKey(ah.LightCyan)&&(t=this.sBrushes.getValue(ah.LightCyan)),null==t&&(t=this.getBrush(ah.LightCyan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightGoldenrodYellow",{get:function(){var t=null;return this.sBrushes.containsKey(ah.LightGoldenrodYellow)&&(t=this.sBrushes.getValue(ah.LightGoldenrodYellow)),null==t&&(t=this.getBrush(ah.LightGoldenrodYellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightGray",{get:function(){var t=null;return this.sBrushes.containsKey(ah.LightGray)&&(t=this.sBrushes.getValue(ah.LightGray)),null==t&&(t=this.getBrush(ah.LightGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightGreen",{get:function(){var t=null;return this.sBrushes.containsKey(ah.LightGreen)&&(t=this.sBrushes.getValue(ah.LightGreen)),null==t&&(t=this.getBrush(ah.LightGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightPink",{get:function(){var t=null;return this.sBrushes.containsKey(ah.LightPink)&&(t=this.sBrushes.getValue(ah.LightPink)),null==t&&(t=this.getBrush(ah.LightPink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSalmon",{get:function(){var t=null;return this.sBrushes.containsKey(ah.LightSalmon)&&(t=this.sBrushes.getValue(ah.LightSalmon)),null==t&&(t=this.getBrush(ah.LightSalmon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(ah.LightSeaGreen)&&(t=this.sBrushes.getValue(ah.LightSeaGreen)),null==t&&(t=this.getBrush(ah.LightSeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSkyBlue",{get:function(){var t=null;return this.sBrushes.containsKey(ah.LightSkyBlue)&&(t=this.sBrushes.getValue(ah.LightSkyBlue)),null==t&&(t=this.getBrush(ah.LightSkyBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSlateGray",{get:function(){var t=null;return this.sBrushes.containsKey(ah.LightSlateGray)&&(t=this.sBrushes.getValue(ah.LightSlateGray)),null==t&&(t=this.getBrush(ah.LightSlateGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSteelBlue",{get:function(){var t=null;return this.sBrushes.containsKey(ah.LightSteelBlue)&&(t=this.sBrushes.getValue(ah.LightSteelBlue)),null==t&&(t=this.getBrush(ah.LightSteelBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightYellow",{get:function(){var t=null;return this.sBrushes.containsKey(ah.LightYellow)&&(t=this.sBrushes.getValue(ah.LightYellow)),null==t&&(t=this.getBrush(ah.LightYellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Lime",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Lime)&&(t=this.sBrushes.getValue(ah.Lime)),null==t&&(t=this.getBrush(ah.Lime)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LimeGreen",{get:function(){var t=null;return this.sBrushes.containsKey(ah.LimeGreen)&&(t=this.sBrushes.getValue(ah.LimeGreen)),null==t&&(t=this.getBrush(ah.LimeGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Linen",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Linen)&&(t=this.sBrushes.getValue(ah.Linen)),null==t&&(t=this.getBrush(ah.Linen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Magenta",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Magenta)&&(t=this.sBrushes.getValue(ah.Magenta)),null==t&&(t=this.getBrush(ah.Magenta)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Maroon",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Maroon)&&(t=this.sBrushes.getValue(ah.Maroon)),null==t&&(t=this.getBrush(ah.Maroon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumAquamarine",{get:function(){var t=null;return this.sBrushes.containsKey(ah.MediumAquamarine)&&(t=this.sBrushes.getValue(ah.MediumAquamarine)),null==t&&(t=this.getBrush(ah.MediumAquamarine)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumBlue",{get:function(){var t=null;return this.sBrushes.containsKey(ah.MediumBlue)&&(t=this.sBrushes.getValue(ah.MediumBlue)),null==t&&(t=this.getBrush(ah.MediumBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumOrchid",{get:function(){var t=null;return this.sBrushes.containsKey(ah.MediumOrchid)&&(t=this.sBrushes.getValue(ah.MediumOrchid)),null==t&&(t=this.getBrush(ah.MediumOrchid)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumPurple",{get:function(){var t=null;return this.sBrushes.containsKey(ah.MediumPurple)&&(t=this.sBrushes.getValue(ah.MediumPurple)),null==t&&(t=this.getBrush(ah.MediumPurple)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumSeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(ah.MediumSeaGreen)&&(t=this.sBrushes.getValue(ah.MediumSeaGreen)),null==t&&(t=this.getBrush(ah.MediumSeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumSlateBlue",{get:function(){var t=null;return this.sBrushes.containsKey(ah.MediumSlateBlue)&&(t=this.sBrushes.getValue(ah.MediumSlateBlue)),null==t&&(t=this.getBrush(ah.MediumSlateBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumSpringGreen",{get:function(){var t=null;return this.sBrushes.containsKey(ah.MediumSpringGreen)&&(t=this.sBrushes.getValue(ah.MediumSpringGreen)),null==t&&(t=this.getBrush(ah.MediumSpringGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumTurquoise",{get:function(){var t=null;return this.sBrushes.containsKey(ah.MediumTurquoise)&&(t=this.sBrushes.getValue(ah.MediumTurquoise)),null==t&&(t=this.getBrush(ah.MediumTurquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumVioletRed",{get:function(){var t=null;return this.sBrushes.containsKey(ah.MediumVioletRed)&&(t=this.sBrushes.getValue(ah.MediumVioletRed)),null==t&&(t=this.getBrush(ah.MediumVioletRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MidnightBlue",{get:function(){var t=null;return this.sBrushes.containsKey(ah.MidnightBlue)&&(t=this.sBrushes.getValue(ah.MidnightBlue)),null==t&&(t=this.getBrush(ah.MidnightBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MintCream",{get:function(){var t=null;return this.sBrushes.containsKey(ah.MintCream)&&(t=this.sBrushes.getValue(ah.MintCream)),null==t&&(t=this.getBrush(ah.MintCream)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MistyRose",{get:function(){var t=null;return this.sBrushes.containsKey(ah.MistyRose)&&(t=this.sBrushes.getValue(ah.MistyRose)),null==t&&(t=this.getBrush(ah.MistyRose)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Moccasin",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Moccasin)&&(t=this.sBrushes.getValue(ah.Moccasin)),null==t&&(t=this.getBrush(ah.Moccasin)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"NavajoWhite",{get:function(){var t=null;return this.sBrushes.containsKey(ah.NavajoWhite)&&(t=this.sBrushes.getValue(ah.NavajoWhite)),null==t&&(t=this.getBrush(ah.NavajoWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Navy",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Navy)&&(t=this.sBrushes.getValue(ah.Navy)),null==t&&(t=this.getBrush(ah.Navy)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OldLace",{get:function(){var t=null;return this.sBrushes.containsKey(ah.OldLace)&&(t=this.sBrushes.getValue(ah.OldLace)),null==t&&(t=this.getBrush(ah.OldLace)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Olive",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Olive)&&(t=this.sBrushes.getValue(ah.Olive)),null==t&&(t=this.getBrush(ah.Olive)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OliveDrab",{get:function(){var t=null;return this.sBrushes.containsKey(ah.OliveDrab)&&(t=this.sBrushes.getValue(ah.OliveDrab)),null==t&&(t=this.getBrush(ah.OliveDrab)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Orange",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Orange)&&(t=this.sBrushes.getValue(ah.Orange)),null==t&&(t=this.getBrush(ah.Orange)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OrangeRed",{get:function(){var t=null;return this.sBrushes.containsKey(ah.OrangeRed)&&(t=this.sBrushes.getValue(ah.OrangeRed)),null==t&&(t=this.getBrush(ah.OrangeRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Orchid",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Orchid)&&(t=this.sBrushes.getValue(ah.Orchid)),null==t&&(t=this.getBrush(ah.Orchid)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleGoldenrod",{get:function(){var t=null;return this.sBrushes.containsKey(ah.PaleGoldenrod)&&(t=this.sBrushes.getValue(ah.PaleGoldenrod)),null==t&&(t=this.getBrush(ah.PaleGoldenrod)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleGreen",{get:function(){var t=null;return this.sBrushes.containsKey(ah.PaleGreen)&&(t=this.sBrushes.getValue(ah.PaleGreen)),null==t&&(t=this.getBrush(ah.PaleGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleTurquoise",{get:function(){var t=null;return this.sBrushes.containsKey(ah.PaleTurquoise)&&(t=this.sBrushes.getValue(ah.PaleTurquoise)),null==t&&(t=this.getBrush(ah.PaleTurquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleVioletRed",{get:function(){var t=null;return this.sBrushes.containsKey(ah.PaleVioletRed)&&(t=this.sBrushes.getValue(ah.PaleVioletRed)),null==t&&(t=this.getBrush(ah.PaleVioletRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PapayaWhip",{get:function(){var t=null;return this.sBrushes.containsKey(ah.PapayaWhip)&&(t=this.sBrushes.getValue(ah.PapayaWhip)),null==t&&(t=this.getBrush(ah.PapayaWhip)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PeachPuff",{get:function(){var t=null;return this.sBrushes.containsKey(ah.PeachPuff)&&(t=this.sBrushes.getValue(ah.PeachPuff)),null==t&&(t=this.getBrush(ah.PeachPuff)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Peru",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Peru)&&(t=this.sBrushes.getValue(ah.Peru)),null==t&&(t=this.getBrush(ah.Peru)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Pink",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Pink)&&(t=this.sBrushes.getValue(ah.Pink)),null==t&&(t=this.getBrush(ah.Pink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Plum",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Plum)&&(t=this.sBrushes.getValue(ah.Plum)),null==t&&(t=this.getBrush(ah.Plum)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PowderBlue",{get:function(){var t=null;return this.sBrushes.containsKey(ah.PowderBlue)&&(t=this.sBrushes.getValue(ah.PowderBlue)),null==t&&(t=this.getBrush(ah.PowderBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Purple",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Purple)&&(t=this.sBrushes.getValue(ah.Purple)),null==t&&(t=this.getBrush(ah.Purple)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Red",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Red)&&(t=this.sBrushes.getValue(ah.Red)),null==t&&(t=this.getBrush(ah.Red)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"RosyBrown",{get:function(){var t=null;return this.sBrushes.containsKey(ah.RosyBrown)&&(t=this.sBrushes.getValue(ah.RosyBrown)),null==t&&(t=this.getBrush(ah.RosyBrown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"RoyalBlue",{get:function(){var t=null;return this.sBrushes.containsKey(ah.RoyalBlue)&&(t=this.sBrushes.getValue(ah.RoyalBlue)),null==t&&(t=this.getBrush(ah.RoyalBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SaddleBrown",{get:function(){var t=null;return this.sBrushes.containsKey(ah.SaddleBrown)&&(t=this.sBrushes.getValue(ah.SaddleBrown)),null==t&&(t=this.getBrush(ah.SaddleBrown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Salmon",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Salmon)&&(t=this.sBrushes.getValue(ah.Salmon)),null==t&&(t=this.getBrush(ah.Salmon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SandyBrown",{get:function(){var t=null;return this.sBrushes.containsKey(ah.SandyBrown)&&(t=this.sBrushes.getValue(ah.SandyBrown)),null==t&&(t=this.getBrush(ah.SandyBrown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(ah.SeaGreen)&&(t=this.sBrushes.getValue(ah.SeaGreen)),null==t&&(t=this.getBrush(ah.SeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SeaShell",{get:function(){var t=null;return this.sBrushes.containsKey(ah.SeaShell)&&(t=this.sBrushes.getValue(ah.SeaShell)),null==t&&(t=this.getBrush(ah.SeaShell)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Sienna",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Sienna)&&(t=this.sBrushes.getValue(ah.Sienna)),null==t&&(t=this.getBrush(ah.Sienna)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Silver",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Silver)&&(t=this.sBrushes.getValue(ah.Silver)),null==t&&(t=this.getBrush(ah.Silver)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SkyBlue",{get:function(){var t=null;return this.sBrushes.containsKey(ah.SkyBlue)&&(t=this.sBrushes.getValue(ah.SkyBlue)),null==t&&(t=this.getBrush(ah.SkyBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SlateBlue",{get:function(){var t=null;return this.sBrushes.containsKey(ah.SlateBlue)&&(t=this.sBrushes.getValue(ah.SlateBlue)),null==t&&(t=this.getBrush(ah.SlateBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SlateGray",{get:function(){var t=null;return this.sBrushes.containsKey(ah.SlateGray)&&(t=this.sBrushes.getValue(ah.SlateGray)),null==t&&(t=this.getBrush(ah.SlateGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Snow",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Snow)&&(t=this.sBrushes.getValue(ah.Snow)),null==t&&(t=this.getBrush(ah.Snow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SpringGreen",{get:function(){var t=null;return this.sBrushes.containsKey(ah.SpringGreen)&&(t=this.sBrushes.getValue(ah.SpringGreen)),null==t&&(t=this.getBrush(ah.SpringGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SteelBlue",{get:function(){var t=null;return this.sBrushes.containsKey(ah.SteelBlue)&&(t=this.sBrushes.getValue(ah.SteelBlue)),null==t&&(t=this.getBrush(ah.SteelBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Tan",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Tan)&&(t=this.sBrushes.getValue(ah.Tan)),null==t&&(t=this.getBrush(ah.Tan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Teal",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Teal)&&(t=this.sBrushes.getValue(ah.Teal)),null==t&&(t=this.getBrush(ah.Teal)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Thistle",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Thistle)&&(t=this.sBrushes.getValue(ah.Thistle)),null==t&&(t=this.getBrush(ah.Thistle)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Tomato",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Tomato)&&(t=this.sBrushes.getValue(ah.Tomato)),null==t&&(t=this.getBrush(ah.Tomato)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Transparent",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Transparent)&&(t=this.sBrushes.getValue(ah.Transparent)),null==t&&(t=this.getBrush(ah.Transparent)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Turquoise",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Turquoise)&&(t=this.sBrushes.getValue(ah.Turquoise)),null==t&&(t=this.getBrush(ah.Turquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Violet",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Violet)&&(t=this.sBrushes.getValue(ah.Violet)),null==t&&(t=this.getBrush(ah.Violet)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Wheat",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Wheat)&&(t=this.sBrushes.getValue(ah.Wheat)),null==t&&(t=this.getBrush(ah.Wheat)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"White",{get:function(){var t=null;return this.sBrushes.containsKey(ah.White)&&(t=this.sBrushes.getValue(ah.White)),null==t&&(t=this.getBrush(ah.White)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WhiteSmoke",{get:function(){var t=null;return this.sBrushes.containsKey(ah.WhiteSmoke)&&(t=this.sBrushes.getValue(ah.WhiteSmoke)),null==t&&(t=this.getBrush(ah.WhiteSmoke)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Yellow",{get:function(){var t=null;return this.sBrushes.containsKey(ah.Yellow)&&(t=this.sBrushes.getValue(ah.Yellow)),null==t&&(t=this.getBrush(ah.Yellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"YellowGreen",{get:function(){var t=null;return this.sBrushes.containsKey(ah.YellowGreen)&&(t=this.sBrushes.getValue(ah.YellowGreen)),null==t&&(t=this.getBrush(ah.YellowGreen)),t},enumerable:!0,configurable:!0}),t.getBrush=function(t){var e=this.getColorValue(t),i=new ns(e);return this.sBrushes.setValue(t,i),i},t.getColorValue=function(t){var e=new Xo;switch(t){case ah.Transparent:e=new Xo(0,255,255,255);break;case ah.AliceBlue:e=new Xo(255,240,248,255);break;case ah.AntiqueWhite:e=new Xo(255,250,235,215);break;case ah.Aqua:e=new Xo(255,0,255,255);break;case ah.Aquamarine:e=new Xo(255,127,255,212);break;case ah.Azure:e=new Xo(255,240,255,255);break;case ah.Beige:e=new Xo(255,245,245,220);break;case ah.Bisque:e=new Xo(255,255,228,196);break;case ah.Black:e=new Xo(255,0,0,0);break;case ah.BlanchedAlmond:e=new Xo(255,255,235,205);break;case ah.Blue:e=new Xo(255,0,0,255);break;case ah.BlueViolet:e=new Xo(255,138,43,226);break;case ah.Brown:e=new Xo(255,165,42,42);break;case ah.BurlyWood:e=new Xo(255,222,184,135);break;case ah.CadetBlue:e=new Xo(255,95,158,160);break;case ah.Chartreuse:e=new Xo(255,127,255,0);break;case ah.Chocolate:e=new Xo(255,210,105,30);break;case ah.Coral:e=new Xo(255,255,127,80);break;case ah.CornflowerBlue:e=new Xo(255,100,149,237);break;case ah.Cornsilk:e=new Xo(255,255,248,220);break;case ah.Crimson:e=new Xo(255,220,20,60);break;case ah.Cyan:e=new Xo(255,0,255,255);break;case ah.DarkBlue:e=new Xo(255,0,0,139);break;case ah.DarkCyan:e=new Xo(255,0,139,139);break;case ah.DarkGoldenrod:e=new Xo(255,184,134,11);break;case ah.DarkGray:e=new Xo(255,169,169,169);break;case ah.DarkGreen:e=new Xo(255,0,100,0);break;case ah.DarkKhaki:e=new Xo(255,189,183,107);break;case ah.DarkMagenta:e=new Xo(255,139,0,139);break;case ah.DarkOliveGreen:e=new Xo(255,85,107,47);break;case ah.DarkOrange:e=new Xo(255,255,140,0);break;case ah.DarkOrchid:e=new Xo(255,153,50,204);break;case ah.DarkRed:e=new Xo(255,139,0,0);break;case ah.DarkSalmon:e=new Xo(255,233,150,122);break;case ah.DarkSeaGreen:e=new Xo(255,143,188,139);break;case ah.DarkSlateBlue:e=new Xo(255,72,61,139);break;case ah.DarkSlateGray:e=new Xo(255,47,79,79);break;case ah.DarkTurquoise:e=new Xo(255,0,206,209);break;case ah.DarkViolet:e=new Xo(255,148,0,211);break;case ah.DeepPink:e=new Xo(255,255,20,147);break;case ah.DeepSkyBlue:e=new Xo(255,0,191,255);break;case ah.DimGray:e=new Xo(255,105,105,105);break;case ah.DodgerBlue:e=new Xo(255,30,144,255);break;case ah.Firebrick:e=new Xo(255,178,34,34);break;case ah.FloralWhite:e=new Xo(255,255,250,240);break;case ah.ForestGreen:e=new Xo(255,34,139,34);break;case ah.Fuchsia:e=new Xo(255,255,0,255);break;case ah.Gainsboro:e=new Xo(255,220,220,220);break;case ah.GhostWhite:e=new Xo(255,248,248,255);break;case ah.Gold:e=new Xo(255,255,215,0);break;case ah.Goldenrod:e=new Xo(255,218,165,32);break;case ah.Gray:e=new Xo(255,128,128,128);break;case ah.Green:e=new Xo(255,0,128,0);break;case ah.GreenYellow:e=new Xo(255,173,255,47);break;case ah.Honeydew:e=new Xo(255,240,255,240);break;case ah.HotPink:e=new Xo(255,255,105,180);break;case ah.IndianRed:e=new Xo(255,205,92,92);break;case ah.Indigo:e=new Xo(255,75,0,130);break;case ah.Ivory:e=new Xo(255,255,255,240);break;case ah.Khaki:e=new Xo(255,240,230,140);break;case ah.Lavender:e=new Xo(255,230,230,250);break;case ah.LavenderBlush:e=new Xo(255,255,240,245);break;case ah.LawnGreen:e=new Xo(255,124,252,0);break;case ah.LemonChiffon:e=new Xo(255,255,250,205);break;case ah.LightBlue:e=new Xo(255,173,216,230);break;case ah.LightCoral:e=new Xo(255,240,128,128);break;case ah.LightCyan:e=new Xo(255,224,255,255);break;case ah.LightGoldenrodYellow:e=new Xo(255,250,250,210);break;case ah.LightGreen:e=new Xo(255,144,238,144);break;case ah.LightGray:e=new Xo(255,211,211,211);break;case ah.LightPink:e=new Xo(255,255,182,193);break;case ah.LightSalmon:e=new Xo(255,255,160,122);break;case ah.LightSeaGreen:e=new Xo(255,32,178,170);break;case ah.LightSkyBlue:e=new Xo(255,135,206,250);break;case ah.LightSlateGray:e=new Xo(255,119,136,153);break;case ah.LightSteelBlue:e=new Xo(255,176,196,222);break;case ah.LightYellow:e=new Xo(255,255,255,224);break;case ah.Lime:e=new Xo(255,0,255,0);break;case ah.LimeGreen:e=new Xo(255,50,205,50);break;case ah.Linen:e=new Xo(255,250,240,230);break;case ah.Magenta:e=new Xo(255,255,0,255);break;case ah.Maroon:e=new Xo(255,128,0,0);break;case ah.MediumAquamarine:e=new Xo(255,102,205,170);break;case ah.MediumBlue:e=new Xo(255,0,0,205);break;case ah.MediumOrchid:e=new Xo(255,186,85,211);break;case ah.MediumPurple:e=new Xo(255,147,112,219);break;case ah.MediumSeaGreen:e=new Xo(255,60,179,113);break;case ah.MediumSlateBlue:e=new Xo(255,123,104,238);break;case ah.MediumSpringGreen:e=new Xo(255,0,250,154);break;case ah.MediumTurquoise:e=new Xo(255,72,209,204);break;case ah.MediumVioletRed:e=new Xo(255,199,21,133);break;case ah.MidnightBlue:e=new Xo(255,25,25,112);break;case ah.MintCream:e=new Xo(255,245,255,250);break;case ah.MistyRose:e=new Xo(255,255,228,225);break;case ah.Moccasin:e=new Xo(255,255,228,181);break;case ah.NavajoWhite:e=new Xo(255,255,222,173);break;case ah.Navy:e=new Xo(255,0,0,128);break;case ah.OldLace:e=new Xo(255,253,245,230);break;case ah.Olive:e=new Xo(255,128,128,0);break;case ah.OliveDrab:e=new Xo(255,107,142,35);break;case ah.Orange:e=new Xo(255,255,165,0);break;case ah.OrangeRed:e=new Xo(255,255,69,0);break;case ah.Orchid:e=new Xo(255,218,112,214);break;case ah.PaleGoldenrod:e=new Xo(255,238,232,170);break;case ah.PaleGreen:e=new Xo(255,152,251,152);break;case ah.PaleTurquoise:e=new Xo(255,175,238,238);break;case ah.PaleVioletRed:e=new Xo(255,219,112,147);break;case ah.PapayaWhip:e=new Xo(255,255,239,213);break;case ah.PeachPuff:e=new Xo(255,255,218,185);break;case ah.Peru:e=new Xo(255,205,133,63);break;case ah.Pink:e=new Xo(255,255,192,203);break;case ah.Plum:e=new Xo(255,221,160,221);break;case ah.PowderBlue:e=new Xo(255,176,224,230);break;case ah.Purple:e=new Xo(255,128,0,128);break;case ah.Red:e=new Xo(255,255,0,0);break;case ah.RosyBrown:e=new Xo(255,188,143,143);break;case ah.RoyalBlue:e=new Xo(255,65,105,225);break;case ah.SaddleBrown:e=new Xo(255,139,69,19);break;case ah.Salmon:e=new Xo(255,250,128,114);break;case ah.SandyBrown:e=new Xo(255,244,164,96);break;case ah.SeaGreen:e=new Xo(255,46,139,87);break;case ah.SeaShell:e=new Xo(255,255,245,238);break;case ah.Sienna:e=new Xo(255,160,82,45);break;case ah.Silver:e=new Xo(255,192,192,192);break;case ah.SkyBlue:e=new Xo(255,135,206,235);break;case ah.SlateBlue:e=new Xo(255,106,90,205);break;case ah.SlateGray:e=new Xo(255,112,128,144);break;case ah.Snow:e=new Xo(255,255,250,250);break;case ah.SpringGreen:e=new Xo(255,0,255,127);break;case ah.SteelBlue:e=new Xo(255,70,130,180);break;case ah.Tan:e=new Xo(255,210,180,140);break;case ah.Teal:e=new Xo(255,0,128,128);break;case ah.Thistle:e=new Xo(255,216,191,216);break;case ah.Tomato:e=new Xo(255,255,99,71);break;case ah.Turquoise:e=new Xo(255,64,224,208);break;case ah.Violet:e=new Xo(255,238,130,238);break;case ah.Wheat:e=new Xo(255,245,222,179);break;case ah.White:e=new Xo(255,255,255,255);break;case ah.WhiteSmoke:e=new Xo(255,245,245,245);break;case ah.Yellow:e=new Xo(255,255,255,0);break;case ah.YellowGreen:e=new Xo(255,154,205,50)}return e},t.sBrushes=new Qn}();var lh,hh=function(){function t(t){this.precision=1e3}return Object.defineProperty(t.prototype,"factors",{get:function(){return this.mFactors},set:function(t){if(null==t)throw new Error("ArgumentNullException : Factors");this.mFactors=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"positions",{get:function(){return this.mPositions},set:function(t){for(var e=t,i=0;i<e.length;i++)(e[i]<0||e[i]>1)&&(e[i]=0);this.mPositions=e,this.mPositions=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this.mCount},enumerable:!0,configurable:!0}),t.prototype.generateColorBlend=function(t,e){if(null==t)throw new Error("ArgumentNullException : colours");null==this.positions&&(this.positions=[0]);var i=new ch(this.count),r=this.positions,n=null;if(1===r.length)(r=[3])[0]=0,r[1]=this.positions[0],r[2]=1,(n=new Array(3))[0]=t[0],n[1]=t[0],n[2]=t[1];else{var o=t[0],s=t[1];n=new Array(this.count);var a=0,l=this.count;for(a=0;a<l;++a)n[a]=this.interpolate(this.mFactors[a],o,s,e)}return i.positions=r,i.colors=n,i},t.prototype.clonePdfBlend=function(){return null!=this.mFactors&&(this.factors=this.mFactors),null!=this.positions&&(this.positions=this.positions),this},t.prototype.gcd=function(t,e){if("number"==typeof t&&"number"==typeof e&&void 0!==e){if(t<0||t>1)throw new Error("ArgumentOutOfRangeException : u");if(e<0||e>1)throw new Error("ArgumentOutOfRangeException : v");var i=Math.max(1,t*this.precision),r=Math.max(1,e*this.precision);return this.gcdInt(i,r)/this.precision}var n=t;if(null==n)throw new Error("ArgumentNullException : values");if(n.length<1)throw new Error("ArgumentException : Not enough values in the array. - values");var o=n[0];if(n.length>1)for(var s=n.length,a=1;a<s&&(o=this.gcd(n[a],o))!==1/this.precision;++a);return o},t.prototype.gcdInt=function(t,e){if(t<=0)throw new Error("ArgumentOutOfRangeException"+t+"The arguments cannot be less or equal to zero.");if(e<=0)throw new Error("ArgumentOutOfRangeException"+e+"The arguments cannot be less or equal to zero.");if(1===t||1===e)return 1;for(var i=0;this.isEven(t,e);)++i,t>>=1,e>>=1;for(;(1&t)<=0;)t>>=1;do{for(;(1&e)<=0;)e>>=1;if(t>e){var r=e;e=t,t=r}e-=t}while(0!==e);return t<<i},t.prototype.isEven=function(t,e){if("number"==typeof e&&void 0!==e){var i=!0;return i=i&&(1&t)<=0,i=i&&(1&e)<=0}return(1&t)<=0},t.prototype.interpolate=function(t,e,i,r){if(e instanceof Xo){var n=new Xo;switch(r){case Uo.Rgb:var o=this.interpolate(t,e.red,i.red),s=this.interpolate(t,e.green,i.green),a=this.interpolate(t,e.blue,i.blue);n=new Xo(o,s,a);break;case Uo.GrayScale:var l=this.interpolate(t,e.gray,i.gray);n=new Xo(l);break;case Uo.Cmyk:var h=this.interpolate(t,e.c,i.c),u=this.interpolate(t,e.m,i.m),c=this.interpolate(t,e.y,i.y),p=this.interpolate(t,e.k,i.k);n=new Xo(h,u,c,p)}return n}return 0===t?e:1===t?i:e+(i-e)/1*(t-0)},t}(),uh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ch=function(t){function e(e){var i=t.call(this)||this;return"number"==typeof e&&(i=t.call(this,e)||this),i}return uh(e,t),Object.defineProperty(e.prototype,"colors",{get:function(){return this.mcolors},set:function(t){if(null==t)throw new Error("ArgumentNullException : Colors");this.mcolors=t},enumerable:!0,configurable:!0}),e.prototype.getFunction=function(t){var e=this.getColorComponentsCount(t),i=this.getMaxComponentValue(t),r=this.setRange(e,i),n=null;if(null==this.mbrush&&void 0===this.mbrush){var o=[1],s=void 0,a=1;if(2===this.positions.length)s=2;else{var l=this.positions,h=this.getIntervals(l),u=this.gcd(h);a=u,s=1/u+1}o[0]=s;var c=this.getSamplesValues(t,s,i,a);return n=new nh([0,1],r,o,c)}return n},e.prototype.cloneColorBlend=function(){return null!=this.mcolors&&void 0!==this.mcolors&&(this.colors=this.mcolors),null!=this.positions&&void 0!==this.positions&&(this.positions=this.positions),this},e.prototype.setRange=function(t,e){for(var i=[2*t],r=0;r<t;++r)i[2*r]=0,i[2*r+1]=1;return i},e.prototype.getColorComponentsCount=function(t){var e=0;switch(t){case Uo.Rgb:e=3;break;case Uo.Cmyk:e=4;break;case Uo.GrayScale:e=1;break;default:throw new Error("ArgumentException - Unsupported color space: "+t+" colorSpace")}return e},e.prototype.getSamplesValues=function(t,e,i,r){var n;switch(t){case Uo.GrayScale:n=this.getGrayscaleSamples(e,i,r);break;case Uo.Cmyk:n=this.getCmykSamples(e,i,r);break;case Uo.Rgb:n=this.getRgbSamples(e,i,r);break;default:throw new Error("ArgumentException - Unsupported color space: "+t+" colorSpace")}return n},e.prototype.getGrayscaleSamples=function(t,e,i){for(var r=[2*t],n=0;n<t;++n)this.getNextColor(n,i,Uo.GrayScale);return r},e.prototype.getRgbSamples=function(t,e,i){for(var r=[3*t],n=0;n<t;++n){var o=this.getNextColor(n,i,Uo.Rgb),s=3*n;r[s]=o.r,r[s+1]=o.g,r[s+2]=o.b}return r},e.prototype.getCmykSamples=function(t,e,i){for(var r=[4*t],n=0;n<t;n++){var o=this.getNextColor(n,i,Uo.Cmyk),s=4*n;r[s]=o.c*e,r[s+1]=o.m*e,r[s+2]=o.y*e,r[s+3]=o.k*e}return r},e.prototype.getNextColor=function(t,e,i){var r,n,o,s=e*t,a=this.getIndices(s,n,r);if((n=a.indexLow)===(r=a.indexHi))o=this.mcolors[n];else{var l=this.positions[n],h=this.positions[r],u=this.mcolors[n],c=this.mcolors[r],p=(s-l)/(h-l);o=this.interpolate(p,u,c,i)}return o},e.prototype.getIndices=function(t,e,i){var r=this.positions;e=0,i=0;for(var n=0;n<this.mcolors.length;++n){var o=r[n];if(o===t){i=n,e=n;break}if(o>t){i=n;break}e=n,i=n}return{indexLow:e,indexHi:i}},e.prototype.getMaxComponentValue=function(t){var e=0;switch(t){case Uo.Cmyk:case Uo.Rgb:e=255;break;case Uo.GrayScale:e=65535;break;default:throw new Error("ArgumentException - Unsupported color space: "+t+"colorSpace")}return e},e.prototype.getIntervals=function(t){for(var e=t.length,i=[e-1],r=t[0],n=1;n<e;++n){var o=t[n];i[n-1]=o-r,r=o}return i},e}(hh),ph=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),dh=(function(t){function e(e,i,r,n){var o=t.call(this,new io)||this;if(o.mDictionaryProperties=new eo,e instanceof Qo&&i instanceof Qo&&r instanceof Xo&&n instanceof Xo)o.initialize(r,n),o.mPointStart=e,o.mPointEnd=i,o.setPoints(o.mPointStart,o.mPointEnd);else if(e instanceof es)if(o.initialize(i,r),n===oh.BackwardDiagonal||n===oh.ForwardDiagonal||n===oh.Horizontal||n===oh.Vertical){switch(o.mBoundaries=e,n){case oh.BackwardDiagonal:o.mPointStart=new Qo(e.right,e.top),o.mPointEnd=new Qo(e.left,e.bottom);break;case oh.ForwardDiagonal:o.mPointStart=new Qo(e.left,e.top),o.mPointEnd=new Qo(e.right,e.bottom);break;case oh.Horizontal:o.mPointStart=new Qo(e.left,e.top),o.mPointEnd=new Qo(e.right,e.top);break;case oh.Vertical:o.mPointStart=new Qo(e.left,e.top),o.mPointEnd=new Qo(e.left,e.bottom);break;default:throw new Error("ArgumentException -- Unsupported linear gradient mode: "+n+" mode")}o.setPoints(o.mPointStart,o.mPointEnd)}else if("number"==typeof n&&void 0!==n){if(o.mBoundaries=e,0===(n%=360))o.mPointStart=new Qo(e.left,e.top),o.mPointEnd=new Qo(e.right,e.top);else if(90===n)o.mPointStart=new Qo(e.left,e.top),o.mPointEnd=new Qo(e.left,e.bottom);else if(180===n)o.mPointEnd=new Qo(e.left,e.top),o.mPointStart=new Qo(e.right,e.top);else if(270===n)o.mPointEnd=new Qo(e.left,e.top),o.mPointStart=new Qo(e.left,e.bottom);else{var s=n*(Math.PI/180),a=Math.tan(s),l=o.mBoundaries.left+(o.mBoundaries.right-o.mBoundaries.left)/2,h=o.mBoundaries.top+(o.mBoundaries.bottom-o.mBoundaries.top)/2,u=new Qo(l,h);h=a*(l=o.mBoundaries.width/(2*Math.cos(s))),l+=u.x,h+=u.y;var c=new Qo(l,h),p=o.subPoints(c,u),d=o.choosePoint(n),f=o.mulPoints(o.subPoints(d,u),p)/o.mulPoints(p,p);o.mPointEnd=o.addPoints(u,o.mulPoint(p,f)),o.mPointStart=o.addPoints(u,o.mulPoint(p,-1*f))}o.setPoints(o.mPointEnd,o.mPointStart)}return o}ph(e,t),e.prototype.initialize=function(t,e){this.mColours=[t,e],this.mColourBlend=new ch(2),this.mColourBlend.positions=[0,1],this.mColourBlend.colors=this.mColours,this.initShading()},Object.defineProperty(e.prototype,"blend",{get:function(){return this.mBlend},set:function(t){if(null==t)throw new Error("ArgumentNullException : Blend");if(null==this.mColours)throw new Error("NotSupportedException : There is no starting and ending colours specified.");this.mBlend=t,this.mColourBlend=this.mBlend.generateColorBlend(this.mColours,this.colorSpace),this.resetFunction()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"interpolationColors",{get:function(){return this.mColourBlend},set:function(t){if(null==t)throw new Error("ArgumentNullException : InterpolationColors");this.mBlend=null,this.mColours=null,this.mColourBlend=t,this.resetFunction()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"linearColors",{get:function(){return this.mColours},set:function(t){if(null==t)throw new Error("ArgumentNullException : LinearColors");if(t.length<2)throw new Error("ArgumentException : The array is too small - LinearColors");null==this.mColours&&void 0===this.mColours?this.mColours=[t[0],t[1]]:(this.mColours[0]=t[0],this.mColours[1]=t[1]),null==this.mBlend&&void 0===this.mBlend?(this.mColourBlend=new ch(2),this.mColourBlend.colors=this.mColours,this.mColourBlend.positions=[0,1]):this.mColourBlend=this.mBlend.generateColorBlend(this.mColours,this.colorSpace),this.resetFunction()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rectangle",{get:function(){return this.mBoundaries},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extend",{get:function(){var t=eh.None,e=this.shading.items.getValue(this.mDictionaryProperties.extend);if(null!=e){var i=e.items(0),r=e.items(1);i.value&&(t|=eh.Start),r.value&&(t|=eh.End)}return t},set:function(t){var e,i,r=this.shading.items.getValue(this.mDictionaryProperties.extend);null==r?(e=new ra(!1),i=new ra(!1),(r=new uo).add(e),r.add(i),this.shading.items.setValue(this.mDictionaryProperties.extend,r)):(e=r.items(0),i=r.items(1))},enumerable:!0,configurable:!0}),e.prototype.addPoints=function(t,e){var i=t.x+e.x,r=t.y+e.y;return new Qo(i,r)},e.prototype.subPoints=function(t,e){var i=t.x-e.x,r=t.y-e.y;return new Qo(i,r)},e.prototype.mulPoints=function(t,e){return t.x*e.x+t.y*e.y},e.prototype.mulPoint=function(t,e){return t.x=t.x*e,t.y=t.y*e,t},e.prototype.choosePoint=function(t){var e=new Qo(0,0);if(t<90&&t>0)e=new Qo(this.mBoundaries.right,this.mBoundaries.bottom);else if(t<180&&t>90)e=new Qo(this.mBoundaries.left,this.mBoundaries.bottom);else if(t<270&&t>180)e=new Qo(this.mBoundaries.left,this.mBoundaries.top);else{if(!(t>270))throw new Error("PdfException - Internal error.");e=new Qo(this.mBoundaries.right,this.mBoundaries.top)}return e},e.prototype.setPoints=function(t,e){var i=new uo;i.add(new ho(t.x)),i.add(new ho(this.updateY(t.y))),i.add(new ho(e.x)),i.add(new ho(this.updateY(e.y))),this.shading.items.setValue(this.mDictionaryProperties.coords,i)},e.prototype.updateY=function(t){return 0!==t?-t:t},e.prototype.initShading=function(){this.colorSpace=Uo.Rgb,this.function=this.mColourBlend.getFunction(this.colorSpace),this.shading.items.setValue(this.mDictionaryProperties.shadingType,new ho(sh.Axial))},e.prototype.clone=function(){return this.resetPatternDictionary(new io(this.patternDictionary)),this.shading=new io,this.initShading(),this.setPoints(this.mPointStart,this.mPointEnd),null!==this&&this instanceof e&&null!=this.matrix&&void 0!==this.matrix&&(this.matrix=this.matrix.clone()),null!=this.mColours&&void 0!==this.mColours&&(this.mColours=this.mColours),null!=this.blend&&void 0!==this.blend?this.blend=this.blend.clonePdfBlend():null!=this.interpolationColors&&void 0!==this.interpolationColors&&(this.interpolationColors=this.interpolationColors.cloneColorBlend()),this.extend=this.extend,this.cloneBackgroundValue(this),this.cloneAntiAliasingValue(this),this},e.prototype.resetFunction=function(){this.function=this.mColourBlend.getFunction(this.colorSpace)}}(Ha),function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}());!function(t){function e(e,i,r,n,o,s){var a=t.call(this,new io)||this;if(a.mDictionaryProperties=new eo,a.initialize(o,s),i<0)throw new Error("ArgumentOutOfRangeException : radiusStart - The radius cannot be less then zero.");if(n<0)throw new Error("ArgumentOutOfRangeException : radiusEnd - The radius cannpt be less then zero.");return a.mPointEnd=r,a.mPointStart=e,a.mRadiusStart=i,a.mRadiusEnd=n,a.setPoints(a.mPointStart,a.mPointEnd,a.mRadiusStart,a.mRadiusEnd),a}dh(e,t),e.prototype.initialize=function(t,e){this.mColour=[t,e],this.mColourBlends=new ch(2),this.mColourBlends.positions=[0,1],this.mColourBlends.colors=this.mColour,this.initShading()},Object.defineProperty(e.prototype,"blend",{get:function(){return this.mBlend},set:function(t){if(null==t)throw new Error("ArgumentNullException : Blend");if(null==this.mColour&&void 0===this.mColour)throw new Error("NotSupportedException : There is no starting and ending colours specified.");this.mBlend=t,this.mColourBlends=this.mBlend.generateColorBlend(this.mColour,this.colorSpace),this.resetFunction()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"interpolationColors",{get:function(){return this.mColourBlends},set:function(t){if(null==t)throw new Error("ArgumentNullException : InterpolationColors");this.mBlend=null,this.mColour=null,this.mColourBlends=t,this.resetFunction()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"linearColors",{get:function(){return this.mColour},set:function(t){if(null==t)throw new Error("ArgumentNullException : radial LinearColors");if(t.length<2)throw new Error("ArgumentException : The array is too small LinearColors");null==this.mColour&&void 0===this.mColour?this.mColour=[t[0],t[1]]:(this.mColour[0]=t[0],this.mColour[1]=t[1]),null==this.mBlend&&void 0===this.mBlend?(this.mColourBlends=new ch(2),this.mColourBlends.colors=this.mColour,this.mColourBlends.positions=[0,1]):this.mColourBlends=this.mBlend.generateColorBlend(this.mColour,this.colorSpace),this.resetFunction()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rectangle",{get:function(){return this.mBoundaries},set:function(t){this.mBoundaries=t,this.bBox=uo.fromRectangle(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extend",{get:function(){var t=eh.None,e=this.shading.items.getValue(this.mDictionaryProperties.extend);if(null!==e&&void 0!==e){var i=e.items(0),r=e.items(1);i.value&&(t|=eh.Start),r.value&&(t|=eh.End)}return t},set:function(t){var e,i,r=this.shading.items.getValue(this.mDictionaryProperties.extend);null==r&&void 0===r?(e=new ra(!1),i=new ra(!1),(r=new uo).add(e),r.add(i),this.shading.items.setValue(this.mDictionaryProperties.extend,r)):(e=r.items(0),i=r.items(1))},enumerable:!0,configurable:!0}),e.prototype.setPoints=function(t,e,i,r){var n=new uo;n.add(new ho(t.x)),n.add(new ho(this.updateY(t.y))),n.add(new ho(i)),n.add(new ho(e.x)),n.add(new ho(this.updateY(e.y))),i!==r?n.add(new ho(r)):n.add(new ho(0)),this.shading.items.setValue(this.mDictionaryProperties.coords,n)},e.prototype.updateY=function(t){return 0!==t?-t:t},e.prototype.initShading=function(){this.colorSpace=Uo.Rgb,this.function=this.mColourBlends.getFunction(this.colorSpace),this.shading.items.setValue(this.mDictionaryProperties.shadingType,new ho(sh.Radial))},e.prototype.clone=function(){return this.resetPatternDictionary(new io(this.patternDictionary)),this.shading=new io,this.initShading(),this.setPoints(this.mPointStart,this.mPointEnd,this.mRadiusStart,this.mRadiusEnd),this instanceof e&&null!==this.matrix&&void 0!==this.matrix&&(this.matrix=this.matrix.clone()),null!==this.mColour&&void 0!==this.mColour&&(this.mColour=this.mColour),null!==this.blend&&void 0!==this.blend?this.blend=this.blend.clonePdfBlend():null!==this.interpolationColors&&void 0!==this.interpolationColors&&(this.interpolationColors=this.interpolationColors.cloneColorBlend()),this.extend=this.extend,this.cloneBackgroundValue(this),this.cloneAntiAliasingValue(this),this},e.prototype.resetFunction=function(){this.function=this.mColourBlends.getFunction(this.colorSpace)}}(Ha);!function(t){t[t.Overlap=0]="Overlap",t[t.Inside=1]="Inside"}(lh||(lh={}));var fh,gh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),mh=function(){function t(){}return Object.defineProperty(t.prototype,"backgroundBrush",{get:function(){return this.gridBackgroundBrush},set:function(t){this.gridBackgroundBrush=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textBrush",{get:function(){return this.gridTextBrush},set:function(t){this.gridTextBrush=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textPen",{get:function(){return this.gridTextPen},set:function(t){this.gridTextPen=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"font",{get:function(){return this.gridFont},set:function(t){this.gridFont=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"backgroundImage",{get:function(){return this.gridBackgroundImage},set:function(t){this.gridBackgroundImage=t},enumerable:!0,configurable:!0}),t}(),yh=function(t){function e(){var e=t.call(this)||this;return e.gridBorderOverlapStyle=lh.Overlap,e.bAllowHorizontalOverflow=!1,e.gridHorizontalOverflowType=fh.LastPage,e}return gh(e,t),Object.defineProperty(e.prototype,"cellSpacing",{get:function(){return void 0===this.gridCellSpacing&&(this.gridCellSpacing=0),this.gridCellSpacing},set:function(t){this.gridCellSpacing=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"horizontalOverflowType",{get:function(){return this.gridHorizontalOverflowType},set:function(t){this.gridHorizontalOverflowType=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"allowHorizontalOverflow",{get:function(){return this.bAllowHorizontalOverflow},set:function(t){this.bAllowHorizontalOverflow=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cellPadding",{get:function(){return void 0===this.gridCellPadding&&(this.gridCellPadding=new Il),this.gridCellPadding},set:function(t){void 0===this.gridCellPadding?(this.gridCellPadding=new Il,this.gridCellPadding=t):this.gridCellPadding=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"borderOverlapStyle",{get:function(){return this.gridBorderOverlapStyle},set:function(t){this.gridBorderOverlapStyle=t},enumerable:!0,configurable:!0}),e}(mh),bh=function(t){function e(){var e=t.call(this)||this;return e.gridCellBorders=jl.default,e}return gh(e,t),Object.defineProperty(e.prototype,"stringFormat",{get:function(){return this.format},set:function(t){this.format=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"borders",{get:function(){return this.gridCellBorders},set:function(t){this.gridCellBorders=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"cellPadding",{get:function(){return this.gridCellPadding},set:function(t){null!=this.gridCellPadding&&void 0!==this.gridCellPadding||(this.gridCellPadding=new Il),this.gridCellPadding=t},enumerable:!0,configurable:!0}),e}(mh),vh=function(){function t(){}return Object.defineProperty(t.prototype,"backgroundBrush",{get:function(){return this.gridRowBackgroundBrush},enumerable:!0,configurable:!0}),t.prototype.setBackgroundBrush=function(t){if(this.gridRowBackgroundBrush=t,void 0!==this.parent)for(var e=0;e<this.parent.cells.count;e++)this.parent.cells.getCell(e).style.backgroundBrush=t},Object.defineProperty(t.prototype,"textBrush",{get:function(){return this.gridRowTextBrush},enumerable:!0,configurable:!0}),t.prototype.setTextBrush=function(t){if(this.gridRowTextBrush=t,void 0!==this.parent)for(var e=0;e<this.parent.cells.count;e++)this.parent.cells.getCell(e).style.textBrush=t},Object.defineProperty(t.prototype,"textPen",{get:function(){return this.gridRowTextPen},enumerable:!0,configurable:!0}),t.prototype.setTextPen=function(t){if(this.gridRowTextPen=t,void 0!==this.parent)for(var e=0;e<this.parent.cells.count;e++)this.parent.cells.getCell(e).style.textPen=t},Object.defineProperty(t.prototype,"font",{get:function(){return this.gridRowFont},enumerable:!0,configurable:!0}),t.prototype.setFont=function(t){if(this.gridRowFont=t,void 0!==this.parent)for(var e=0;e<this.parent.cells.count;e++)this.parent.cells.getCell(e).style.font=t},Object.defineProperty(t.prototype,"border",{get:function(){return void 0===this.gridRowBorder&&this.setBorder(new jl),this.gridRowBorder},enumerable:!0,configurable:!0}),t.prototype.setBorder=function(t){if(this.gridRowBorder=t,void 0!==this.parent)for(var e=0;e<this.parent.cells.count;e++)this.parent.cells.getCell(e).style.borders=t},t.prototype.setParent=function(t){this.parent=t},Object.defineProperty(t.prototype,"backgroundImage",{get:function(){return this.gridRowBackgroundImage},enumerable:!0,configurable:!0}),t.prototype.setBackgroundImage=function(t){this.gridRowBackgroundImage=t},t}();!function(t){t[t.NextPage=0]="NextPage",t[t.LastPage=1]="LastPage"}(fh||(fh={}));var wh=function(){function t(t){this.cellWidth=0,this.cellHeight=0,this.tempval=0,this.fontSpilt=!1,this.finsh=!0,this.rowSpanRemainingHeight=0,this.hasRowSpan=!1,this.hasColSpan=!1,this.isFinish=!0,this.present=!1,this.gridRowSpan=1,this.colSpan=1,void 0!==t&&(this.gridRow=t)}return Object.defineProperty(t.prototype,"isCellMergeContinue",{get:function(){return this.internalIsCellMergeContinue},set:function(t){this.internalIsCellMergeContinue=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRowMergeContinue",{get:function(){return this.internalIsRowMergeContinue},set:function(t){this.internalIsRowMergeContinue=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCellMergeStart",{get:function(){return this.internalIsCellMergeStart},set:function(t){this.internalIsCellMergeStart=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRowMergeStart",{get:function(){return this.internalIsRowMergeStart},set:function(t){this.internalIsRowMergeStart=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"remainingString",{get:function(){return this.remaining},set:function(t){this.remaining=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"FinishedDrawingCell",{get:function(){return this.isFinish},set:function(t){this.isFinish=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"stringFormat",{get:function(){return null==this.format&&(this.format=new bs),this.format},set:function(t){this.format=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"row",{get:function(){return this.gridRow},set:function(t){this.gridRow=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.objectValue},set:function(t){if(this.objectValue=t,this.objectValue instanceof Th){this.row.grid.isSingleGrid=!1;this.objectValue.ParentCell=this,this.objectValue.isChildGrid=!0;for(var e=this.row.grid.rows.count,i=0;i<e;i++)for(var r=this.row.grid.rows.getRow(i),n=r.cells.count,o=0;o<n;o++){r.cells.getCell(o).parent=this}}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowSpan",{get:function(){return this.gridRowSpan},set:function(t){if(t<1)throw new Error("ArgumentException : Invalid span specified, must be greater than or equal to 1");this.gridRowSpan=t,this.row.rowSpanExists=!0,this.row.grid.hasRowSpanSpan=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return null==this.cellStyle&&(this.cellStyle=new bh),this.cellStyle},set:function(t){this.cellStyle=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return 0===this.cellHeight&&(this.cellHeight=this.measureHeight()),this.cellHeight},set:function(t){this.cellHeight=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columnSpan",{get:function(){return this.colSpan},set:function(t){if(t<1)throw Error("Invalid span specified, must be greater than or equal to 1");this.colSpan=t,this.row.columnSpanExists=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return(0===this.cellWidth||this.row.grid.isComplete)&&(this.cellWidth=this.measureWidth()),Math.round(this.cellWidth)},set:function(t){this.cellWidth=t},enumerable:!0,configurable:!0}),t.prototype.measureWidth=function(){var t=0,e=new ws;if("string"==typeof this.objectValue){t+=e.layout(this.objectValue,this.getTextFont(),this.stringFormat,new Zo(Number.MAX_VALUE,Number.MAX_VALUE),!1,new Zo(0,0)).actualSize.width,t+=2*(this.style.borders.left.width+this.style.borders.right.width)}else if(this.objectValue instanceof Th)t=this.objectValue.size.width;else if(this.objectValue instanceof aa||this.objectValue instanceof ha)t+=this.objectValue.width;else if(this.objectValue instanceof Ul){var i=this.objectValue;t+=e.layout(i.text,i.font,i.stringFormat,new Zo(0,0),!1,new Zo(0,0)).actualSize.width,t+=2*(this.style.borders.left.width+this.style.borders.right.width)}return this.objectValue instanceof Th?null!=this.style.cellPadding||void 0!==this.style.cellPadding?(void 0!==this.style.cellPadding.left&&this.style.cellPadding.hasLeftPad&&(t+=this.style.cellPadding.left),void 0!==this.style.cellPadding.right&&this.style.cellPadding.hasRightPad&&(t+=this.style.cellPadding.right)):(void 0!==this.row.grid.style.cellPadding.left&&this.row.grid.style.cellPadding.hasLeftPad&&(t+=this.row.grid.style.cellPadding.left),void 0!==this.row.grid.style.cellPadding.right&&this.row.grid.style.cellPadding.hasRightPad&&(t+=this.row.grid.style.cellPadding.right)):null!=this.style.cellPadding?t+=this.style.cellPadding.left+this.style.cellPadding.right:t+=this.row.grid.style.cellPadding.left+this.row.grid.style.cellPadding.right,t+=this.row.grid.style.cellSpacing},t.prototype.drawCellBackground=function(t,e){var i=this.getBackgroundBrush();if(null!=i&&(t.save(),t.drawRectangle(i,e.x,e.y,e.width,e.height),t.restore()),null!=this.style.backgroundImage){this.getBackgroundImage();t.drawImage(this.style.backgroundImage,e.x,e.y,e.width,e.height)}},t.prototype.adjustContentLayoutArea=function(t){var e=new ts(t.x,t.y,t.width,t.height);return this.objectValue instanceof Th?(null==this.style.cellPadding||void 0===this.style.cellPadding?(void 0!==this.gridRow.grid.style.cellPadding.left&&this.gridRow.grid.style.cellPadding.hasLeftPad&&(e.x+=this.gridRow.grid.style.cellPadding.left+this.cellStyle.borders.left.width,e.width-=this.gridRow.grid.style.cellPadding.left),void 0!==this.gridRow.grid.style.cellPadding.top&&this.gridRow.grid.style.cellPadding.hasTopPad&&(e.y+=this.gridRow.grid.style.cellPadding.top+this.cellStyle.borders.top.width,e.height-=this.gridRow.grid.style.cellPadding.top),void 0!==this.gridRow.grid.style.cellPadding.right&&this.gridRow.grid.style.cellPadding.hasRightPad&&(e.width-=this.gridRow.grid.style.cellPadding.right),void 0!==this.gridRow.grid.style.cellPadding.bottom&&this.gridRow.grid.style.cellPadding.hasBottomPad&&(e.height-=this.gridRow.grid.style.cellPadding.bottom)):(void 0!==this.style.cellPadding.left&&this.style.cellPadding.hasLeftPad&&(e.x+=this.style.cellPadding.left+this.cellStyle.borders.left.width,e.width-=this.style.cellPadding.left),void 0!==this.style.cellPadding.top&&this.style.cellPadding.hasTopPad&&(e.y+=this.style.cellPadding.top+this.cellStyle.borders.top.width,e.height-=this.style.cellPadding.top),void 0!==this.style.cellPadding.right&&this.style.cellPadding.hasRightPad&&(e.width-=this.style.cellPadding.right),void 0!==this.style.cellPadding.bottom&&this.style.cellPadding.hasBottomPad&&(e.height-=this.style.cellPadding.bottom)),e.width-=this.cellStyle.borders.left.width+this.cellStyle.borders.right.width,e.height-=this.cellStyle.borders.top.width+this.cellStyle.borders.bottom.width):void 0===this.style.cellPadding||null==this.style.cellPadding?(e.x+=this.gridRow.grid.style.cellPadding.left+this.cellStyle.borders.left.width,e.y+=this.gridRow.grid.style.cellPadding.top+this.cellStyle.borders.top.width,e.width-=this.gridRow.grid.style.cellPadding.right+this.gridRow.grid.style.cellPadding.left,e.height-=this.gridRow.grid.style.cellPadding.bottom+this.gridRow.grid.style.cellPadding.top,e.height-=this.cellStyle.borders.top.width+this.cellStyle.borders.bottom.width):(e.x+=this.style.cellPadding.left+this.cellStyle.borders.left.width,e.y+=this.style.cellPadding.top+this.cellStyle.borders.top.width,e.width-=this.style.cellPadding.right+this.style.cellPadding.left,e.width-=this.cellStyle.borders.left.width+this.cellStyle.borders.right.width,e.height-=this.style.cellPadding.bottom+this.style.cellPadding.top,e.height-=this.cellStyle.borders.top.width+this.cellStyle.borders.bottom.width,1===this.rowSpan&&(e.width-=this.style.borders.left.width)),e},t.prototype.draw=function(t,e,i){var r=null;if(this.internalIsCellMergeContinue||this.internalIsRowMergeContinue){if(!this.internalIsCellMergeContinue||!this.row.grid.style.allowHorizontalOverflow)return r;if(this.row.rowOverflowIndex>0&&this.row.cells.indexOf(this)!=this.row.rowOverflowIndex+1||0==this.row.rowOverflowIndex&&this.internalIsCellMergeContinue)return r}e=this.adjustOuterLayoutArea(e,t),this.drawCellBackground(t,e);var n=this.getTextPen(),o=this.getTextBrush();void 0===n&&void 0===o&&(o=new ns(new Xo(0,0,0)));var s=this.getTextFont(),a=this.getStringFormat(),l=e;if(l.height>=t.clientSize.height&&this.row.grid.allowRowBreakAcrossPages&&(l.height-=l.y),l=this.adjustContentLayoutArea(l),"string"==typeof this.objectValue||"string"==typeof this.remaining){var h=void 0,u=void 0;if(u=l.height<s.height?new ts(l.x,l.y,l.width,s.height):l,l.height<s.height&&this.row.grid.isChildGrid&&null!=this.row.grid.ParentCell){var c=u.height-this.row.grid.ParentCell.row.grid.style.cellPadding.bottom-this.row.grid.style.cellPadding.bottom;-1!=this.row.grid.splitChildRowIndex&&(this.fontSpilt=!0,this.row.rowFontSplit=!0),c>0&&c<s.height&&(u.height=c)}0!=this.gridRow.grid.style.cellSpacing&&(u.width-=this.gridRow.grid.style.cellSpacing,e.width-=this.gridRow.grid.style.cellSpacing),this.isFinish?(h=""===this.remaining?this.remaining:this.objectValue,t.drawString(h,s,n,o,u.x,u.y,u.width,u.height,a),-1==this.row.grid.splitChildRowIndex||this.row.grid.isChildGrid||void 0!==this.remaining||(this.remaining="")):(void 0!==this.remaining&&null!==this.remaining||(this.remaining=""),this.row.repeatFlag&&t.drawString(this.remaining,s,n,o,u.x,u.y,u.width,u.height,a),this.isFinish=!0),r=t.stringLayoutResult}else if(this.objectValue instanceof Th){var p=this.objectValue;p.isChildGrid=!0,p.ParentCell=this;var d=void 0;d=l,0!=this.gridRow.grid.style.cellSpacing&&(e.width-=this.gridRow.grid.style.cellSpacing);var f=new Dh(p),g=new Eh;null!=this.row.grid.LayoutFormat?g=this.row.grid.LayoutFormat:g.layout=na.Paginate;var m=new kl;if(null!=t.layer){m.page=t.page,m.bounds=d,m.format=g,p.setSpan(),p.checkSpan();var y=f.Layouter(m);this.value=p,-1!==this.row.grid.splitChildRowIndex&&(this.height=this.row.rowBreakHeightValue),m.page!=y.page&&(y.bounds.height=this.row.rowBreakHeightValue,0==this.row.rowBreakHeight?this.row.NestedGridLayoutResult=y:this.row.rowBreakHeight=this.row.rowBreakHeightValue)}}else if(this.objectValue instanceof aa||this.objectValue instanceof ha){var b=void 0;b=this.objectValue.width<=l.width?new ts(l.x,l.y,this.objectValue.width,l.height):l,t.drawImage(this.objectValue,b.x,b.y,b.width,b.height)}else this.objectValue instanceof Ul?this.objectValue.draw(t.currentPage,l):void 0===this.objectValue&&(this.objectValue="",t.drawString(this.objectValue,s,n,o,l.x,l.y,l.width,l.height,a),null!=this.style.cellPadding&&0==this.style.cellPadding.bottom&&0==this.style.cellPadding.left&&0==this.style.cellPadding.right&&0==this.style.cellPadding.top&&(e.width-=this.style.borders.left.width+this.style.borders.right.width),0!=this.gridRow.grid.style.cellSpacing&&(e.width-=this.gridRow.grid.style.cellSpacing));return null!=this.style.borders&&(this.fontSpilt?-1!=this.row.grid.ParentCell.row.grid.splitChildRowIndex&&(this.row.rowFontSplit=!1,this.drawCellBorders(t,e)):this.drawCellBorders(t,e)),r},t.prototype.drawCellBorders=function(t,e){this.row.grid.style.borderOverlapStyle===lh.Inside&&(e.x+=this.style.borders.left.width,e.y+=this.style.borders.top.width,e.width-=this.style.borders.right.width,e.height-=this.style.borders.bottom.width);var i=new Qo(e.x,e.y+e.height),r=new Qo(e.x,e.y),n=this.cellStyle.borders.left;this.cellStyle.borders.left.dashStyle===Ho.Solid&&(n.lineCap=_o.Square),0!==n.width&&t.drawLine(n,i,r),i=new Qo(e.x+e.width,e.y),r=new Qo(e.x+e.width,e.y+e.height),n=this.cellStyle.borders.right,e.x+e.width>t.clientSize.width-n.width/2&&(i=new Qo(t.clientSize.width-n.width/2,e.y),r=new Qo(t.clientSize.width-n.width/2,e.y+e.height)),this.cellStyle.borders.right.dashStyle===Ho.Solid&&(n.lineCap=_o.Square),0!==n.width&&t.drawLine(n,i,r),i=new Qo(e.x,e.y),r=new Qo(e.x+e.width,e.y),n=this.cellStyle.borders.top,this.cellStyle.borders.top.dashStyle===Ho.Solid&&(n.lineCap=_o.Square),0!==n.width&&t.drawLine(n,i,r),i=new Qo(e.x+e.width,e.y+e.height),r=new Qo(e.x,e.y+e.height),n=this.cellStyle.borders.bottom,e.y+e.height>t.clientSize.height-n.width/2&&(i=new Qo(e.x+e.width,t.clientSize.height-n.width/2),r=new Qo(e.x,t.clientSize.height-n.width/2)),this.cellStyle.borders.bottom.dashStyle===Ho.Solid&&(n.lineCap=_o.Square),0!==n.width&&t.drawLine(n,i,r)},t.prototype.adjustOuterLayoutArea=function(t,e){var i=!1,r=this.row.grid.style.cellSpacing;r>0&&(t=new ts(t.x+r,t.y+r,t.width-r,t.height-r));var n=this.row.cells.indexOf(this);if(this.columnSpan>1||this.row.rowOverflowIndex>0&&n==this.row.rowOverflowIndex+1&&this.isCellMergeContinue){if(1==(h=this.columnSpan)&&this.isCellMergeContinue)for(var o=n+1;o<this.row.grid.columns.count&&this.row.cells.getCell(o).isCellMergeContinue;o++)h++;for(var s=0,a=n;a<n+h;a++){if(this.row.grid.style.allowHorizontalOverflow){var l=this.row.grid.size.width<e.clientSize.width?this.row.grid.size.width:e.clientSize.width;if((this.row.grid.size.width>e.clientSize.width?t.x+s+this.row.grid.columns.getColumn(a).width:s+this.row.grid.columns.getColumn(a).width)>l)break}s+=this.row.grid.columns.getColumn(a).width}s-=this.row.grid.style.cellSpacing,t.width=s}if(this.rowSpan>1||this.row.rowSpanExists){var h=this.rowSpan,u=this.row.grid.rows.rowCollection.indexOf(this.row);-1==u&&-1!=(u=this.row.grid.headers.indexOf(this.row))&&(i=!0);var c=0;for(a=u;a<u+h;a++){c+=i?this.row.grid.headers.getHeader(a).height:this.row.grid.rows.getRow(a).height;var p=this.row.grid.rows.getRow(a);this.row.grid.rows.rowCollection.indexOf(p)}this.row.cells.indexOf(this);c-=this.row.grid.style.cellSpacing,t.height=c,this.row.rowMergeComplete||(t.height=c)}return t},t.prototype.getTextFont=function(){return void 0!==this.style.font&&null!=this.style.font?this.style.font:void 0!==this.row.style.font&&null!=this.row.style.font?this.row.style.font:void 0!==this.row.grid.style.font&&null!=this.row.grid.style.font?this.row.grid.style.font:vl.defaultFont},t.prototype.getTextBrush=function(){return void 0!==this.style.textBrush&&null!=this.style.textBrush?this.style.textBrush:void 0!==this.row.style.textBrush&&null!=this.row.style.textBrush?this.row.style.textBrush:this.row.grid.style.textBrush},t.prototype.getTextPen=function(){return void 0!==this.style.textPen&&null!=this.style.textPen?this.style.textPen:void 0!==this.row.style.textPen&&null!=this.row.style.textPen?this.row.style.textPen:this.row.grid.style.textPen},t.prototype.getBackgroundBrush=function(){return void 0!==this.style.backgroundBrush&&null!=this.style.backgroundBrush?this.style.backgroundBrush:void 0!==this.row.style.backgroundBrush&&null!=this.row.style.backgroundBrush?this.row.style.backgroundBrush:this.row.grid.style.backgroundBrush},t.prototype.getBackgroundImage=function(){return void 0!==this.style.backgroundImage&&null!=this.style.backgroundImage?this.style.backgroundImage:void 0!==this.row.style.backgroundImage&&null!=this.row.style.backgroundImage?this.row.style.backgroundImage:this.row.grid.style.backgroundImage},t.prototype.getStringFormat=function(){return void 0!==this.style.stringFormat&&null!=this.style.stringFormat?this.style.stringFormat:this.stringFormat},t.prototype.measureHeight=function(){var t=this.calculateWidth();null==this.style.cellPadding||void 0===this.style.cellPadding?t-=this.gridRow.grid.style.cellPadding.right+this.gridRow.grid.style.cellPadding.left:(t-=this.style.cellPadding.right+this.style.cellPadding.left,t-=this.style.borders.left.width+this.style.borders.right.width);var e=0,i=new ws;if("string"==typeof this.objectValue||"string"==typeof this.remaining){var r=this.objectValue;this.isFinish||(r=null!==this.remaining&&""!==this.remaining&&void 0!==this.remaining?this.remaining:this.objectValue);var n=this.row.cells.indexOf(this);0!=this.gridRow.grid.style.cellSpacing&&(t-=2*this.gridRow.grid.style.cellSpacing),this.row.cells.getCell(n).hasColSpan||this.row.cells.getCell(n).hasRowSpan||(this.gridRow.grid.isChildGrid?(t<0?(this.tempval=t,null==this.style.cellPadding||void 0===this.style.cellPadding?this.tempval+=this.gridRow.grid.style.cellPadding.right+this.gridRow.grid.style.cellPadding.left:(this.tempval+=this.style.cellPadding.right+this.style.cellPadding.left,this.tempval+=this.style.borders.left.width+this.style.borders.right.width)):this.tempval=t,e+=i.layout(r,this.getTextFont(),this.stringFormat,new Zo(this.tempval,0),!1,new Zo(0,0)).actualSize.height):e+=i.layout(r,this.getTextFont(),this.stringFormat,new Zo(t,0),!1,new Zo(0,0)).actualSize.height),e+=2*(this.style.borders.top.width+this.style.borders.bottom.width)}else if(this.objectValue instanceof Th){n=this.row.cells.indexOf(this);var o=0;null!=this.style.cellPadding||void 0!==this.style.cellPadding?(o=this.calculateWidth(),void 0!==this.style.cellPadding.left&&this.style.cellPadding.hasLeftPad&&(o-=this.style.cellPadding.left),void 0!==this.style.cellPadding.right&&this.style.cellPadding.hasRightPad&&(o-=this.style.cellPadding.right)):null!=this.row.grid.style.cellPadding||void 0!==this.row.grid.style.cellPadding?(o=this.calculateWidth(),void 0!==this.row.grid.style.cellPadding.left&&this.row.grid.style.cellPadding.hasLeftPad&&(o-=this.row.grid.style.cellPadding.left),void 0!==this.row.grid.style.cellPadding.right&&this.row.grid.style.cellPadding.hasRightPad&&(o-=this.row.grid.style.cellPadding.right)):o=this.calculateWidth(),this.objectValue.tempWidth=o,this.row.cells.getCell(n).hasColSpan||this.row.cells.getCell(n).hasRowSpan?e+=2*(this.style.borders.top.width+this.style.borders.bottom.width):e=this.objectValue.size.height,0!==this.gridRow.grid.style.cellSpacing&&(t-=2*this.gridRow.grid.style.cellSpacing),null==this.style.cellPadding&&void 0===this.style.cellPadding||(void 0!==this.row.grid.style.cellPadding.top&&this.row.grid.style.cellPadding.hasTopPad&&(e+=this.row.grid.style.cellPadding.top),this.row.grid.style.cellPadding.hasBottomPad&&void 0!==this.row.grid.style.cellPadding.bottom&&(e+=this.row.grid.style.cellPadding.bottom)),e+=this.objectValue.style.cellSpacing}else if(this.objectValue instanceof aa||this.objectValue instanceof ha)e+=this.objectValue.height;else if(this.objectValue instanceof Ul){var s=this.objectValue;e+=i.layout(s.text,s.font,s.stringFormat,new Zo(t,0),!1,new Zo(0,0)).actualSize.height,e+=2*(this.style.borders.top.width+this.style.borders.bottom.width)}else void 0===this.objectValue&&(null==this.style.cellPadding||void 0===this.style.cellPadding?t-=this.gridRow.grid.style.cellPadding.right+this.gridRow.grid.style.cellPadding.left:(t-=this.style.cellPadding.right+this.style.cellPadding.left,t-=this.style.borders.left.width+this.style.borders.right.width),e+=2*(this.style.borders.top.width+this.style.borders.bottom.width));return this.objectValue instanceof Th?null==this.style.cellPadding||void 0===this.style.cellPadding?(void 0!==this.row.grid.style.cellPadding.top&&this.row.grid.style.cellPadding.hasTopPad&&(e+=this.row.grid.style.cellPadding.top),void 0!==this.row.grid.style.cellPadding.bottom&&this.row.grid.style.cellPadding.hasBottomPad&&(e+=this.row.grid.style.cellPadding.bottom)):(void 0!==this.style.cellPadding.top&&this.style.cellPadding.hasTopPad&&(e+=this.style.cellPadding.top),void 0!==this.style.cellPadding.bottom&&this.style.cellPadding.hasBottomPad&&(e+=this.style.cellPadding.bottom)):null==this.style.cellPadding||void 0===this.style.cellPadding?e+=this.row.grid.style.cellPadding.top+this.row.grid.style.cellPadding.bottom:e+=this.style.cellPadding.top+this.style.cellPadding.bottom,e+=this.row.grid.style.cellSpacing},t.prototype.calculateWidth=function(){var t=this.row.cells.indexOf(this),e=(this.row.grid.rows.rowCollection.indexOf(this.row),this.columnSpan),i=0;if(1===e)for(var r=0;r<e;r++)i+=this.row.grid.columns.getColumn(t+r).width;else if(e>1)for(r=0;r<e;r++)i+=this.row.grid.columns.getColumn(t+r).width,r+1<e&&(this.row.cells.getCell(t+r+1).hasColSpan=!0);if(null!=this.parent&&this.parent.row.width>0&&this.row.grid.isChildGrid&&null!=this.parent&&this.row.width>this.parent.row.width){i=0;for(var n=0;n<this.parent.columnSpan;n++)i+=this.parent.row.grid.columns.getColumn(n).width;i/=this.row.cells.count}return i},t}(),Sh=function(){function t(t){this.cells=[],this.gridRow=t}return t.prototype.getCell=function(t){if(t<0||t>=this.count)throw new Error("IndexOutOfRangeException");return this.cells[t]},Object.defineProperty(t.prototype,"count",{get:function(){return this.cells.length},enumerable:!0,configurable:!0}),t.prototype.add=function(t){if(void 0===t){var e=new wh;return this.add(e),t}t.row=this.gridRow,this.cells.push(t)},t.prototype.indexOf=function(t){return this.cells.indexOf(t)},t}(),Ph=function(){function t(t){this.columnWidth=0,this.grid=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this.columnWidth},set:function(t){this.isCustomWidth=!0,this.columnWidth=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"format",{get:function(){return null==this.stringFormat&&(this.stringFormat=new bs),this.stringFormat},set:function(t){this.stringFormat=t},enumerable:!0,configurable:!0}),t}(),Ch=function(){function t(t){this.internalColumns=[],this.columnWidth=0,this.grid=t,this.internalColumns=[]}return t.prototype.add=function(t){for(var e=0;e<t;e++){this.internalColumns.push(new Ph(this.grid));for(var i=0;i<this.grid.rows.count;i++){var r=this.grid.rows.getRow(i),n=new wh;n.value="",r.cells.add(n)}}},Object.defineProperty(t.prototype,"count",{get:function(){return this.internalColumns.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return 0===this.columnWidth&&(this.columnWidth=this.measureColumnsWidth()),0===this.grid.initialWidth||this.columnWidth===this.grid.initialWidth||this.grid.style.allowHorizontalOverflow||(this.columnWidth=this.grid.initialWidth,this.grid.isPageWidth=!0),this.columnWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columns",{get:function(){return this.internalColumns},enumerable:!0,configurable:!0}),t.prototype.getColumn=function(t){if(t>=0&&t<=this.columns.length)return this.columns[t];throw Error("can not get the column from the index: "+t)},t.prototype.measureColumnsWidth=function(){var t=0;this.grid.measureColumnsWidth();for(var e=0,i=this.internalColumns.length;e<i;e++)t+=this.internalColumns[e].width;return t},t.prototype.getDefaultWidths=function(t){for(var e=[],i=this.count,r=0;r<this.count;r++)this.grid.isPageWidth&&t>=0&&!this.internalColumns[r].isCustomWidth?this.internalColumns[r].width=0:(e[r]=this.internalColumns[r].width,this.internalColumns[r].width>0&&this.internalColumns[r].isCustomWidth?(t-=this.internalColumns[r].width,i--):e[r]=0);for(r=0;r<this.count;r++){var n=t/i;e[r]<=0&&(e[r]=n)}return e},t}(),xh=function(){function t(t){this.gridRowOverflowIndex=0,this.rowHeight=0,this.rowWidth=0,this.isrowFinish=!1,this.isRowSpanRowHeightSet=!1,this.noOfPageCount=0,this.isRowHeightSet=!1,this.isPageBreakRowSpanApplied=!1,this.isRowMergeComplete=!0,this.repeatFlag=!1,this.rowFontSplit=!1,this.isHeaderRow=!1,this.pdfGrid=t}return Object.defineProperty(t.prototype,"rowSpanExists",{get:function(){return this.bRowSpanExists},set:function(t){this.bRowSpanExists=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cells",{get:function(){return null==this.gridCells&&(this.gridCells=new Sh(this)),this.gridCells},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"grid",{get:function(){return this.pdfGrid},set:function(t){this.pdfGrid=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return void 0===this.rowStyle&&(this.rowStyle=new vh,this.rowStyle.setParent(this)),this.rowStyle},set:function(t){this.rowStyle=t;for(var e=0;e<this.cells.count;e++)this.cells.getCell(e).style.borders=t.border,void 0!==t.font&&(this.cells.getCell(e).style.font=t.font),void 0!==t.backgroundBrush&&(this.cells.getCell(e).style.backgroundBrush=t.backgroundBrush),void 0!==t.backgroundImage&&(this.cells.getCell(e).style.backgroundImage=t.backgroundImage),void 0!==t.textBrush&&(this.cells.getCell(e).style.textBrush=t.textBrush),void 0!==t.textPen&&(this.cells.getCell(e).style.textPen=t.textPen)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowBreakHeight",{get:function(){return void 0===this.gridRowBreakHeight&&(this.gridRowBreakHeight=0),this.gridRowBreakHeight},set:function(t){this.gridRowBreakHeight=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowOverflowIndex",{get:function(){return this.gridRowOverflowIndex},set:function(t){this.gridRowOverflowIndex=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.isRowHeightSet||(this.rowHeight=this.measureHeight()),this.rowHeight},set:function(t){this.rowHeight=t,this.isRowHeightSet=!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return 0!==this.rowWidth&&void 0!==this.rowWidth||(this.rowWidth=this.measureWidth()),this.rowWidth},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"NestedGridLayoutResult",{get:function(){return this.gridResult},set:function(t){this.gridResult=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"columnSpanExists",{get:function(){return this.bColumnSpanExists},set:function(t){this.bColumnSpanExists=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowMergeComplete",{get:function(){return this.isRowMergeComplete},set:function(t){this.isRowMergeComplete=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowIndex",{get:function(){return this.grid.rows.rowCollection.indexOf(this)},enumerable:!0,configurable:!0}),t.prototype.measureHeight=function(){var t,e=0,i=0;t=this.cells.getCell(0).rowSpan>1?0:this.cells.getCell(0).height;for(var r=0;r<this.cells.count;r++){var n=this.cells.getCell(r);if(n.rowSpanRemainingHeight>e&&(e=n.rowSpanRemainingHeight),this.rowMergeComplete=!1,n.rowSpan>1){for(var o=r,s=this.isHeaderRow?this.grid.headers.indexOf(this):this.grid.rows.rowCollection.indexOf(this),a=0;a<n.rowSpan;a++)a+1<n.rowSpan&&((this.isHeaderRow?this.grid.headers.getHeader(s+a+1):this.grid.rows.getRow(s+a+1)).cells.getCell(o).hasRowSpan=!0);i<n.height&&(i=n.height)}else t=Math.max(t,n.height)}return i>t&&(t=i),0===t?t=i:e>0&&(t+=e),t},t.prototype.measureWidth=function(){for(var t=0,e=0;e<this.grid.columns.count;e++){t+=this.grid.columns.getColumn(e).width}return t},t}(),Oh=function(){function t(t){this.rows=[],this.grid=t}return Object.defineProperty(t.prototype,"count",{get:function(){return this.rows.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rowCollection",{get:function(){return this.rows},enumerable:!0,configurable:!0}),t.prototype.addRow=function(t){if(void 0===t){var e=new xh(this.grid);return this.addRow(e),e}if(t.style.setBackgroundBrush(this.grid.style.backgroundBrush),t.style.setFont(this.grid.style.font),t.style.setTextBrush(this.grid.style.textBrush),t.style.setTextPen(this.grid.style.textPen),0===t.cells.count)for(var i=0;i<this.grid.columns.count;i++)t.cells.add(new wh);this.rows.push(t)},t.prototype.getRow=function(t){return this.rows[t]},t}(),Bh=function(){function t(t){this.rows=[],this.grid=t,this.rows=[]}return t.prototype.getHeader=function(t){return this.rows[t]},Object.defineProperty(t.prototype,"count",{get:function(){return this.rows.length},enumerable:!0,configurable:!0}),t.prototype.add=function(t){if("number"==typeof t){for(var e=void 0,i=0;i<t;i++){(e=new xh(this.grid)).isHeaderRow=!0;for(var r=0;r<this.grid.columns.count;r++)e.cells.add(new wh);this.rows.push(e)}return this.rows}this.rows.push(t)},t.prototype.indexOf=function(t){return this.rows.indexOf(t)},t}(),Lh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Th=function(t){function e(){var e=t.call(this)||this;return e.gridSize=new Zo(0,0),e.isGridSplit=!1,e.isRearranged=!1,e.pageBounds=new ts,e.listOfNavigatePages=[],e.parentCellIndex=0,e.tempWidth=0,e.breakRow=!0,e.splitChildRowIndex=-1,e.hasRowSpanSpan=!1,e.hasColumnSpan=!1,e.isSingleGrid=!0,e}return Lh(e,t),Object.defineProperty(e.prototype,"raiseBeginCellDraw",{get:function(){return void 0!==this.beginCellDraw&&null!==typeof this.beginCellDraw},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"raiseEndCellDraw",{get:function(){return void 0!==this.endCellDraw&&null!==typeof this.endCellDraw},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"repeatHeader",{get:function(){return null!=this.bRepeatHeader&&void 0!==this.bRepeatHeader||(this.bRepeatHeader=!1),this.bRepeatHeader},set:function(t){this.bRepeatHeader=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"allowRowBreakAcrossPages",{get:function(){return this.breakRow},set:function(t){this.breakRow=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columns",{get:function(){return null!=this.gridColumns&&void 0!==this.gridColumns||(this.gridColumns=new Ch(this)),this.gridColumns},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return null==this.gridRows&&(this.gridRows=new Oh(this)),this.gridRows},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"headers",{get:function(){return null!=this.gridHeaders&&void 0!==this.gridHeaders||(this.gridHeaders=new Bh(this)),this.gridHeaders},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"initialWidth",{get:function(){return this.gridInitialWidth},set:function(t){this.gridInitialWidth=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return null==this.gridStyle&&(this.gridStyle=new yh),this.gridStyle},set:function(t){null==this.gridStyle&&(this.gridStyle=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isPageWidth",{get:function(){return this.ispageWidth},set:function(t){this.ispageWidth=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isChildGrid",{get:function(){return this.ischildGrid},set:function(t){this.ischildGrid=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return 0!==this.gridSize.width&&void 0!==this.gridSize.width||0!==this.gridSize.height||(this.gridSize=this.measure()),this.gridSize},set:function(t){this.gridSize=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ParentCell",{get:function(){return this.parentCell},set:function(t){this.parentCell=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"LayoutFormat",{get:function(){return this.layoutFormat},enumerable:!0,configurable:!0}),e.prototype.draw=function(t,e,i,r){if(e instanceof Qo&&void 0===e.width&&void 0===i)return this.drawHelper(t,e.x,e.y);if("number"==typeof e&&"number"==typeof i&&void 0===r)return this.drawHelper(t,e,i,null);if(e instanceof ts&&void 0!==e.width&&void 0===i)return this.drawHelper(t,e,null);if(e instanceof Qo&&void 0===e.width&&i instanceof Dl)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&"number"==typeof i&&(r instanceof Dl||null==r)){var n=t.graphics.clientSize.width-e,o=new ts(e,i,n,0);return this.drawHelper(t,o,r)}return e instanceof ts&&void 0!==e.width&&"boolean"==typeof i?this.drawHelper(t,e,null):this.drawHelper(t,e,i)},e.prototype.measure=function(){for(var t=0,e=this.columns.width,i=0;i<this.headers.count;i++){t+=this.headers.getHeader(i).height}for(i=0;i<this.rows.count;i++){t+=this.rows.getRow(i).height}return new Zo(e,t)},e.prototype.onBeginCellDraw=function(t){this.raiseBeginCellDraw&&this.beginCellDraw(this,t)},e.prototype.onEndCellDraw=function(t){this.raiseEndCellDraw&&this.endCellDraw(this,t)},e.prototype.layout=function(t){var e=t.bounds.width,i=t.bounds.height,r=!1;if(void 0!==t.bounds.width&&0!==t.bounds.width||(e=t.page.getClientSize().width-t.bounds.x,r=!0),void 0!==t.bounds.height&&0!==t.bounds.height||(i=t.page.getClientSize().height-t.bounds.y,r=!0),r&&(t.bounds=new ts(t.bounds.x,t.bounds.y,e,i)),0!==this.rows.count){var n=this.rows.getRow(0).cells.getCell(0).style;if(null!=n.borders&&(null!=n.borders.left&&1!==n.borders.left.width||null!=n.borders.top&&1!==n.borders.top.width)){var o=n.borders.left.width/2,s=n.borders.top.width/2;if(t.bounds.x===jl.default.right.width/2&&t.bounds.y===jl.default.right.width/2){var a=new ts(o,s,this.gridSize.width,this.gridSize.height);t.bounds=a}}}this.setSpan(),this.checkSpan(),this.layoutFormat=t.format,this.gridLocation=t.bounds;return new Dh(this).Layouter(t)},e.prototype.setSpan=function(){for(var t=1,e=1,i=0,r=0,n=0,o=this.headers.count,s=0;s<o;s++){var a=this.headers.getHeader(s);n=0;for(var l=a.cells.count,h=0;h<l;h++){var u=a.cells.getCell(h);if(n=Math.max(n,u.rowSpan),!u.isCellMergeContinue&&!u.isRowMergeContinue&&(u.columnSpan>1||u.rowSpan>1)){if(u.columnSpan+h>a.cells.count)throw new Error("Invalid span specified at row "+h.toString()+" column "+s.toString());if(u.rowSpan+s>this.headers.count)throw new Error("Invalid span specified at Header "+h.toString()+" column "+s.toString());if(u.columnSpan>1&&u.rowSpan>1){for(t=u.columnSpan,e=u.rowSpan,i=h,r=s,u.isCellMergeStart=!0,u.isRowMergeStart=!0;t>1;)i++,a.cells.getCell(i).isCellMergeContinue=!0,a.cells.getCell(i).isRowMergeContinue=!0,a.cells.getCell(i).rowSpan=e,t--;for(i=h,t=u.columnSpan;e>1;){for(r++,this.headers.getHeader(r).cells.getCell(h).isRowMergeContinue=!0,this.headers.getHeader(r).cells.getCell(i).isRowMergeContinue=!0,e--;t>1;)i++,this.headers.getHeader(r).cells.getCell(i).isCellMergeContinue=!0,this.headers.getHeader(r).cells.getCell(i).isRowMergeContinue=!0,t--;t=u.columnSpan,i=h}}else if(u.columnSpan>1&&1===u.rowSpan)for(t=u.columnSpan,i=h,u.isCellMergeStart=!0;t>1;)i++,a.cells.getCell(i).isCellMergeContinue=!0,t--;else if(1===u.columnSpan&&u.rowSpan>1)for(e=u.rowSpan,r=s;e>1;)r++,this.headers.getHeader(r).cells.getCell(h).isRowMergeContinue=!0,e--}}a.maximumRowSpan=n}},e.prototype.checkSpan=function(){var t,e,i=1,r=0,n=0;if(t=i=1,e=n=0,this.hasRowSpanSpan||this.hasColumnSpan)for(var o=this.rows.count,s=0;s<o;s++){var a=this.rows.getRow(s);r=0;for(var l=a.cells.count,h=0;h<l;h++){var u=a.cells.getCell(h);if(r=Math.max(r,u.rowSpan),!u.isCellMergeContinue&&!u.isRowMergeContinue&&(u.columnSpan>1||u.rowSpan>1)){if(u.columnSpan+h>a.cells.count)throw new Error("Invalid span specified at row "+h.toString()+" column "+s.toString());if(u.rowSpan+s>this.rows.count)throw new Error("Invalid span specified at row "+h.toString()+" column "+s.toString());if(u.columnSpan>1&&u.rowSpan>1){for(t=u.columnSpan,i=u.rowSpan,e=h,n=s,u.isCellMergeStart=!0,u.isRowMergeStart=!0;t>1;)e++,a.cells.getCell(e).isCellMergeContinue=!0,a.cells.getCell(e).isRowMergeContinue=!0,t--;for(e=h,t=u.columnSpan;i>1;){for(n++,this.rows.getRow(n).cells.getCell(h).isRowMergeContinue=!0,this.rows.getRow(n).cells.getCell(e).isRowMergeContinue=!0,i--;t>1;)e++,this.rows.getRow(n).cells.getCell(e).isCellMergeContinue=!0,this.rows.getRow(n).cells.getCell(e).isRowMergeContinue=!0,t--;t=u.columnSpan,e=h}}else if(u.columnSpan>1&&1===u.rowSpan)for(t=u.columnSpan,e=h,u.isCellMergeStart=!0;t>1;)e++,a.cells.getCell(e).isCellMergeContinue=!0,t--;else if(1===u.columnSpan&&u.rowSpan>1)for(i=u.rowSpan,n=s;i>1;)n++,this.rows.getRow(n).cells.getCell(h).isRowMergeContinue=!0,i--}}a.maximumRowSpan=r}},e.prototype.measureColumnsWidth=function(t){if(void 0!==t){this.isPageWidth=!1;for(var e=this.columns.getDefaultWidths(t.width-t.x),i=0,r=this.columns.count;i<r;i++)this.columns.getColumn(i).columnWidth=e[i],this.tempWidth=e[i];if(null!=this.ParentCell&&0==this.style.allowHorizontalOverflow&&0==this.ParentCell.row.grid.style.allowHorizontalOverflow){var n=0,o=0,s=this.columns.count,a=0;null==this.ParentCell.style.cellPadding&&void 0===this.ParentCell.style.cellPadding||(void 0!==this.ParentCell.style.cellPadding.left&&this.ParentCell.style.cellPadding.hasLeftPad&&(n+=this.ParentCell.style.cellPadding.left),void 0!==this.ParentCell.style.cellPadding.right&&this.ParentCell.style.cellPadding.hasRightPad&&(n+=this.ParentCell.style.cellPadding.right));for(i=0;i<this.ParentCell.columnSpan;i++)o+=this.ParentCell.row.grid.columns.getColumn(this.parentCellIndex+i).width;for(var l=0;l<this.columns.count;l++)this.gridColumns.getColumn(l).width>0&&this.gridColumns.getColumn(l).isCustomWidth&&(o-=this.gridColumns.getColumn(l).width,s--);if(null==this.ParentCell.row.grid.style.cellPadding&&void 0===this.ParentCell.row.grid.style.cellPadding||(void 0!==this.ParentCell.row.grid.style.cellPadding.top&&this.ParentCell.row.grid.style.cellPadding.hasTopPad&&(n+=this.ParentCell.row.grid.style.cellPadding.top),void 0!==this.ParentCell.row.grid.style.cellPadding.bottom&&this.ParentCell.row.grid.style.cellPadding.hasBottomPad&&(n+=this.ParentCell.row.grid.style.cellPadding.bottom)),0!=this.ParentCell.row.grid.style.cellSpacing&&(o-=2*this.ParentCell.row.grid.style.cellSpacing),o>n&&(a=(o-n)/s,this.tempWidth=a,null!=this.ParentCell))for(l=0;l<this.columns.count;l++)this.columns.getColumn(l).isCustomWidth||(this.columns.getColumn(l).columnWidth=a)}}else{e=[this.columns.count];for(var h=0;h<this.columns.count;h++)e[h]=0;var u=0;if((void 0===this.isChildGrid&&void 0!==this.gridLocation||null===this.isChildGrid&&void 0!==this.gridLocation)&&(this.initialWidth=this.gridLocation.width),this.headers.count>0){var c=this.headers.getHeader(0).cells.count,p=this.headers.count;for(i=0;i<c;i++){u=0;for(l=0;l<p;l++){var d=Math.min(this.initialWidth,this.headers.getHeader(l).cells.getCell(i).width);u=Math.max(u,d)}e[i]=u}}u=0;i=0;for(var f=this.columns.count;i<f;i++){for(l=0,p=this.rows.count;l<p;l++)if(1==this.rows.getRow(l).cells.getCell(i).columnSpan&&!this.rows.getRow(l).cells.getCell(i).isCellMergeContinue||null!=this.rows.getRow(l).cells.getCell(i).value){if(null!=this.rows.getRow(l).cells.getCell(i).value&&!this.rows.getRow(l).grid.style.allowHorizontalOverflow)this.rows.getRow(l).grid.style.cellPadding.right,this.rows.getRow(l).grid.style.cellPadding.left,this.rows.getRow(l).cells.getCell(i).style.borders.left.width;d=0;d=this.initialWidth>0?Math.min(this.initialWidth,this.rows.getRow(l).cells.getCell(i).width):this.rows.getRow(l).cells.getCell(i).width,u=Math.max(e[i],Math.max(u,d)),u=Math.max(this.columns.getColumn(i).width,u)}0!=this.rows.count&&(e[i]=u),u=0}i=0;for(var g=this.rows.count;i<g;i++){l=0;for(var m=this.columns.count;l<m;l++)if(this.rows.getRow(i).cells.getCell(l).columnSpan>1){e[l];for(var y=1;y<this.rows.getRow(i).cells.getCell(l).columnSpan;y++)e[l+y]}}for(i=0,r=this.columns.count;i<r;i++)this.columns.getColumn(i).width<=0?this.columns.getColumn(i).columnWidth=e[i]:this.columns.getColumn(i).width>0&&!this.columns.getColumn(i).isCustomWidth&&(this.columns.getColumn(i).columnWidth=e[i]);n=0;var b=0,v=this.columns.count,w=0;b=this.tempWidth;for(l=0;l<this.columns.count;l++)this.gridColumns.getColumn(l).width>0&&this.gridColumns.getColumn(l).isCustomWidth&&(b-=this.gridColumns.getColumn(l).width,v--);if(b>0&&0!=this.ParentCell.row.grid.style.cellSpacing&&(b-=2*this.ParentCell.row.grid.style.cellSpacing),b>n&&(w=b/v,null!=this.ParentCell))for(l=0;l<this.columns.count;l++)this.columns.getColumn(l).isCustomWidth||(this.columns.getColumn(l).columnWidth=w)}},e}(Rl),Mh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Dh=function(t){function e(e){var i=t.call(this,e)||this;return i.gridInitialWidth=0,i.gridSize=new Zo(0,0),i.parentCellIndex=0,i.tempWidth=0,i.childheight=0,i.isChildGrid=!1,i.hasRowSpanSpan=!1,i.isRearranged=!1,i.pageBounds=new ts,i.listOfNavigatePages=[],i.flag=!0,i.columnRanges=[],i.currentLocation=new Qo(0,0),i.breakRow=!0,i.slr=null,i.remainderText=null,i.isPaginate=!1,i.isOverloadWithPosition=!1,i}return Mh(e,t),Object.defineProperty(e.prototype,"Grid",{get:function(){return this.elements},enumerable:!0,configurable:!0}),e.prototype.getFormat=function(t){return t},e.prototype.layoutInternal=function(t){var e=this.getFormat(t.format);if(this.gridLayoutFormat=this.getFormat(t.format),this.currentPage=t.page,null===this.currentPage)throw Error("Can not set page as null");this.currentPage.getClientSize().height,this.currentPage.getClientSize().width;this.currentPageBounds=this.currentPage.getClientSize(),this.currentGraphics=this.currentPage.graphics;var i=0;if(i=this.currentGraphics.page.section.indexOf(this.currentGraphics.page),this.listOfNavigatePages.push(i),null!=e&&e.break===Va.FitColumnsToPage?this.currentBounds=new ts(new Qo(t.bounds.x,t.bounds.y),new Zo(this.Grid.columns.width,this.currentGraphics.clientSize.height)):this.currentBounds=new ts(new Qo(t.bounds.x,t.bounds.y),this.currentGraphics.clientSize),0!==this.Grid.rows.count)this.currentBounds.width=t.bounds.width>0?t.bounds.width:this.currentBounds.width-this.Grid.rows.getRow(0).cells.getCell(0).style.borders.left.width/2;else{if(0===this.Grid.headers.count)throw Error("Please add row or header into grid");this.currentBounds.width=t.bounds.width}if(this.startLocation=new Qo(t.bounds.x,t.bounds.y),t.bounds.height>0&&!this.Grid.isChildGrid&&(this.currentBounds.height=t.bounds.height),this.Grid.isChildGrid||(this.hType=this.Grid.style.horizontalOverflowType),this.Grid.style.allowHorizontalOverflow?(this.Grid.measureColumnsWidth(),this.determineColumnDrawRanges()):(this.columnRanges=[],void 0!==this.Grid.isChildGrid&&(this.Grid.isChildGrid,1)?this.Grid.measureColumnsWidth(this.currentBounds):this.Grid.measureColumnsWidth(new ts(this.currentBounds.x,this.currentBounds.y,this.currentBounds.x+this.currentBounds.width,this.currentBounds.height)),this.columnRanges.push([0,this.Grid.columns.count-1])),this.Grid.hasRowSpanSpan)for(var r=0;r<this.Grid.rows.count;r++)-1===this.Grid.rows.getRow(r).height||this.Grid.rows.getRow(r).isRowHeightSet||(this.Grid.rows.getRow(r).isRowHeightSet=!0);return this.layoutOnPage(t)},e.prototype.determineColumnDrawRanges=function(){for(var t=0,e=0,i=0,r=this.currentGraphics.clientSize.width-this.currentBounds.x,n=0;n<this.Grid.columns.count;n++)if((i+=this.Grid.columns.getColumn(n).width)>=r){for(var o=0,s=t;s<=n&&!((o+=this.Grid.columns.getColumn(s).width)>r);s++)e=s;this.columnRanges.push([t,e]),i=(e=t=e+1)<=n?this.Grid.columns.getColumn(n).width:0}this.columnRanges.push([t,this.Grid.columns.count-1])},e.prototype.layoutOnPage=function(t){this.pageBounds.x=t.bounds.x,this.pageBounds.y=t.bounds.y,this.pageBounds.height=t.bounds.height;for(var i=this.getFormat(t.format),r=null,n=new $s,o=t.page,s=[],a=0;a<this.columnRanges.length;a++){var l=this.columnRanges[a];this.cellStartIndex=l[0],this.cellEndIndex=l[1];var h=this.raiseBeforePageLayout(this.currentPage,this.currentBounds,this.currentRowIndex);this.currentBounds=h.currentBounds,this.currentRowIndex=h.currentRowIndex;for(var u=void 0,c=0;c<this.Grid.headers.count;c++){var p=this.Grid.headers.getHeader(c),d=this.currentBounds.y;if(this.isHeader=!0,o!=this.currentPage)for(var f=this.cellStartIndex;f<=this.cellEndIndex;f++)p.cells.getCell(f).isCellMergeContinue&&(p.cells.getCell(f).isCellMergeContinue=!1,p.cells.getCell(f).value="");var g=this.drawRow(p);d===this.currentBounds.y?(u=!0,-1===e.repeatRowIndex&&(e.repeatRowIndex=c)):u=!1,!g.isFinish&&null!==o&&i.layout!==na.OnePage&&u&&(this.startLocation.x=this.currentBounds.x,this.currentPage=this.getNextPageformat(i),this.startLocation.y=this.currentBounds.y,void 0!==i.paginateBounds&&0===i.paginateBounds.x&&0===i.paginateBounds.y&&0===i.paginateBounds.width&&0===i.paginateBounds.height&&(this.currentBounds.x+=this.startLocation.x),this.drawRow(p)),this.isHeader=!1}var m=0,y=(this.Grid.rows.count,void 0),b=!0;s=[];for(var v=0;v<this.Grid.rows.count;v++){p=this.Grid.rows.getRow(v);m++,this.currentRowIndex=m-1;var w=this.currentBounds.y;o=this.currentPage,e.repeatRowIndex=-1,b&&p.grid.isChildGrid&&(b=!1);var S=null;if(-1==this.Grid.splitChildRowIndex)S=this.drawRow(p),p.isrowFinish=!0;else{if(!(p.grid.ParentCell.row.grid.isGridSplit&&this.Grid.splitChildRowIndex<=p.rowIndex)){if(p.isrowFinish)continue;break}S=this.drawRow(p),p.isrowFinish=!0}for(s.push(S.bounds.width),w===this.currentBounds.y?(y=!0,e.repeatRowIndex=this.Grid.rows.rowCollection.indexOf(p)):(y=!1,e.repeatRowIndex=-1);!S.isFinish&&null!=o;){var P=this.getLayoutResult();if(this.raisePageLayouted(P).cancel||y)break;if(this.Grid.allowRowBreakAcrossPages){this.currentPage=this.getNextPageformat(i),w=this.currentBounds.y;var C=new Qo(jl.default.right.width/2,jl.default.top.width/2);if(0===i.paginateBounds.x&&0===i.paginateBounds.y&&0===i.paginateBounds.width&&0===i.paginateBounds.height&&this.startLocation.x===C.x&&this.startLocation.y===C.y&&(this.currentBounds.x+=this.startLocation.x,this.currentBounds.y+=this.startLocation.y),this.isPaginate&&(this.startLocation.y=this.currentBounds.y,this.isPaginate=!1),this.Grid.isChildGrid&&null!=p.grid.ParentCell&&null!=this.Grid.ParentCell.row.grid.style.cellPadding&&p.rowBreakHeight+this.Grid.ParentCell.row.grid.style.cellPadding.top<this.currentBounds.height&&(this.currentBounds.y=this.Grid.ParentCell.row.grid.style.cellPadding.top),null!=p.grid.ParentCell){p.grid.ParentCell.row.isRowBreaksNextPage=!0,p.grid.ParentCell.row.rowBreakHeightValue=p.rowBreakHeight+this.Grid.ParentCell.row.grid.style.cellPadding.top+this.Grid.ParentCell.row.grid.style.cellPadding.bottom;for(var x=p.rowIndex+1;x<p.grid.rows.count;x++)p.grid.ParentCell.row.rowBreakHeightValue+=p.grid.rows.getRow(x).height}if(p.grid.isChildGrid){p.isrowFinish=!1,p.grid.splitChildRowIndex=p.rowIndex,p.grid.ParentCell.row.grid.splitChildRowIndex=p.grid.ParentCell.row.rowIndex,p.grid.ParentCell.row.grid.isGridSplit&&(p.grid.ParentCell.row.noOfPageCount+=1,p.grid.ParentCell.row.grid.isGridSplit=!1);break}if(p.noOfPageCount<1){if(-1!=p.grid.splitChildRowIndex&&(p.grid.isGridSplit=!0),null!=p.style.border&&(null!=p.style.border.left&&1!==p.style.border.left.width||null!=p.style.border.top&&1!==p.style.border.top.width)){var O=p.style.border.left.width/2,B=p.style.border.top.width/2;if(this.currentBounds.x===jl.default.right.width/2&&this.currentBounds.y===jl.default.right.width/2){var L=new ts(O,B,this.currentBounds.width,this.currentBounds.height);this.currentBounds=L}}if(this.Grid.repeatHeader)for(var T=0;T<this.Grid.headers.count;T++){var M=this.Grid.headers.getHeader(T);this.drawRow(M)}if(S=this.drawRow(p),p.noOfPageCount>=1){p.rowBreakHeightValue;for(var D=0;D<p.noOfPageCount;D++){var k=this.getLayoutResult();if(this.raisePageLayouted(k),this.currentPage=this.getNextPageformat(i),w=this.currentBounds.y,-1!=p.grid.splitChildRowIndex&&(p.grid.isGridSplit=!0),this.currentBounds.y=.5,this.Grid.repeatHeader)for(var E=0;E<this.Grid.headers.count;E++){var j=this.Grid.headers.getHeader(E);this.drawRow(j)}this.drawRow(p)}}p.grid.splitChildRowIndex=-1,p.grid.isGridSplit=!1,S.isFinish=this.checkIsFisished(p);for(var I=0;I<p.cells.count;I++)p.cells.getCell(I).value instanceof Th&&(p.cells.getCell(I).value.splitChildRowIndex=-1)}}}if(!S.isFinish&&null!==o&&i.layout!==na.OnePage&&y){if(this.startLocation.x=this.currentBounds.x,this.currentPage=this.getNextPageformat(i),this.raiseBeforePageLayout(this.currentPage,this.currentBounds,this.currentRowIndex).returnValue)break;if(null!==t.format&&!t.format.usePaginateBounds&&null!==t.bounds&&t.bounds.height>0&&!this.Grid.isChildGrid&&(this.currentBounds.height=t.bounds.height),void 0===t.format||null==t.format||void 0===t.format.usePaginateBounds||t.format.usePaginateBounds||0===t.format.paginateBounds.x&&0===t.format.paginateBounds.y&&0===t.format.paginateBounds.width&&0===t.format.paginateBounds.height||0!==t.format.paginateBounds.y?(this.currentBounds.y=null==i?0:i.paginateBounds.y,null==i||0===i.paginateBounds.x&&0===i.paginateBounds.y&&0===i.paginateBounds.height&&0===i.paginateBounds.width||(this.currentBounds.x=i.paginateBounds.x,this.currentBounds.width=i.paginateBounds.width,this.currentBounds.height=i.paginateBounds.height)):this.currentBounds.y=jl.default.top.width/2,void 0!==t.format&&null!==t.format&&void 0!==t.format.usePaginateBounds&&!t.format.usePaginateBounds&&null!==t.bounds&&t.bounds.y>0&&!this.Grid.isChildGrid&&(this.currentBounds.y=t.bounds.y),this.startLocation.y=this.currentBounds.y,i.paginateBounds.x===i.paginateBounds.y&&i.paginateBounds.y===i.paginateBounds.height&&i.paginateBounds.height===i.paginateBounds.width&&0===i.paginateBounds.width&&(this.currentBounds.x+=this.startLocation.x),this.currentBounds.x===jl.default.left.width/2&&(this.currentBounds.y+=this.startLocation.x),this.Grid.repeatHeader)for(var R=0;R<this.Grid.headers.count;R++){j=this.Grid.headers.getHeader(R);this.drawRow(j)}this.drawRow(p),null===this.currentPage||n.containsKey(this.currentPage)||n.add(this.currentPage,l)}if(null!=p.NestedGridLayoutResult){this.currentPage=p.NestedGridLayoutResult.page,this.currentGraphics=this.currentPage.graphics,this.startLocation=new Qo(p.NestedGridLayoutResult.bounds.x,p.NestedGridLayoutResult.bounds.y);var A=this.ReCalculateHeight(p,p.NestedGridLayoutResult.bounds.height);if(this.currentBounds.y=A,o!=this.currentPage){for(var N=this.currentPage.section,F=N.indexOf(o)+1,V=N.indexOf(this.currentPage),z=F;z<V+1;z++){var G=this.currentPage.graphics,_=new Qo(i.paginateBounds.x,i.paginateBounds.y),H=z==V?p.NestedGridLayoutResult.bounds.height-t.bounds.y:this.currentBounds.height-_.y;H<=G.clientSize.height&&(H+=t.bounds.y),_.y=null==i?.5:i.paginateBounds.y;for(var W=0;W<p.cells.count;W++){var U=p.cells.getCell(W),q=0,K=0;if(U.value instanceof Th)for(var Y=0;Y<U.value.columns.count;Y++)K+=U.value.columns.getColumn(Y).columnWidth;else K=U.width;q=Math.max(K,p.grid.columns.getColumn(W).width),U.drawCellBorders(G,new ts(_,new Zo(q,H))),_.x+=q,W+=U.columnSpan-1}}o=this.currentPage}}}var $=!1,J=0;s.length>0&&(J=s[0]);var X=[[1,2]];for(W=0;W<this.Grid.rows.count;W++)if(-1!=this.cellEndIndex&&this.Grid.rows.getRow(W).cells.getCell(this.cellEndIndex).value instanceof Th){var Q=this.Grid.rows.getRow(W).cells.getCell(this.cellEndIndex).value;this.rowLayoutBoundsWidth=Q.rowLayoutBoundsWidth,$=!0}if(!$&&s.length>0){for(W=0;W<m-1;W++)J<s[W]&&(J=s[W]);this.rowLayoutBoundsWidth=J}else this.rowLayoutBoundsWidth=X[0][1];if(this.columnRanges.indexOf(l)<this.columnRanges.length-1&&null!=o&&i.layout!=na.OnePage)if(this.Grid.isChildGrid,0!=X[0][0]){this.currentPage.section.indexOf(this.currentPage);this.currentGraphics=this.currentPage.graphics,this.currentBounds=new ts(new Qo(0,0),this.currentPage.getClientSize());this.currentGraphics.page.section.indexOf(this.currentGraphics.page)}else this.currentPage=this.getNextPageformat(i);this.columnRanges.length-1!==a&&this.columnRanges.length>1&&i.layout!==na.OnePage&&(this.currentPage=this.getNextPageformat(i),i.paginateBounds.x===i.paginateBounds.y&&i.paginateBounds.y===i.paginateBounds.height&&i.paginateBounds.height===i.paginateBounds.width&&0===i.paginateBounds.width&&(this.currentBounds.x+=this.startLocation.x,this.currentBounds.y+=this.startLocation.y))}return r=this.getLayoutResult(),this.Grid.style.allowHorizontalOverflow&&this.Grid.style.horizontalOverflowType==fh.NextPage&&this.reArrangePages(n),this.raisePageLayouted(r),r},e.prototype.checkIsFisished=function(t){for(var e=!0,i=0;i<t.cells.count;i++)t.cells.getCell(i).FinishedDrawingCell||(e=!1);return e},e.prototype.getNextPageformat=function(t){var e=this.currentPage.section,i=null,r=e.indexOf(this.currentPage);this.flag=!1,i=r===e.count-1?e.add():e.getPages()[r+1],this.currentGraphics=i.graphics;var n=this.currentGraphics.page.section.indexOf(this.currentGraphics.page);return-1===this.listOfNavigatePages.indexOf(n)&&this.listOfNavigatePages.push(n),this.currentBounds=new ts(new Qo(0,0),i.getClientSize()),void 0!==t&&null!=t&&t.usePaginateBounds&&void 0!==t.paginateBounds&&null!=t.paginateBounds&&t.paginateBounds.x!==t.paginateBounds.y&&t.paginateBounds.y!==t.paginateBounds.height&&t.paginateBounds.height!==t.paginateBounds.width&&0!==t.paginateBounds.width&&(this.currentBounds.x=t.paginateBounds.x,this.currentBounds.y=t.paginateBounds.y,this.currentBounds.height=t.paginateBounds.height),i},e.prototype.CheckIfDefaultFormat=function(t){var e=new bs;return t.alignment===e.alignment&&t.characterSpacing===e.characterSpacing&&t.clipPath===e.clipPath&&t.firstLineIndent===e.firstLineIndent&&t.horizontalScalingFactor===e.horizontalScalingFactor&&t.lineAlignment===e.lineAlignment&&t.lineLimit===e.lineLimit&&t.lineSpacing===e.lineSpacing&&t.measureTrailingSpaces===e.measureTrailingSpaces&&t.noClip===e.noClip&&t.paragraphIndent===e.paragraphIndent&&t.rightToLeft===e.rightToLeft&&t.subSuperScript===e.subSuperScript&&t.wordSpacing===e.wordSpacing&&t.wordWrap===e.wordWrap},e.prototype.RaiseBeforeCellDraw=function(t,e,i,r,n,o){var s=null;return this.Grid.raiseBeginCellDraw&&(s=new Ih(t,e,i,r,n,o),this.Grid.onBeginCellDraw(s),o=s.style),o},e.prototype.raiseAfterCellDraw=function(t,e,i,r,n,o){var s=null;this.Grid.raiseEndCellDraw&&(s=new Rh(t,e,i,r,n,o),this.Grid.onEndCellDraw(s))},e.prototype.reArrangePages=function(t){for(var e=this.currentPage.document,i=[],r=t.keys(),n=(t.values(),0);n<r.length;n++){(a=r[n]).section=null,i.push(a),e.pages.remove(a)}for(n=0;n<t.size();n++)for(var o=n,s=t.size()/this.columnRanges.length;o<t.size();o+=s){var a;void 0!==(a=i[o])&&-1===e.pages.indexOf(a)&&e.pages.add(a)}},e.prototype.getLayoutResult=function(){if(this.Grid.isChildGrid&&this.Grid.allowRowBreakAcrossPages)for(var t=0;t<this.Grid.rows.count;t++){var e=this.Grid.rows.getRow(t);e.rowBreakHeight>0&&e.repeatFlag&&(this.startLocation.y=this.currentPage.origin.y)}var i;return this.isChanged||(i=new ts(this.startLocation,new Zo(this.currentBounds.width,this.currentBounds.y-this.startLocation.y))),new kh(this.currentPage,i)},e.prototype.ReCalculateHeight=function(t,e){for(var i=0,r=this.cellStartIndex;r<=this.cellEndIndex;r++)null!==t.cells.getCell(r).remainingString&&""!==t.cells.getCell(r).remainingString&&void 0!==t.cells.getCell(r).remainingString&&(i=Math.max(i,t.cells.getCell(r).measureHeight()));return Math.max(e,i)},e.prototype.raiseBeforePageLayout=function(t,e,i){var r=!1;if(this.Grid.raiseBeginPageLayout){var n=new Vh(e,t,i);this.Grid.onBeginPageLayout(n),r=void 0!==n.cancel&&n.cancel,e=n.bounds,i=n.startRowIndex}return{returnValue:r,currentBounds:e,currentRowIndex:i}},e.prototype.raisePageLayouted=function(t){var e=new zh(t);return this.Grid.raiseEndPageLayout&&this.Grid.onEndPageLayout(e),e},e.prototype.drawRow=function(t,i,r){if(void 0===i){var n=new Gh,o=0,s=new Zo(0,0),a=!1;if(t.rowSpanExists){var l=0,h=this.Grid.rows.rowCollection.indexOf(t);-1===h&&-1!==(h=this.Grid.headers.indexOf(t))&&(a=!0);for(var u=0;u<t.cells.count;u++){var c=t.cells.getCell(u);l=Math.max(l,c.rowSpan)}for(u=h;u<h+l;u++)o+=a?this.Grid.headers.getHeader(u).height:this.Grid.rows.getRow(u).height}var p=t.rowBreakHeight>0?t.rowBreakHeight:t.height;if(void 0!==this.Grid.isChildGrid&&this.Grid.isChildGrid&&void 0!==this.Grid.ParentCell&&null!=this.Grid.ParentCell)this.currentBounds.y+this.Grid.ParentCell.row.grid.style.cellPadding.bottom+p>this.currentPageBounds.height||this.currentBounds.y+this.Grid.ParentCell.row.grid.style.cellPadding.bottom+p>this.currentBounds.height||this.currentBounds.y+this.Grid.ParentCell.row.grid.style.cellPadding.bottom+o>this.currentPageBounds.height?(void 0!==this.Grid.ParentCell.row.grid.LayoutFormat&&this.Grid.ParentCell.row.grid.LayoutFormat.break===Va.FitPage&&(e.repeatRowIndex=this.Grid.rows.rowCollection.indexOf(t),this.Grid.splitChildRowIndex=this.Grid.rows.rowCollection.indexOf(t)),e.repeatRowIndex>-1&&e.repeatRowIndex===t.rowIndex&&this.Grid.allowRowBreakAcrossPages&&(n.isFinish=!0,n.bounds=this.currentBounds,this.drawRowWithBreak(n,t,p),t.repeatFlag=!0,t.repeatRowNumber=e.repeatRowIndex)):(n.isFinish=!0,t.grid.ParentCell.row.rowBreakHeightValue>0?t.repeatFlag=!0:(t.repeatFlag=!1,p=t.height),this.Grid.isChildGrid&&t.rowBreakHeight>0&&null!=this.Grid.ParentCell.row.grid.style.cellPadding&&(p+=this.Grid.ParentCell.row.grid.style.cellPadding.bottom),this.drawRow(t,n,p));else if(p>this.currentPageBounds.height)this.Grid.allowRowBreakAcrossPages&&(n.isFinish=!0,this.drawRowWithBreak(n,t,p),t.isrowFinish=!0,t.repeatFlag=!0,-1!==t.grid.splitChildRowIndex&&(n.isFinish=!1));else if(this.currentBounds.y+p>this.currentPageBounds.height||this.currentBounds.y+p>this.currentBounds.height+this.startLocation.y||this.currentBounds.y+o>this.currentPageBounds.height){var d=!1;!this.Grid.allowRowBreakAcrossPages||this.Grid.repeatHeader||t.isRowHeightSet||t.rowMergeComplete?this.Grid.allowRowBreakAcrossPages&&null!=this.Grid.LayoutFormat&&this.Grid.LayoutFormat.layout==na.Paginate&&this.Grid.LayoutFormat.break!=Va.FitElement&&t.isRowHeightSet&&this.currentBounds.y+r>this.currentPageBounds.height&&((d=this.isFitToCell(this.currentPageBounds.height-this.currentBounds.y,this.Grid,t))||(d=!(null!==this.slr&&0==this.slr.actualSize.height&&null!=this.slr.remainder&&this.slr.remainder.length>0&&this.remainderText==this.slr.remainder)),d&&null!=this.slr&&this.slr.lineCount>1&&(d=!1),this.remainderText=null):(d=null!==this.Grid.LayoutFormat&&this.Grid.LayoutFormat.paginateBounds.height>0?this.isFitToCell(this.currentBounds.height+this.startLocation.y-this.currentBounds.y,this.Grid,t):this.isFitToCell(this.currentPageBounds.height-this.currentBounds.y,this.Grid,t))&&(this.isPaginate=!0),e.repeatRowIndex>-1&&e.repeatRowIndex===t.rowIndex||d?this.Grid.allowRowBreakAcrossPages?(n.isFinish=!0,this.drawRowWithBreak(n,t,p),t.repeatFlag=!0,t.repeatRowNumber=e.repeatRowIndex,-1!==t.grid.splitChildRowIndex&&(n.isFinish=!1)):(n.isFinish=!1,this.drawRow(t,n,p)):n.isFinish=!1}else n.isFinish=!0,this.drawRow(t,n,p),t.repeatFlag=!1;return n}var f=new Qo(this.currentBounds.x,this.currentBounds.y);i.bounds=new ts(f,new Zo(0,0)),r=this.ReCalculateHeight(t,r);for(u=this.cellStartIndex;u<=this.cellEndIndex;u++){var g=u>this.cellEndIndex+1&&t.cells.getCell(u).columnSpan>1;if(!g)for(var m=1;m<t.cells.getCell(u).columnSpan;m++)t.cells.getCell(u+m).isCellMergeContinue=!0;s=new Zo(this.Grid.columns.getColumn(u).width,r);!this.CheckIfDefaultFormat(this.Grid.columns.getColumn(u).format)&&this.CheckIfDefaultFormat(t.cells.getCell(u).stringFormat)&&(t.cells.getCell(u).stringFormat=this.Grid.columns.getColumn(u).format);var y=t.cells.getCell(u).style,b="string"==typeof t.cells.getCell(u).value&&null!==t.cells.getCell(u).value?t.cells.getCell(u).value:"";if(t.cells.getCell(u).style=this.RaiseBeforeCellDraw(this.currentGraphics,this.currentRowIndex,u,new ts(f,s),b,y),t.cells.getCell(u).value instanceof Th){(w=t.cells.getCell(u).value).parentCellIndex=u}var v=t.cells.getCell(u).draw(this.currentGraphics,new ts(f,s),g);if(t.grid.style.allowHorizontalOverflow&&(t.cells.getCell(u).columnSpan>this.cellEndIndex||u+t.cells.getCell(u).columnSpan>this.cellEndIndex+1)&&this.cellEndIndex<t.cells.count-1&&(t.rowOverflowIndex=this.cellEndIndex),t.grid.style.allowHorizontalOverflow&&t.rowOverflowIndex>0&&(t.cells.getCell(u).columnSpan>this.cellEndIndex||u+t.cells.getCell(u).columnSpan>this.cellEndIndex+1)&&t.cells.getCell(u).columnSpan-this.cellEndIndex+u-1>0&&(t.cells.getCell(t.rowOverflowIndex+1).value=null!==v&&void 0!==v.remainder?v.remainder:"",t.cells.getCell(t.rowOverflowIndex+1).stringFormat=t.cells.getCell(u).stringFormat,t.cells.getCell(t.rowOverflowIndex+1).style=t.cells.getCell(u).style,t.cells.getCell(t.rowOverflowIndex+1).columnSpan=t.cells.getCell(u).columnSpan-this.cellEndIndex+u-1),b="string"==typeof t.cells.getCell(u).value&&null!==t.cells.getCell(u).value?t.cells.getCell(u).value:"",g||this.raiseAfterCellDraw(this.currentGraphics,this.currentRowIndex,u,new ts(f,s),b,t.cells.getCell(u).style),t.cells.getCell(u).value instanceof Th){var w=t.cells.getCell(u).value;this.Grid.columns.getColumn(u).width>=this.currentGraphics.clientSize.width?(f.x=w.rowLayoutBoundsWidth,f.x+=w.style.cellSpacing):f.x+=this.Grid.columns.getColumn(u).width}else f.x+=this.Grid.columns.getColumn(u).width}t.rowMergeComplete&&!t.isRowHeightSet||(this.currentBounds.y+=r),i.bounds=new ts(new Qo(i.bounds.x,i.bounds.y),new Zo(f.x,f.y))},e.prototype.isFitToCell=function(t,e,i){for(var r=!1,n=new ws,o=0;o<i.cells.count;o++){var s=i.cells.getCell(o);if(void 0!==s.value&&null!==s.value&&"string"==typeof s.value){var a=null;a=void 0!==s.style.font&&null!=s.style.font?s.style.font:void 0!==s.row.style.font&&null!=s.row.style.font?s.row.style.font:void 0!==s.row.grid.style.font&&null!=s.row.grid.style.font?s.row.grid.style.font:vl.defaultFont,this.remainderText=i.cells.getCell(o).value;var l=i.cells.getCell(o).width;e.columns.getColumn(o).isCustomWidth&&i.cells.getCell(o).width>e.columns.getColumn(o).width&&(l=e.columns.getColumn(o).width),this.slr=n.layout(i.cells.getCell(o).value,a,i.cells.getCell(o).stringFormat,new Zo(l,t),!1,this.currentPageBounds);var h=this.slr.actualSize.height;if(0==h){r=!1;break}if(null!=i.cells.getCell(o).style&&null!=i.cells.getCell(o).style.borders&&null!=i.cells.getCell(o).style.borders.top&&null!=i.cells.getCell(o).style.borders.bottom&&(h+=2*(i.cells.getCell(o).style.borders.top.width+i.cells.getCell(o).style.borders.bottom.width)),this.slr.lineCount>1&&null!=i.cells.getCell(o).stringFormat&&0!=i.cells.getCell(o).stringFormat.lineSpacing&&(h+=(this.slr.lineCount-1)*i.cells.getCell(o).style.stringFormat.lineSpacing),i.cells.getCell(o).style.cellPadding,h+=e.style.cellPadding.top+e.style.cellPadding.bottom,h+=e.style.cellSpacing,t>h||void 0!==this.slr.remainder&&null!==this.slr.remainder){r=!0;break}}}return r},e.prototype.drawRowWithBreak=function(t,e,i){var r=new Qo(this.currentBounds.x,this.currentBounds.y);e.grid.isChildGrid&&e.grid.allowRowBreakAcrossPages&&this.startLocation.x!==this.currentBounds.x&&(r.x=this.startLocation.x),t.bounds=new ts(r,new Zo(0,0)),this.gridHeight=e.rowBreakHeight>0?this.currentPageBounds.height:0,e.grid.style.cellPadding.top+this.currentBounds.y+e.grid.style.cellPadding.bottom<this.currentPageBounds.height&&(e.rowBreakHeight=this.currentBounds.y+i-this.currentPageBounds.height);for(var n=0;n<e.cells.count;n++){var o=e.cells.getCell(n);o.measureHeight()===i&&o.value instanceof Th&&(e.rowBreakHeight=0)}for(n=this.cellStartIndex;n<=this.cellEndIndex;n++){var s=e.cells.getCell(n).columnSpan+n>this.cellEndIndex+1&&e.cells.getCell(n).columnSpan>1,a=new Zo(this.Grid.columns.getColumn(n).width,this.gridHeight>0?this.gridHeight:this.currentPageBounds.height),l=e.cells.getCell(n).style;e.cells.getCell(n).style=l;var h=null;if(h=e.cells.getCell(n).draw(this.currentGraphics,new ts(r,a),s),e.rowBreakHeight>0&&null!=h&&void 0!==h.remainder&&(e.cells.getCell(n).FinishedDrawingCell=!1,e.cells.getCell(n).remainingString=null==h.remainder?" ":h.remainder,e.rowBreakHeight=i-h.actualSize.height),t.isFinish=t.isFinish?e.cells.getCell(n).FinishedDrawingCell:t.isFinish,e.cells.getCell(n).value instanceof Th){var u=e.cells.getCell(n).value;this.rowBreakPageHeightCellIndex=n,this.Grid.columns.getColumn(n).width>=this.currentGraphics.clientSize.width?(r.x=this.rowLayoutBoundsWidth,r.x+=u.style.cellSpacing):r.x+=this.Grid.columns.getColumn(n).width}else r.x+=this.Grid.columns.getColumn(n).width}this.currentBounds.y+=this.gridHeight>0?this.gridHeight:i,t.bounds=new ts(new Qo(t.bounds.x,t.bounds.y),new Zo(r.x,r.y))},e.repeatRowIndex=-1,e}(Ml),kh=function(t){function e(e,i){return t.call(this,e,i)||this}return Mh(e,t),e}(El),Eh=function(t){function e(e){return t.call(this,e)||this}return Mh(e,t),e}(Dl),jh=function(){function t(t,e,i,r,n){this.gridRowIndex=e,this.gridCellIndex=i,this.internalValue=n,this.gridBounds=r,this.pdfGraphics=t}return Object.defineProperty(t.prototype,"rowIndex",{get:function(){return this.gridRowIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cellIndex",{get:function(){return this.gridCellIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.internalValue},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return this.gridBounds},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphics",{get:function(){return this.pdfGraphics},enumerable:!0,configurable:!0}),t}(),Ih=function(t){function e(e,i,r,n,o,s){var a=t.call(this,e,i,r,n,o)||this;return a.style=s,a}return Mh(e,t),Object.defineProperty(e.prototype,"skip",{get:function(){return this.bSkip},set:function(t){this.bSkip=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this.cellStyle},set:function(t){this.cellStyle=t},enumerable:!0,configurable:!0}),e}(jh),Rh=function(t){function e(e,i,r,n,o,s){var a=t.call(this,e,i,r,n,o)||this;return a.cellStyle=s,a}return Mh(e,t),Object.defineProperty(e.prototype,"style",{get:function(){return this.cellStyle},enumerable:!0,configurable:!0}),e}(jh),Ah=function(){function t(){}return Object.defineProperty(t.prototype,"cancel",{get:function(){return this.isCancel},set:function(t){this.isCancel=t},enumerable:!0,configurable:!0}),t}(),Nh=function(t){function e(e,i){var r=t.call(this)||this;return r.bounds=e,r.pdfPage=i,r}return Mh(e,t),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.cellBounds},set:function(t){this.cellBounds=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){return this.pdfPage},enumerable:!0,configurable:!0}),e}(Ah),Fh=function(t){function e(e){var i=t.call(this)||this;return i.layoutResult=e,i}return Mh(e,t),Object.defineProperty(e.prototype,"result",{get:function(){return this.layoutResult},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nextPage",{get:function(){return this.nextPdfPage},set:function(t){this.nextPdfPage=t},enumerable:!0,configurable:!0}),e}(Ah),Vh=function(t){function e(e,i,r){var n=t.call(this,e,i)||this;return n.startRow=r,n}return Mh(e,t),Object.defineProperty(e.prototype,"startRowIndex",{get:function(){return this.startRow},enumerable:!0,configurable:!0}),e}(Nh),zh=function(t){function e(e){return t.call(this,e)||this}return Mh(e,t),e}(Fh),Gh=function(){function t(){this.layoutedBounds=new ts(0,0,0,0)}return Object.defineProperty(t.prototype,"isFinish",{get:function(){return this.bIsFinished},set:function(t){this.bIsFinished=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return this.layoutedBounds},set:function(t){this.layoutedBounds=t},enumerable:!0,configurable:!0}),t}(),_h=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Hh=function(t){function e(e){var i=t.call(this,e)||this;return i.olderPdfForm=0,i.shapeBounds=new ts,i.totalPageSize=0,i}return _h(e,t),Object.defineProperty(e.prototype,"element",{get:function(){return this.elements},enumerable:!0,configurable:!0}),e.prototype.layoutInternal=function(t){var e=t.page,i=t.bounds,r=this.element.getBounds();r.x=0,r.y=0;var n=this.shapeBounds.x===this.shapeBounds.y&&this.shapeBounds.y===this.shapeBounds.width&&this.shapeBounds.width===this.shapeBounds.height&&0===this.shapeBounds.height;this.isPdfGrid&&!n&&(r=this.shapeBounds);var o=null,s=new Wh;for(s.page=e;;){var a=this.raiseBeforePageLayout(e,i);i=a.currentBounds;var l=null;if(a.cancel||(s=this.layoutOnPage(e,i,r,t),l=this.raiseEndPageLayout(s),a.cancel=null!==l&&l.cancel),s.end||a.cancel){o=this.getLayoutResult(s);break}if(i=this.getPaginateBounds(t),r=this.getNextShapeBounds(r,s),e=null===l||null===l.nextPage?this.getNextPage(e):l.nextPage,this.isPdfGrid){o=this.getLayoutResult(s);break}}return o},e.prototype.raiseBeforePageLayout=function(t,e){var i=!1;if(this.element.raiseBeginPageLayout){var r=new Nh(e,t);this.element.onBeginPageLayout(r),i=r.cancel,e=r.bounds}return{currentBounds:e,cancel:i}},e.prototype.raiseEndPageLayout=function(t){var e=null;if(this.element.raiseEndPageLayout){var i=this.getLayoutResult(t);e=new Fh(i),this.element.onEndPageLayout(e)}return e},e.prototype.getLayoutResult=function(t){return new El(t.page,t.bounds)},e.prototype.getNextShapeBounds=function(t,e){var i=e.bounds;return t.y=t.y+i.height,t.height=t.height-i.height,t},e.prototype.layoutOnPage=function(t,e,i,r){var n=new Wh;e=this.checkCorrectCurrentBounds(t,e,r);var o=this.fitsToBounds(e,i),s=!1;if(!(r.format.break===Va.FitElement&&!o&&t===r.page)){var a=this.getDrawBounds(e,i);this.drawShape(t.graphics,e,a),n.bounds=this.getPageResultBounds(e,i),s=e.height>=i.height}return n.end=s||r.format.layout===na.OnePage,n.page=t,n},e.prototype.getDrawBounds=function(t,e){var i=t;return i.y=i.y-e.y,i.height=i.height+e.y,i},e.prototype.drawShape=function(t,e,i){var r=t.save();try{t.setClip(e),this.element.drawGraphicsHelper(t,new Qo(i.x,i.y))}finally{t.restore(r)}},e.prototype.checkCorrectCurrentBounds=function(t,e,i){var r=t.graphics.clientSize;return e.width=e.width>0?e.width:r.width-e.x,e.height=e.height>0?e.height:r.height-e.y,this.isPdfGrid&&(e.height=e.height-this.bottomCellPadding),e},e.prototype.getPageResultBounds=function(t,e){var i=t;return i.height=Math.min(i.height,e.height),i},e.prototype.fitsToBounds=function(t,e){return e.height<=t.height},e.index=0,e.splitDiff=0,e.last=!1,e.borderWidth=0,e}(Ml),Wh=function(){return function(){}}(),Uh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),qh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Uh(e,t),e.prototype.getBounds=function(){return this.getBoundsInternal()},e.prototype.drawGraphicsHelper=function(t,e){if(null==t)throw new Error("ArgumentNullException :graphics");this.drawShapeHelper(t,e.x,e.y)},e.prototype.drawShapeHelper=function(t,e,i){var r=.5!==e||.5!==i,n=null;r&&(n=t.save(),t.translateTransform(e,i)),this.drawInternal(t),r&&t.restore(n)},e.prototype.layout=function(t){return new Hh(this).layout(t)},e}(Rl),Kh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Yh=function(t){function e(e){var i=t.call(this)||this;return void 0!==e&&(i.mpen=e),i}return Kh(e,t),Object.defineProperty(e.prototype,"pen",{get:function(){return this.mpen},set:function(t){this.mpen=t},enumerable:!0,configurable:!0}),e}(qh),$h=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Jh=function(t){function e(e,i){var r=t.call(this)||this;return r.mbrush=null,void 0===e||(e instanceof Us?r=t.call(this,e)||this:r.mbrush=i),r}return $h(e,t),Object.defineProperty(e.prototype,"brush",{get:function(){return this.mbrush},set:function(t){this.mbrush=t},enumerable:!0,configurable:!0}),e.prototype.obtainPen=function(){return null==this.mbrush&&null==this.pen?new Us(new Xo(0,0,0)):this.pen},e}(Yh),Xh=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),Qh=(function(t){function e(e,i,r,n){var o=t.call(this)||this;return o.mpoints=null,o.mpathTypes=null,o.mStartFigure=!0,o.mfillMode=Wo.Alternate,o.isBeziers3=!1,o.isXps=!1,void 0===e||(e instanceof Us?(o=t.call(this,e)||this,i instanceof is?(o=t.call(this,e,i)||this).fillMode=r:null!==i&&void 0!==i&&null!==r&&void 0!==r&&o.addPath(i,r)):e instanceof is?(o=t.call(this,e)||this,null!==i&&void 0!==i&&(o.fillMode=i),null!==r&&void 0!==r&&null!==n&&void 0!==n&&o.addPath(r,n)):o.addPath(e,i)),o}Xh(e,t),Object.defineProperty(e.prototype,"fillMode",{get:function(){return this.mfillMode},set:function(t){this.mfillMode=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pathPoints",{get:function(){return this.points},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pathTypes",{get:function(){return this.types},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pointCount",{get:function(){var t=0;return null!=this.mpoints&&(t=this.mpoints.length),t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastPoint",{get:function(){return this.getLastPoint()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"points",{get:function(){return null==this.mpoints&&(this.mpoints=[]),this.mpoints},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"types",{get:function(){return null==this.mpathTypes&&(this.mpathTypes=[]),this.mpathTypes},enumerable:!0,configurable:!0}),e.prototype.draw=function(t,e,i,r){if(e instanceof Qo&&void 0===e.width&&void 0===i)return this.drawHelper(t,e.x,e.y);if(e instanceof ts&&void 0!==e.width&&void 0===i)return this.drawHelper(t,e,null);if("number"==typeof e&&"number"==typeof i&&void 0===r)return this.drawHelper(t,e,i,null);if(e instanceof Qo&&i instanceof Dl)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&(r instanceof Dl||null==r)&&"number"==typeof i){var n=t.graphics.clientSize.width-e,o=new ts(e,i,n,0);return this.drawHelper(t,o,r)}return this.drawHelper(t,e,i)},e.prototype.addArc=function(t,e,i,r,n,o){if(t instanceof ts)this.addArc(t.x,t.y,t.width,t.height,e,i);else for(var s=this.getBezierArcPoints(t,e,e+i,e+r,n,o),a=0;a<s.length;a+=8){var l=[s[a],s[a+1],s[a+2],s[a+3],s[a+4],s[a+5],s[a+6],s[a+7]];this.addPoints(l,za.Bezier3)}},e.prototype.addBezier=function(t,e,i,r,n,o,s,a){if(t instanceof Qo&&e instanceof Qo&&i instanceof Qo&&r instanceof Qo)this.addBezier(t.x,t.y,e.x,e.y,i.x,i.y,r.x,r.y);else{var l=[];l.push(t),l.push(e),l.push(i),l.push(r),l.push(n),l.push(o),l.push(s),l.push(a),this.addPoints(l,za.Bezier3)}},e.prototype.addEllipse=function(t,e,i,r){t instanceof ts?this.addEllipse(t.x,t.y,t.width,t.height):(this.startFigure(),this.addArc(t,e,i,r,0,360),this.closeFigure())},e.prototype.addLine=function(t,e,i,r){if(t instanceof Qo&&e instanceof Qo)this.addLine(t.x,t.y,e.x,e.y);else{var n=[];n.push(t),n.push(e),n.push(i),n.push(r),this.addPoints(n,za.Line)}},e.prototype.addPath=function(t,i){if(t instanceof e)this.addPath(t.pathPoints,t.pathTypes);else{if(null==t)throw new Error("ArgumentNullException:pathPoints");if(null==i)throw new Error("ArgumentNullException:pathTypes");if(t.length!==i.length)throw new Error("The argument arrays should be of equal length.")}},e.prototype.addPie=function(t,e,i,r,n,o){t instanceof ts?this.addPie(t.x,t.y,t.width,t.height,e,i):(this.startFigure(),this.addArc(t,e,i,r,n,o),this.addPoint(new Qo(t+i/2,e+r/2),za.Line),this.closeFigure())},e.prototype.addPolygon=function(t){t.length;var e=[];this.startFigure();for(var i=0;i<t.length;i++)e.push(t[i].x),e.push(t[i].y);this.addPoints(e,za.Line),this.closeFigure()},e.prototype.addRectangle=function(t,e,i,r){if(t instanceof ts)this.addRectangle(t.x,t.y,t.width,t.height);else{var n=[];this.startFigure(),n.push(t),n.push(e),n.push(t+i),n.push(e),n.push(t+i),n.push(e+r),n.push(t),n.push(e+r),this.addPoints(n,za.Line),this.closeFigure()}},e.prototype.startFigure=function(){this.mStartFigure=!0},e.prototype.closeAllFigures=function(){for(var t=this.pathPoints[0],e=0;e<this.mpathTypes.length;e++){var i=this.types[e],r=!1;0!==e&&i===za.Start?(this.closeFigure(e-1),r=!0):e===this.mpathTypes.length-1&&!r&&this.isXps&&t.x===this.pathPoints[e].y&&this.closeFigure(e)}},e.prototype.getLastPoint=function(){var t=new Qo(0,0),e=this.pointCount;return e>0&&null!=this.mpoints&&(t.x=this.mpoints[e-1].x,t.y=this.mpoints[e-1].y),t},e.prototype.getBezierArcPoints=function(t,e,i,r,n,o){if(t>i){var s=void 0;s=t,t=i,i=s}if(r>e){s=void 0;s=e,e=r,r=s}var a,l;Math.abs(o)<=90?(a=o,l=1):a=o/(l=Math.ceil(Math.abs(o)/90));for(var h=(t+i)/2,u=(e+r)/2,c=(i-t)/2,p=(r-e)/2,d=a*(Math.PI/360),f=Math.abs(4/3*(1-Math.cos(d))/Math.sin(d)),g=[],m=0;m<l;m++){var y=(n+m*a)*(Math.PI/180),b=(n+(m+1)*a)*(Math.PI/180),v=Math.cos(y),w=Math.cos(b),S=Math.sin(y),P=Math.sin(b);a>0?g.push(h+c*v,u-p*S,h+c*(v-f*S),u-p*(S+f*v),h+c*(w+f*P),u-p*(P-f*w),h+c*w,u-p*P):g.push(h+c*v,u-p*S,h+c*(v+f*S),u-p*(S-f*v),h+c*(w-f*P),u-p*(P+f*w),h+c*w,u-p*P)}return g},e.prototype.getBoundsInternal=function(){var t=this.pathPoints,e=new ts(0,0,0,0);if(t.length>0){for(var i=t[0].x,r=t[0].x,n=t[0].y,o=t[0].y,s=1;s<t.length;s++){var a=t[s];i=Math.min(a.x,i),r=Math.max(a.x,r),n=Math.min(a.y,n),o=Math.max(a.y,o)}e=new ts(i,n,r-i,o-n)}return e},e.prototype.drawInternal=function(t){if(null==t)throw new Error("ArgumentNullException :graphics");t.drawPath(this.obtainPen(),this.brush,this)},e.prototype.addPoints=function(t,e,i,r){if(void 0===i&&void 0===r)this.addPoints(t,e,0,t.length);else for(var n=i;n<r;n++){var o=new Qo(t[n],t[n+1]);n===i?this.pointCount<=0||this.mStartFigure?(this.addPoint(o,za.Start),this.mStartFigure=!1):o.x===this.lastPoint.x||o.y===this.lastPoint.y||this.isBeziers3?o.x!==this.lastPoint.x&&o.y!==this.lastPoint.y&&this.addPoint(o,za.Bezier3):this.addPoint(o,za.Line):this.addPoint(o,e),n++}},e.prototype.addPoint=function(t,e){this.points.push(t),this.types.push(e)},e.prototype.closeFigure=function(t){if(void 0===t)this.pointCount>0&&this.closeFigure(this.pointCount-1),this.startFigure();else{if(t<0)throw new Error("IndexOutOfRangeException()");var e=this.types[t];e|=za.CloseSubpath,this.types[t]=e}}}(Jh),function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),Zh=function(t){function e(e,i,r,n,o,s){var a=t.call(this)||this;return a.bounds=new ts(0,0,0,0),void 0===e||(e instanceof Us?(a=t.call(this,e,i)||this).bounds=r instanceof ts?r:new ts(r,n,o,s):a.bounds=e instanceof ts?e:new ts(e,i,r,n)),a}return Qh(e,t),Object.defineProperty(e.prototype,"x",{get:function(){return this.bounds.x},set:function(t){this.bounds.x=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.bounds.y},set:function(t){this.bounds.y=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.bounds.width},set:function(t){this.bounds.width=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.bounds.height},set:function(t){this.bounds.height=t},enumerable:!0,configurable:!0}),e.prototype.getBoundsInternal=function(){return this.bounds},e}(Jh),tu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),eu=function(t){function e(e,i,r,n,o,s,a,l){var h=t.call(this)||this;return h.startAngle=0,h.sweepAngle=0,void 0===e||(e instanceof ts&&void 0!==i&&void 0!==r?((h=t.call(this,e)||this).startAngle=i,h.sweepAngle=r):e instanceof Us?r instanceof ts?((h=t.call(this,e,i,r)||this).startAngle=n,h.sweepAngle=o):((h=t.call(this,e,i,r,n,o,s)||this).startAngle=a,h.sweepAngle=l):((h=t.call(this,e,i,r,n)||this).startAngle=o,h.sweepAngle=s)),h}return tu(e,t),e}(Zh),iu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),ru=(function(t){function e(e,i,r,n,o,s,a){var l=this;return void 0===e?l=t.call(this)||this:e instanceof ts?l=t.call(this,e,i,r)||this:e instanceof Us?i instanceof ts?l=t.call(this,e,null,i,r,n)||this:void 0===s&&void 0===a?l=t.call(this,e,null,0,0,i,r,n,o)||this:void 0!==s&&void 0!==a&&(l=t.call(this,e,null,i,r,n,o,s,a)||this):void 0!==e&&void 0===o&&void 0===s?l=t.call(this,0,0,e,i,r,n)||this:void 0!==e&&void 0!==o&&void 0!==s&&(l=t.call(this,e,i,r,n,o,s)||this),l}iu(e,t),e.prototype.draw=function(t,e,i,r){if(e instanceof Qo&&void 0===e.width&&void 0===i)return this.drawHelper(t,e.x,e.y);if(e instanceof ts&&void 0!==e.width&&void 0===i)return this.drawHelper(t,e,null);if("number"==typeof e&&"number"==typeof i&&void 0===r)return this.drawHelper(t,e,i,null);if(e instanceof Qo&&i instanceof Dl)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&(r instanceof Dl||null==r)&&"number"==typeof i){var n=t.graphics.clientSize.width-e,o=new ts(e,i,n,0);return this.drawHelper(t,o,r)}return this.drawHelper(t,e,i)},e.prototype.drawInternal=function(t){if(null==t)throw new Error("ArgumentNullException : graphics");t.drawArc(this.obtainPen(),this.bounds,this.startAngle,this.sweepAngle)}}(eu),function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}()),nu=(function(t){function e(e,i,r){var n=t.call(this,i)||this;return n.isEmbedFont=!1,n.isUnicode=!0,void 0!==r?n.createFontInternal(e,r):n.createFontInternal(e,Jo.Regular),n}ru(e,t),e.prototype.equalsToFont=function(t){return!1},e.prototype.getLineWidth=function(t,e){var i=0;if(null!==e&&void 0!==e&&e.textDirection!==$o.None){i=this.getUnicodeLineWidth(t,i,e).width}else i=this.fontInternal.getLineWidth(t);var r=this.metrics.getSize(e);return i*=xs.charSizeMultiplier*r,i=this.applyFormatSettings(t,e,i)},e.prototype.getCharWidth=function(t,e){var i=this.fontInternal.getCharWidth(t);return i*=.001*this.metrics.getSize(e)},e.prototype.createFontInternal=function(t,e){this.fontInternal=new ja(t,this.size),this.calculateStyle(e),this.initializeInternals()},e.prototype.calculateStyle=function(t){var e=this.fontInternal.ttfMetrics.macStyle;0!=(t&Jo.Underline)&&(e|=Jo.Underline),0!=(t&Jo.Strikeout)&&(e|=Jo.Strikeout),this.setStyle(e)},e.prototype.initializeInternals=function(){var t=null;vl.enableCache&&(t=vl.cache.search(this));var e=null;if(null!==t&&void 0!==t){e=t.getInternals();var i=t.metrics;(i=i.clone()).size=this.size,this.metrics=i,this.fontInternal=t.fontInternal}else null==t&&(this.fontInternal instanceof ja&&(this.fontInternal.isEmbed=this.isEmbedFont),this.fontInternal.createInternals(),e=this.fontInternal.getInternals(),this.metrics=this.fontInternal.metrics);this.metrics.isUnicodeFont=!0,this.setInternals(e)},e.prototype.setSymbols=function(t){var e=this.fontInternal;null!=e&&e.setSymbols(t)},Object.defineProperty(e.prototype,"Unicode",{get:function(){return this.isUnicode},enumerable:!0,configurable:!0}),e.prototype.getUnicodeLineWidth=function(t,e,i){e=0;var r=null,n=(new Fa).getGlyphIndex(t,this,i.textDirection===$o.RightToLeft,r,!0),o=n.success;if(r=n.glyphs,o&&null!==r)for(var s=this.fontInternal.ttfReader,a=0,l=r.length;a<l;a++){var h=r[a],u=s.getGlyph(h);null!==u&&void 0!==u&&(e+=u.width)}return{success:o,width:e}}}(xs),function(){function t(t,e,i,r,n){t instanceof ts&&void 0===e?this.InitiateBounds(t.x,t.y,t.width,t.height,null):t instanceof ts&&e instanceof al&&void 0===i?this.InitiateBounds(t.x,t.y,t.width,t.height,e):t instanceof Qo&&e instanceof Zo&&void 0===i?this.InitiateBounds(t.x,t.y,e.width,e.height,null):t instanceof Qo&&e instanceof Zo&&i instanceof al&&void 0===r?this.InitiateBounds(t.x,t.y,e.width,e.height,i):t instanceof Zo&&void 0===e?this.InitiateBounds(0,0,t.width,t.height,null):"number"==typeof t&&"number"==typeof e&&void 0===i?this.InitiateBounds(0,0,t,e,null):"number"==typeof t&&"number"==typeof e&&i instanceof al&&void 0===r?this.InitiateBounds(0,0,t,e,i):this.InitiateBounds(t,e,i,r,null)}Object.defineProperty(t.prototype,"dock",{get:function(){return this.dockStyle},set:function(t){this.dockStyle=t,this.resetAlignment()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"alignment",{get:function(){return this.alignmentStyle},set:function(t){this.setAlignment(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"foreground",{get:function(){return this.isForeground},set:function(t){this.isForeground=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"background",{get:function(){return!this.isForeground},set:function(t){this.isForeground=!t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this.currentLocation},set:function(t){this.type===zs.None&&(this.currentLocation=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return void 0!==this.currentLocation?this.currentLocation.x:0},set:function(t){this.type===zs.None&&(this.currentLocation.x=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return void 0!==this.currentLocation?this.currentLocation.y:0},set:function(t){this.type===zs.None&&(this.currentLocation.y=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return this.template.size},set:function(t){this.type===zs.None&&this.template.reset(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.template.width},set:function(t){if(this.template.width!==t&&this.type===zs.None){var e=this.template.size;e.width=t,this.template.reset(e)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.template.height},set:function(t){if(this.template.height!==t&&this.type===zs.None){var e=this.template.size;e.height=t,this.template.reset(e)}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphics",{get:function(){return this.template.graphics},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"template",{get:function(){return this.pdfTemplate},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this.templateType},set:function(t){this.updateDocking(t),this.templateType=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bounds",{get:function(){return new ts(new Qo(this.x,this.y),this.size)},set:function(t){this.type===zs.None&&(this.location=new Qo(t.x,t.y),this.size=new Zo(t.width,t.height))},enumerable:!0,configurable:!0}),t.prototype.InitiateBounds=function(t,e,i,r,n){this.x=t,this.y=e,this.pdfTemplate=new Wa(i,r)},t.prototype.updateDocking=function(t){if(t!==zs.None){switch(t){case zs.Top:this.dock=Fs.Top;break;case zs.Bottom:this.dock=Fs.Bottom;break;case zs.Left:this.dock=Fs.Left;break;case zs.Right:this.dock=Fs.Right}this.resetAlignment()}},t.prototype.resetAlignment=function(){this.alignment=Vs.None},t.prototype.setAlignment=function(t){if(this.dock===Fs.None)this.alignmentStyle=t;else{var e=!1;switch(this.dock){case Fs.Left:e=t===Vs.TopLeft||t===Vs.MiddleLeft||t===Vs.BottomLeft||t===Vs.None;break;case Fs.Top:e=t===Vs.TopLeft||t===Vs.TopCenter||t===Vs.TopRight||t===Vs.None;break;case Fs.Right:e=t===Vs.TopRight||t===Vs.MiddleRight||t===Vs.BottomRight||t===Vs.None;break;case Fs.Bottom:e=t===Vs.BottomLeft||t===Vs.BottomCenter||t===Vs.BottomRight||t===Vs.None;break;case Fs.Fill:e=t===Vs.MiddleCenter||t===Vs.None}e&&(this.alignmentStyle=t)}},t.prototype.draw=function(t,e){var i=t.page,r=this.calculateBounds(i,e);-0===r.x&&(r.x=0),t.graphics.drawPdfTemplate(this.template,new Qo(r.x,r.y),new Zo(r.width,r.height))},t.prototype.calculateBounds=function(t,e){var i=this.bounds;return this.alignmentStyle!==Vs.None?i=this.getAlignmentBounds(t,e):this.dockStyle!==Fs.None&&(i=this.getDockBounds(t,e)),i},t.prototype.getAlignmentBounds=function(t,e){this.bounds;return this.type===zs.None?this.getSimpleAlignmentBounds(t,e):this.getTemplateAlignmentBounds(t,e)},t.prototype.getSimpleAlignmentBounds=function(t,e){var i=this.bounds,r=t.section.getActualBounds(e,t,!1),n=this.x,o=this.y;switch(this.alignmentStyle){case Vs.TopLeft:n=0,o=0;break;case Vs.TopCenter:n=(r.width-this.width)/2,o=0;break;case Vs.TopRight:n=r.width-this.width,o=0;break;case Vs.MiddleLeft:n=0,o=(r.height-this.height)/2;break;case Vs.MiddleCenter:n=(r.width-this.width)/2,o=(r.height-this.height)/2;break;case Vs.MiddleRight:n=r.width-this.width,o=(r.height-this.height)/2;break;case Vs.BottomLeft:n=0,o=r.height-this.height;break;case Vs.BottomCenter:n=(r.width-this.width)/2,o=r.height-this.height;break;case Vs.BottomRight:n=r.width-this.width,o=r.height-this.height}return i.x=n,i.y=o,i},t.prototype.getTemplateAlignmentBounds=function(t,e){var i=this.bounds,r=t.section,n=r.getActualBounds(e,t,!1),o=this.x,s=this.y;switch(this.alignmentStyle){case Vs.TopLeft:this.type===zs.Left?(o=-n.x,s=0):this.type===zs.Top&&(o=-n.x,s=-n.y);break;case Vs.TopCenter:o=(n.width-this.width)/2,s=-n.y;break;case Vs.TopRight:this.type===zs.Right?(o=n.width+r.getRightIndentWidth(e,t,!1)-this.width,s=0):this.type===zs.Top&&(o=n.width+r.getRightIndentWidth(e,t,!1)-this.width,s=-n.y);break;case Vs.MiddleLeft:o=-n.x,s=(n.height-this.height)/2;break;case Vs.MiddleCenter:o=(n.width-this.width)/2,s=(n.height-this.height)/2;break;case Vs.MiddleRight:o=n.width+r.getRightIndentWidth(e,t,!1)-this.width,s=(n.height-this.height)/2;break;case Vs.BottomLeft:this.type===zs.Left?(o=-n.x,s=n.height-this.height):this.type===zs.Bottom&&(o=-n.x,s=n.height+r.getBottomIndentHeight(e,t,!1)-this.height);break;case Vs.BottomCenter:o=(n.width-this.width)/2,s=n.height+r.getBottomIndentHeight(e,t,!1)-this.height;break;case Vs.BottomRight:this.type===zs.Right?(o=n.width+r.getRightIndentWidth(e,t,!1)-this.width,s=n.height-this.height):this.type===zs.Bottom&&(o=n.width+r.getRightIndentWidth(e,t,!1)-this.width,s=n.height+r.getBottomIndentHeight(e,t,!1)-this.height)}return i.x=o,i.y=s,i},t.prototype.getDockBounds=function(t,e){this.bounds;return this.type===zs.None?this.getSimpleDockBounds(t,e):this.getTemplateDockBounds(t,e)},t.prototype.getSimpleDockBounds=function(t,e){this.bounds;var i=t.section.getActualBounds(e,t,!1),r=this.x,n=this.y,o=this.width,s=this.height;switch(this.dockStyle){case Fs.Left:r=0,n=0,o=this.width,s=i.height;break;case Fs.Top:r=0,n=0,o=i.width,s=this.height;break;case Fs.Right:r=i.width-this.width,n=0,o=this.width,s=i.height;break;case Fs.Bottom:r=0,n=i.height-this.height,o=i.width,s=this.height;break;case Fs.Fill:r=0,r=0,o=i.width,s=i.height}return new ts(r,n,o,s)},t.prototype.getTemplateDockBounds=function(t,e){this.bounds;var i=t.section,r=i.getActualBounds(e,t,!1),n=i.pageSettings.getActualSize(),o=this.x,s=this.y,a=this.width,l=this.height;switch(this.dockStyle){case Fs.Left:o=-r.x,s=0,a=this.width,l=r.height;break;case Fs.Top:o=-r.x,s=-r.y,a=n.width,l=this.height,r.height<0&&(s=-r.y+n.height);break;case Fs.Right:o=r.width+i.getRightIndentWidth(e,t,!1)-this.width,s=0,a=this.width,l=r.height;break;case Fs.Bottom:o=-r.x,s=r.height+i.getBottomIndentHeight(e,t,!1)-this.height,a=n.width,l=this.height,r.height<0&&(s-=n.height);break;case Fs.Fill:o=0,o=0,a=r.width,l=r.height}return new ts(o,s,a,l)}}(),function(){function t(t){this.control=t}return t.prototype.export=function(t,e,i,r){var n=this;return new Promise(function(t,o){var s=w("canvas",{id:"ej2-canvas",attrs:{width:n.control.availableSize.width.toString(),height:n.control.availableSize.height.toString()}});wi.userAgent.toString().indexOf("HeadlessChrome");i=c(i)?Ds.Landscape:i;var a=n.control.svgObject.cloneNode(!0),l=a.childNodes[0];if(!c(l)){var h=l.getAttribute("fill");"Tailwind"!==n.control.theme&&"TailwindDark"!==n.control.theme&&"Bootstrap5"!==n.control.theme&&"Bootstrap5Dark"!==n.control.theme&&"Fluent"!==n.control.theme&&"FluentDark"!==n.control.theme||"rgba(255,255,255, 0.0)"!==h&&"transparent"!==h||a.childNodes[0].setAttribute("fill","rgba(255,255,255, 1)")}var u=window.URL.createObjectURL(new Blob([(new XMLSerializer).serializeToString(a)],{type:"image/svg+xml"})),p=new Image,d=s.getContext("2d");p.onload=function(){d.drawImage(p,0,0),window.URL.revokeObjectURL(u);var o=new vl,a=s.toDataURL("image/jpeg").replace("image/jpeg","image/octet-stream");o.pageSettings.orientation=i,a=a.slice(a.indexOf(",")+1),o.pages.add().graphics.drawImage(new ha(a),0,0,n.control.availableSize.width-60,n.control.availableSize.height),r?(o.save(e+".pdf"),o.destroy()):t(null)},p.src=u})},t.prototype.getModuleName=function(){return"PdfExport"},t.prototype.destroy=function(t){},t}()),ou=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),su=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},au=function(t){function e(e,i){var r=t.call(this,e,i)||this;return r.isResize=!1,r.orientation="Horizontal",r.drilledItems=[],r.isHierarchicalData=!1,r.levelSelection=[],r.legendId=[],r}return ou(e,t),e.prototype.preRender=function(){var t=this;this.trigger("load",{treemap:this},function(){t.initPrivateVariable(),t.unWireEVents(),t.createSvg(),t.wireEVents(),t.setCulture()})},e.prototype.render=function(){this.renderElements()},e.prototype.renderElements=function(){lu.levelsData=null,lu.defaultLevelsData=null,lu.hierarchyData=null,this.createSecondaryElement(),this.addTabIndex(),this.themeStyle=ve(this.theme),this.renderBorder(),this.renderTitle(this.titleSettings,"title",null,null),c(lu.levelsData)||(lu.defaultLevelsData=lu.levelsData),this.processDataManager()},e.prototype.processDataManager=function(){var t,e,i,r,n=this;if(this.dataSource instanceof Kn){t=this.dataSource,e=this.query instanceof In?this.query:new In;t.executeQuery(e).then(function(t){n.dataSource=t.result,n.renderTreeMapElements()})}else this.dataSource instanceof En?(r=this.dataSource,(i=new hi(r.dataOptions,r.type,r.async,r.contentType)).onSuccess=function(t){n.dataSource=JSON.parse("["+t+"]")[0],n.renderTreeMapElements()},i.send(r.sendData)):this.renderTreeMapElements()},e.prototype.renderTreeMapElements=function(){this.processingData(),this.treeMapLegendModule&&this.legendSettings.visible&&this.treeMapLegendModule.renderLegend(),this.layout.processLayoutPanel(),this.element.appendChild(this.svgObject),this.elementChange(),this.trigger("loaded",{treemap:this,isResized:this.isResize}),this.isResize=!1,this.renderComplete()},e.prototype.createSvg=function(){if(this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&L(this.svgObject)}this.clearTemplate();var t=this.element.clientWidth,e=this.element.clientHeight;this.availableSize=new On(vt(this.width,t)||t||600,vt(this.height,e)||e||450),this.svgObject=this.renderer.createSvg({id:this.element.id+"_svg",width:this.availableSize.width,height:this.availableSize.height})},e.prototype.initPrivateVariable=function(){if(""===this.element.id){var t=document.getElementsByClassName("e-treemap").length;this.element.id="treemap_control_"+t}this.renderer=new Rr(this.element.id),this.layout=new jn(this)},e.prototype.createSecondaryElement=function(){var t=document.getElementById(this.element.id+"_Secondary_Element");if(t&&t.childElementCount>0&&t.parentNode.removeChild(t),c(document.getElementById(this.element.id+"_Secondary_Element"))){var e=w("div",{id:this.element.id+"_Secondary_Element",styles:"position: absolute;z-index:1;"});this.element.appendChild(e)}},e.prototype.elementChange=function(){this.treeMapLegendModule&&this.legendSettings.visible&&this.treeMapLegendModule.legendGroup&&this.layout.layoutGroup&&!c(this.svgObject)&&!c(document.getElementById(this.layout.layoutGroup.id))&&!c(document.getElementById(this.treeMapLegendModule.legendGroup.id))&&this.svgObject.insertBefore(this.layout.layoutGroup,this.treeMapLegendModule.legendGroup)},e.prototype.renderBorder=function(){var t=this.border.width,e=this.svgObject.querySelector("#"+this.element.id+"_TreeMap_Border");if((this.border.width>0||this.background||this.themeStyle.backgroundColor)&&c(e)){var i=new Ln(this.element.id+"_TreeMap_Border",this.background||this.themeStyle.backgroundColor,this.border,1,new Bn(t/2,t/2,this.availableSize.width-t,this.availableSize.height-t));this.svgObject.appendChild(this.renderer.drawRectangle(i))}else e&&e.setAttribute("fill",this.background||this.themeStyle.backgroundColor)},e.prototype.renderTitle=function(t,e,i,r){var n,o={color:t.textStyle.color,size:t.textStyle.size,fontFamily:t.textStyle.fontFamily,fontStyle:t.textStyle.fontStyle,fontWeight:t.textStyle.fontWeight,opacity:t.textStyle.opacity},s=this.availableSize.width-this.margin.right-this.margin.left;if(o.fontFamily=o.fontFamily||this.themeStyle.fontFamily,o.size=o.size||("title"===e?this.themeStyle.fontSize:this.themeStyle.subtitleFontSize),t.text){c(r)&&(r=this.renderer.createGroup({id:this.element.id+"_Title_Group"}));var a=St(s,t.text,o),l=wt(a,o),h=Pt(c(i)?new Bn(this.margin.left,this.margin.top,this.availableSize.width,this.availableSize.height):i,t.alignment,l,e),u=new Mn(this.element.id+"_TreeMap_"+e,h.x,h.y,"start",a),p=new Bn(h.x,h.y,l.width,l.height),d=xt(u,o,o.color||("title"===e?this.themeStyle.titleFontColor:this.themeStyle.subTitleFontColor),r);d.setAttribute("aria-label",t.description||t.text),d.setAttribute("tabindex",(this.tabIndex+("title"===e?1:2)).toString()),("title"===e&&!t.subtitleSettings.text||"subtitle"===e)&&(n=this.availableSize.height-p.y-10-this.margin.bottom,this.areaRect=new Bn(this.margin.left,p.y+10,s,n)),"subtitle"!==e&&t.subtitleSettings.text?this.renderTitle(t.subtitleSettings,"subtitle",p,r):this.svgObject.appendChild(r)}else n=this.availableSize.height-this.margin.top-this.margin.bottom,this.areaRect=new Bn(this.margin.left,this.margin.top,s,n)},e.prototype.processingData=function(){var t,e=this;if(this.dataSource=this.dataSource,!c(this.dataSource)&&this.dataSource.length>0&&this.weightValuePath){if(lu.levelsData=[],this.dataSource.map(function(t){t[e.weightValuePath]=t[e.weightValuePath]?t[e.weightValuePath].toString():t[e.weightValuePath]}),this.leafItemSettings.labelPath=this.leafItemSettings.labelPath||this.weightValuePath,this.checkIsHierarchicalData(),0===this.levels.length){var i={};i.level=0,t=this.leafItemSettings.labelPath,i[t]=[];for(var r=0;r<this.dataSource.length;r++){var n=Mt(this.dataSource[r]).values;this.isHierarchicalData&&n&&n.length>0?n.forEach(function(r,n){r[t]&&i[t].push({groupIndex:0,name:r[t],levelOrderName:r[t].toString(),data:r,weight:r[e.weightValuePath]})}):this.dataSource[r][t]&&i[t].push({groupIndex:0,name:this.dataSource[r][t],levelOrderName:this.dataSource[r][t].toString(),data:this.dataSource[r],weight:this.dataSource[r][this.weightValuePath]})}lu.levelsData.push(i)}else{if(this.isHierarchicalData){lu.hierarchyData=[],lu.hierarchyData=u([],this.dataSource,lu.hierarchyData,!0);for(r=0;r<lu.hierarchyData.length;r++)this.processHierarchicalData(lu.hierarchyData[r],r);lu.levelsData=lu.hierarchyData}else this.processFlatJsonData(),lu.levelsData.length>1&&this.reOrderLevelData(lu.levelsData.length-1);t=this.levels[0].groupPath}this.isHierarchicalData||this.findTotalWeight(lu.levelsData[0][t],"Parent")}},e.prototype.checkIsHierarchicalData=function(){var t;this.dataSource=this.dataSource;for(var e=0;e<this.dataSource.length;e++){if((t=Mt(this.dataSource[e]).values)&&t.length){this.isHierarchicalData=!0;break}e===this.dataSource.length-1&&(this.isHierarchicalData=!1)}},e.prototype.processHierarchicalData=function(t,e){var i,r,n,o=this,s={},a=this.leafItemSettings.labelPath?this.leafItemSettings.labelPath:this.weightValuePath;if(s=Mt(t),(i=s?s.values:null)&&i.length>0){n=s.key;for(var l=0;l<this.levels.length;l++)n===this.levels[l].groupPath&&(this.levels[l],r=l);for(var h=0;h<i.length;h++){i[h].name=i[h][a],i[h].levelOrderName=(0===r?i[h].name:t.levelOrderName+"#"+i[h].name)+"";var u=i[h].levelOrderName,p=void 0;u.search("#")>0&&(p=u.split("#").length-1),i[h].groupIndex=c(r)?p===this.levels.length?this.levels.length:p:r,0!==r&&(i[h].parent=t),i[h].groupName=n,i[h].data=i[h],i[h].isDrilled=!1,i[h].weight=i[h][this.weightValuePath]}i.forEach(function(t){o.processHierarchicalData(t,e)})}if(e===lu.hierarchyData.length-1){for(var d=lu.hierarchyData[0][this.levels[0].groupPath],f=0;f<lu.hierarchyData.length;f++)i=Mt(lu.hierarchyData[f]).values,0!==f&&i&&(i.forEach(function(t){d.push(t)}),lu.hierarchyData.splice(f,1),f-=1);d=lu.hierarchyData[0][this.levels[0].groupPath];for(var g=0;g<d.length;g++)s[this.levels[0].groupPath]=d,d[g].parent=s}},e.prototype.print=function(t){this.allowPrint&&this.printModule&&this.printModule.print(t)},e.prototype.export=function(t,e,i,r){var n=this;return c(r)&&(r=!0),"PDF"===t&&this.allowPdfExport&&this.pdfExportModule?new Promise(function(o,s){o(n.pdfExportModule.export(t,e,i,r))}):this.allowImageExport&&"PDF"!==t&&this.imageExportModule?new Promise(function(i,o){i(n.imageExportModule.export(t,e,r))}):null},e.prototype.processFlatJsonData=function(){this.dataSource=this.dataSource;for(var t,e=[],i=0;i<this.levels.length+1;i++){t=this.levels[i]?this.levels[i].groupPath:this.leafItemSettings.labelPath;var r={};r.level=i,r[t]=[],lu.levelsData.push(r);for(var n=0;n<this.dataSource.length;n++){var o={},s="";if(!c(t)){var a=this.dataSource[n][t];if(0!==i)for(var l=0;l<=i;l++){var h=this.levels[l]?this.levels[l].groupPath:t;s+=this.dataSource[n][h]+(l===i?"":"#")}e.length>0&&-1!==e.indexOf(s||a)||(o.name=a,o.levelOrderName=(s||a)+"",o.groupIndex=i,o.isDrilled=!1,o.groupName=t,o.data=this.dataSource[n],lu.levelsData[lu.levelsData.length-1][t].push(o),e.push(s||a))}}}},e.prototype.reOrderLevelData=function(t){for(var e,i=this.levels[t]?this.levels[t].groupPath:this.leafItemSettings.labelPath,r=this.levels[t-1].groupPath,n=lu.levelsData[t][i],o=lu.levelsData[t-1][r],s=0;s<n.length;s++){e=n[s].levelOrderName;for(var a=0;a<o.length;a++)if(o[a][i]=c(o[a][i])?[]:o[a][i],this.IsChildHierarchy(e.split("#"),o[a].levelOrderName.split("#"))){c(n[s].parent)&&(n[s].parent=o[a]),o[a][i].push(n[s]);break}}this.findTotalWeight(lu.levelsData[lu.levelsData.length-1][i],"Child"),lu.levelsData.splice(t,1),t-1>0&&this.reOrderLevelData(t-1)},e.prototype.IsChildHierarchy=function(t,e){for(var i=!1,r=0;r<e.length;r++){if(t.length<r||e[r]!==t[r])return!1;i=!0}return i},e.prototype.findTotalWeight=function(t,e){for(var i,r,n,o=this,s={},a=function(a){i=0,n=t[a].groupName,r=t[a].levelOrderName.split("#"),l.dataSource.forEach(function(e){Tt(r,t[a].levelOrderName,e,o)&&(i+=parseFloat(e[o.weightValuePath]))}),"Parent"===e&&(s[n]=t,t[a].parent=s),t[a].weight=i},l=this,h=0;h<t.length;h++)a(h)},e.prototype.unWireEVents=function(){Si.remove(this.element,"click",this.clickOnTreeMap),Si.remove(this.element,"dblclick",this.doubleClickOnTreeMap),Si.remove(this.element,"contextmenu",this.rightClickOnTreeMap),Si.remove(this.element,wi.touchStartEvent,this.mouseDownOnTreeMap),Si.remove(this.element,wi.touchMoveEvent,this.mouseMoveOnTreeMap),Si.remove(this.element,wi.touchEndEvent,this.mouseEndOnTreeMap),Si.remove(this.element,"pointerleave mouseleave",this.mouseLeaveOnTreeMap),window.removeEventListener("resize",this.resizeOnTreeMap)},e.prototype.wireEVents=function(){Si.add(this.element,"click",this.clickOnTreeMap,this),Si.add(this.element,"dblclick",this.doubleClickOnTreeMap,this),Si.add(this.element,"contextmenu",this.rightClickOnTreeMap,this),Si.add(this.element,wi.touchStartEvent,this.mouseDownOnTreeMap,this),Si.add(this.element,wi.touchMoveEvent,this.mouseMoveOnTreeMap,this),Si.add(this.element,wi.touchEndEvent,this.mouseEndOnTreeMap,this),Si.add(this.element,"pointerleave mouseleave",this.mouseLeaveOnTreeMap,this),window.addEventListener("resize",this.resizeOnTreeMap.bind(this))},e.prototype.setCulture=function(){this.intl=new oi},e.prototype.addTabIndex=function(){this.element.setAttribute("aria-label",this.description||"TreeMap Element"),this.element.setAttribute("tabindex",this.tabIndex.toString())},e.prototype.resizeOnTreeMap=function(t){var e=this;this.isResize=!0;var i={name:"resize",cancel:!1,previousSize:this.availableSize,currentSize:new On(0,0),treemap:this};this.resizeTo&&clearTimeout(this.resizeTo),!c(this.element)&&this.element.classList.contains("e-treemap")&&(this.resizeTo=setTimeout(function(){e.unWireEVents(),e.createSvg(),e.refreshing=!0,e.wireEVents(),i.currentSize=e.availableSize,e.trigger("resize",i,function(t){e.render()})},500))},e.prototype.clickOnTreeMap=function(t){var e,i,r=this,n=t.target,o=n.id,s=n.innerHTML,a={cancel:!1,name:"click",treemap:this,mouseEvent:t};this.trigger("click",a),o.indexOf("_Item_Index")>-1&&(t.preventDefault(),i=parseFloat(o.split("_Item_Index_")[1]),e={cancel:!1,name:"itemClick",treemap:this,item:this.layout.renderItems[i],mouseEvent:t,groupIndex:this.layout.renderItems[i].groupIndex,groupName:this.layout.renderItems[i].name,text:s,contentItemTemplate:s},this.trigger("itemClick",e,function(t){t.text===s&&t.contentItemTemplate===s||(c(r.leafItemSettings.labelTemplate)?(t.text=ie(t.text,t.item.data,t.treemap),n.innerHTML=t.text):Ot(o,n,t.contentItemTemplate))}));var l,h=(new Date).getMilliseconds();c(this.doubleClick)||(!c(l)&&h-l<500&&this.doubleClickOnTreeMap(t),l=h)},e.prototype.doubleClickOnTreeMap=function(t){var e={cancel:!1,name:nn,treemap:this,mouseEvent:t};this.trigger(nn,e)},e.prototype.rightClickOnTreeMap=function(t){var e={cancel:!1,name:on,treemap:this,mouseEvent:t};this.trigger(on,e)},e.prototype.mouseDownOnTreeMap=function(t){t.target.id.indexOf("_Item_Index")>-1&&(this.mouseDown=!0),this.notify(wi.touchStartEvent,t)},e.prototype.mouseMoveOnTreeMap=function(t){var e,i,r=t.target.id,n={cancel:!1,name:"mouseMove",treemap:this,mouseEvent:t};this.trigger("mouseMove",n);var o;r.indexOf("_Item_Index")>-1&&(o=Mt(i=this.layout.renderItems[parseFloat(r.split("_Item_Index_")[1])]).values,this.element.style.cursor=!i.isLeafItem&&o&&o.length>0&&this.enableDrillDown?"pointer":"auto",e={cancel:!1,name:"itemMove",treemap:this,item:i,mouseEvent:t},this.trigger("itemMove",e)),this.notify(wi.touchMoveEvent,t)},e.prototype.calculateSelectedTextLevels=function(t,e){for(var i,r,n,o=e.levelOrderName.split("#"),s=0,a=Object.keys(o);s<a.length;s++)o[r=a[s]]===t&&(i=parseInt(r,10),n=t);return{drillLevel:i,currentLevelLabel:n,levelText:o}},e.prototype.calculatePreviousLevelChildItems=function(t,e,i,r){for(var n,o,s,a=0,l=this.layout.renderItems[0].levelOrderName.split("#").length,h=0;h<l;h++)s=0===h?e.levelText[h]:s+"#"+e.levelText[h];a=l>1?l:a;for(var u=0,p=Object.values(this.layout.renderItems);u<p.length;u++){(o=p[u]).levelOrderName.split("#")[0]===e.levelText[0]&&(n=0===a?c(s)?s:e.levelText[a]:r?s:s+"#"+e.levelText[a])===o.levelOrderName&&(this.drilledItems.push({name:o.levelOrderName,data:o}),r=!0,++a<=i.groupIndex&&(s=n=n+"#"+e.levelText[a]))}return r},e.prototype.compareSelectedLabelWithDrillDownItems=function(t,e,i){var r,n={};return t.drillLevel+1===this.drilledItems[i].data.groupIndex?((r=this.drilledItems[i].data.parent).isDrilled=!0,n[r[this.drilledItems[i].data.groupName]]=[r],this.drilledItems.splice(i,this.drilledItems.length)):t.drillLevel!==this.drilledItems.length-1&&t.drillLevel!==e.groupIndex||(n[e.groupName]=[e]),n},e.prototype.mouseEndOnTreeMap=function(t){var e,i,r,n,o,s,a,l=this,h=t.target,p=h.id,d=!1,f={},g=this.element.id+"_TreeMap_"+this.layoutType+"_Layout",m=this.element.id+"_Label_Template_Group";if(p.indexOf("_Item_Index")>-1&&this.enableDrillDown&&!this.drillMouseMove){t.cancelable&&t.preventDefault(),n=parseFloat(p.split("_Item_Index_")[1]),o=this.layout.renderItems[n];var y=h.innerHTML;if(this.enableBreadcrumb&&(a=this.calculateSelectedTextLevels(y,o),s=a.drillLevel,this.drillDownView||-1===y.search("[+]")||(d=this.calculatePreviousLevelChildItems(y,a,o,d))),0!==this.levels.length&&!o.isLeafItem&&Mt(o).values&&Mt(o).values.length>0){if(this.drilledItems.length>0){o=d?this.drilledItems[this.drilledItems.length-1].data:o;for(var b=0;b<this.drilledItems.length;b++){if(!c(s)){var v=this.drilledItems.length;if(f=this.compareSelectedLabelWithDrillDownItems(a,o,b),v!==this.drilledItems.length){b-=1;break}}if(o.levelOrderName===this.drilledItems[b].name&&!d&&c(s)){0===o.groupIndex&&o.parent[o.groupName]instanceof Array?(o.isDrilled=!o.isDrilled,o.isDrilled?f[o.groupName]=[o]:f=o.parent):(o.isDrilled=!1,o.parent.isDrilled=!0,o=o.parent,f[o.groupName]=[o]),this.drilledItems.splice(b,1),b-=1;break}b===this.drilledItems.length-1&&c(s)&&(o.isDrilled=!0,f[o.groupName]=[o])}}else o.isDrilled=!0,f[o.groupName]=[o];i={cancel:!1,name:Zr,treemap:this,element:h,groupIndex:this.enableBreadcrumb&&0!==this.drilledItems.length&&!c(s)?this.drilledItems[this.drilledItems.length-1].data.groupIndex:o.groupIndex,groupName:this.enableBreadcrumb&&0!==this.drilledItems.length&&!c(s)?this.drilledItems[this.drilledItems.length-1].data.name:o.name,rightClick:3===t.which,childItems:null,item:f},this.trigger(Zr,i,function(t){if(l.currentLevel=o.isDrilled&&c(s)?o.groupIndex:!c(s)&&l.enableBreadcrumb&&o.isDrilled?s:null,!t.cancel){if(document.getElementById(g)){var i=document.getElementById(g);i.parentNode.removeChild(i)}if(e=u({},l.areaRect,e,!0),l.legendSettings.visible&&!c(l.treeMapLegendModule)&&(c(f)||(l.treeMapLegendModule.legendGroup.textContent="",l.treeMapLegendModule.legendGroup=null,l.treeMapLegendModule.widthIncrement=0,l.treeMapLegendModule.heightIncrement=0,l.enableBreadcrumb&&!c(s)?l.drilledLegendItems={name:l.drilledItems[l.drilledItems.length-1].data.levelOrderName,data:l.drilledItems[l.drilledItems.length-1].data}:l.drilledLegendItems={name:o.levelOrderName,data:o},l.treeMapLegendModule.renderLegend()),e=c(l.totalRect)?e:l.totalRect),document.getElementById(m)){var r=document.getElementById(m);r.parentNode.removeChild(r)}c(t.childItems)||t.cancel?(l.layout.calculateLayoutItems(f,e),l.layout.renderLayoutItems(f)):l.layout.onDemandProcess(t.childItems)}}),r={cancel:!1,name:"drillEnd",treemap:this,renderItems:this.layout.renderItems},this.trigger("drillEnd",r),!d&&c(s)&&this.drilledItems.push({name:o.levelOrderName,data:o})}}this.mouseDown=!1,this.notify(wi.touchEndEvent,t)},e.prototype.mouseLeaveOnTreeMap=function(t){this.treeMapTooltipModule&&this.treeMapTooltipModule.removeTooltip(),this.treeMapLegendModule&&this.treeMapLegendModule.removeInteractivePointer(),te(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",this),this.treeMapHighlightModule&&(ce(this.treeMapHighlightModule.shapeHighlightCollection),this.treeMapHighlightModule.highLightId="")},e.prototype.selectItem=function(t,e){c(e)&&(e=!0);for(var i="",r=0;r<t.length;r++)r!==t.length-1?i+=t[r]+"#":i+=t[r];this.treeMapSelectionModule&&this.selectionSettings.enable&&this.treeMapSelectionModule.selectTreemapItem(i,e)},e.prototype.requiredModules=function(){var t=[];return this.tooltipSettings.visible&&t.push({member:"treeMapTooltip",args:[this]}),this.highlightSettings.enable&&t.push({member:"treeMapHighlight",args:[this]}),this.selectionSettings.enable&&t.push({member:"treeMapSelection",args:[this]}),this.legendSettings.visible&&t.push({member:"treeMapLegend",args:[this]}),this.allowPrint&&t.push({member:"Print",args:[this,Jn]}),this.allowImageExport&&t.push({member:"ImageExport",args:[this,Xn]}),this.allowPdfExport&&t.push({member:"PdfExport",args:[this,nu]}),t},e.prototype.onPropertyChanged=function(t,e){for(var i=!1,r=0,n=Object.keys(t);r<n.length;r++){switch(n[r]){case"background":this.renderBorder();break;case"height":case"width":case"layoutType":case"levels":case"drillDownView":case"renderDirection":case"leafItemSettings":case"legendSettings":case"dataSource":i=!0}}i&&(this.createSvg(),this.renderElements())},e.prototype.getModuleName=function(){return"treemap"},e.prototype.destroy=function(){this.unWireEVents(),this.drilledItems=[],this.levelSelection=[],this.legendId=[],this.removeSvg(),t.prototype.destroy.call(this)},e.prototype.removeSvg=function(){if(be(this.element.id+"_Secondary_Element"),this.svgObject){for(;this.svgObject.childNodes.length>0;)this.svgObject.removeChild(this.svgObject.firstChild);!this.svgObject.hasChildNodes()&&this.svgObject.parentNode&&L(this.svgObject)}},e.prototype.getPersistData=function(){return""},su([G(!1)],e.prototype,"allowPrint",void 0),su([G(!1)],e.prototype,"allowImageExport",void 0),su([G(!1)],e.prototype,"allowPdfExport",void 0),su([G(null)],e.prototype,"width",void 0),su([G(null)],e.prototype,"height",void 0),su([_({},cn)],e.prototype,"border",void 0),su([_({},pn)],e.prototype,"margin",void 0),su([G(null)],e.prototype,"background",void 0),su([G("Material")],e.prototype,"theme",void 0),su([_({},mn)],e.prototype,"titleSettings",void 0),su([G("Squarified")],e.prototype,"layoutType",void 0),su([G(null)],e.prototype,"dataSource",void 0),su([G(null)],e.prototype,"query",void 0),su([G(null)],e.prototype,"weightValuePath",void 0),su([G("")],e.prototype,"rangeColorValuePath",void 0),su([G("")],e.prototype,"equalColorValuePath",void 0),su([G(null)],e.prototype,"colorValuePath",void 0),su([G([])],e.prototype,"palette",void 0),su([G("TopLeftBottomRight")],e.prototype,"renderDirection",void 0),su([G(!1)],e.prototype,"enableDrillDown",void 0),su([G(!1)],e.prototype,"enableBreadcrumb",void 0),su([G(" - ")],e.prototype,"breadcrumbConnector",void 0),su([G(!1)],e.prototype,"drillDownView",void 0),su([_({},vn)],e.prototype,"initialDrillDown",void 0),su([_({},wn)],e.prototype,"leafItemSettings",void 0),su([H([],xn)],e.prototype,"levels",void 0),su([_({},Cn)],e.prototype,"highlightSettings",void 0),su([_({},Pn)],e.prototype,"selectionSettings",void 0),su([_({},Sn)],e.prototype,"tooltipSettings",void 0),su([_({},bn)],e.prototype,"legendSettings",void 0),su([G(!1)],e.prototype,"useGroupingSeparator",void 0),su([G(null)],e.prototype,"description",void 0),su([G(1)],e.prototype,"tabIndex",void 0),su([G(null)],e.prototype,"format",void 0),su([W()],e.prototype,"load",void 0),su([W()],e.prototype,"beforePrint",void 0),su([W()],e.prototype,"loaded",void 0),su([W()],e.prototype,"itemRendering",void 0),su([W()],e.prototype,"drillStart",void 0),su([W()],e.prototype,"drillEnd",void 0),su([W()],e.prototype,"itemSelected",void 0),su([W()],e.prototype,"itemHighlight",void 0),su([W()],e.prototype,"tooltipRendering",void 0),su([W()],e.prototype,"itemClick",void 0),su([W()],e.prototype,"itemMove",void 0),su([W()],e.prototype,"click",void 0),su([W()],e.prototype,"doubleClick",void 0),su([W()],e.prototype,"rightClick",void 0),su([W()],e.prototype,"mouseMove",void 0),su([W()],e.prototype,"resize",void 0),su([W()],e.prototype,"legendItemRendering",void 0),su([W()],e.prototype,"legendRendering",void 0),e=su([U],e)}(Gi),lu=function(){return function(){}}(),hu=function(){function t(t){this.page=0,this.legendBorderRect=new Bn(0,0,0,0),this.currentPage=0,this.heightIncrement=0,this.widthIncrement=0,this.textMaxWidth=0,this.legendInteractiveGradient=[],this.legendItemRect=new Bn(0,0,0,0),this.treemap=t,this.addEventListener()}return t.prototype.renderLegend=function(){var t=this;this.legendRenderingCollections=[],this.legendCollections=[],this.legendNames=[],this.totalPages=[],this.gradientCount=1,this.widthIncrement=0,this.heightIncrement=0,this.defsElement=this.treemap.renderer.createDefs(),this.treemap.svgObject.appendChild(this.defsElement);var e;e={cancel:!1,name:an,treemap:this.treemap,_changePosition:this.treemap.legendSettings.position,position:this.treemap.legendSettings.position},this.treemap.trigger(an,e,function(e){e.cancel||e._changePosition===t.treemap.legendSettings.position||(t.treemap.legendSettings.position=e._changePosition),t.calculateLegendBounds(),t.legendCollections.length>0&&t.drawLegend()})},t.prototype.calculateLegendBounds=function(){var t=this,e=this.treemap,i=e.legendSettings;if(this.findColorMappingLegendItems(lu.levelsData[0]),(this.treemap.palette.length>0||!c(this.treemap.colorValuePath))&&0===this.legendCollections.length&&this.findPaletteLegendItems(lu.levelsData[0],"Parent"),this.legendCollections.length>0){var r=i.position,n=i.title.text,o=i.titleStyle,s=i.mode,a=0,l=0,h=0,u=0,p=i.shapeHeight,d=i.shapeWidth,f=[],g=[],m="None"===i.orientation?"Top"===r||"Bottom"===r||"Auto"===r&&e.availableSize.width<=e.availableSize.height?"Horizontal":"Vertical":i.orientation,y=i.width.length>1?i.width.indexOf("%")>-1?e.availableSize.width/100*parseFloat(i.width):parseFloat(i.width):null,b=i.height.length>1?i.height.indexOf("%")>-1?e.availableSize.height/100*parseFloat(i.height):parseFloat(i.height):null;o.fontFamily=e.themeStyle.fontFamily||o.fontFamily,o.size=e.themeStyle.legendFontSize||o.size;var v=wt(n,o),w=0,S=0,P=i.shapePadding,C=i.textStyle;this.legendCollections.length;if(C.size=C.size||e.themeStyle.legendFontSize,C.fontFamily=C.fontFamily||e.themeStyle.fontFamily,"Default"===s){y=c(y)?e.areaRect.width:y,b=c(b)?e.areaRect.height:b;for(var x=0,O=0;O<this.legendCollections.length;O++){var B=this.legendCollections[O];c(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]});var L=wt(B.legendName,C);if(this.textMaxWidth=Math.max(this.textMaxWidth,L.width),0===O)w=a=10+d/2,S=l=10+v.height+(p>L.height?p/2:L.height/4);else{var T=L.height>p?L.height:p;if("Horizontal"===m){var M=g[x-1].x+g[x-1].width+10+d;if(M+P+L.width>y){var D=(g[x-1].y>f[x-1].y+p/2?g[x-1].y:f[x-1].y+p/2)+10;D+T>b?(this.getPageChanged(),x=0,f=[],g=[],a=w,l=S):(a=f[0].x,l=D+T/2)}else a=M-d/2,l=f[x-1].y}else{var k=g[x-1].y>f[x-1].y+p/2?g[x-1].y:f[x-1].y+p/2;if(k+10+T>b){var E=g[x-1].x+this.textMaxWidth+10;E+P+L.width>y?(a=w,l=S,g=[],f=[],this.getPageChanged(),x=0):(a=E+d/2,l=f[0].y)}else a=f[x-1].x,l=k+10+p/2}}h=a+d/2+P,u=l+L.height/4,f.push({x:a,y:l}),g.push({x:h,y:u,width:L.width,height:L.height/2}),this.totalPages[this.page].Collection.push({DisplayText:B.legendName,element:B.gradientElement,Shape:{x:a,y:l},Text:{x:h,y:u},Fill:B.legendFill,Data:B.legendData,Rect:{x:f[x].x-d/2,y:f[x].y-p/2<u-L.height?f[x].y-p/2:u-L.height,width:Math.abs(f[x].x-d/2-(h+L.width)),height:p>L.height?p:L.height}}),x++}var j=this.totalPages[0].Collection;j.forEach(function(e,i){var r=new Bn(e.Rect.x,e.Rect.y,e.Rect.width,e.Rect.height);0===i&&(w=r.x,S=r.y),t.widthIncrement=Math.max(t.widthIncrement,Math.abs(w-(r.x+r.width))),t.heightIncrement=Math.max(t.heightIncrement,Math.abs(S-(r.y+r.height)))}),y=this.widthIncrement<y?this.widthIncrement:y,b=this.heightIncrement<b?this.heightIncrement:b,this.legendItemRect={x:j[0].Rect.x,y:j[0].Rect.y,width:y,height:b}}else{var I=this.legendCollections.length,R="Horizontal"===m?c(y)?e.areaRect.width/I:y/I:c(y)?25:y,A="Horizontal"===m?c(b)?25:b:c(b)?e.areaRect.height/I:b/I;w=0,S=v.height+10;var N=i.labelPosition,F=0,V=0,z=i.labelDisplayMode,G=0,_=0;for(O=0;O<this.legendCollections.length;O++){w="Horizontal"===m?w+R:w,S="Horizontal"===m?S:S+A;var H=this.legendCollections[O].legendName,W=new On(0,0);"None"===z?W=wt(H,C):"Trim"===z?W=wt(H=St("Horizontal"===m?R:A,H,C),C):H="",G=Math.max(G,W.height),_=Math.max(_,W.width),W.width>0&&W.height>0&&("Horizontal"===m?(h=w+R/2,u="After"===N?S+A+W.height/2+10:S-10):(h="After"===N?w-W.width/2-10:w+R+W.width/2+10,u=S+A/2+W.height/4)),0===O&&(F="Horizontal"===m?w:"After"===N?h-W.width/2:w,V="Horizontal"===m?"After"===N?S:u-W.height/2:S),O===I-1&&(y="Horizontal"===m?Math.abs(w+R-F):R+_+10,b="Horizontal"===m?A+G/2+10:Math.abs(S+A-V)),this.legendRenderingCollections.push({fill:this.legendCollections[O].legendFill,x:w,y:S,width:R,height:A,element:this.legendCollections[O].gradientElement,text:H,textX:h,textY:u,textWidth:W.width,textHeight:W.height,data:this.legendCollections[O].legendData})}this.legendItemRect={x:F,y:V,width:y,height:b}}}},t.prototype.getPageChanged=function(){this.page++,c(this.totalPages[this.page])&&(this.totalPages[this.page]={Page:this.page+1,Collection:[]})},t.prototype.findColorMappingLegendItems=function(t){var e=Mt(t).values;if(e&&e.length>0&&(this.calculateLegendItems(e),this.treemap.levels.length>0))for(var i=0;i<e.length;i++)this.findColorMappingLegendItems(e[i])},t.prototype.findPaletteLegendItems=function(t,e){var i,r;if(!c(this.treemap.drilledItems)&&0===this.treemap.drilledItems.length&&!c(this.treemap.initialDrillDown.groupName)&&c(this.treemap.drilledLegendItems))for(var n=Mt(t).values,o=0;o<n.length;o++)if(n[o].Name===this.treemap.initialDrillDown.groupName){n[o].isDrilled=!n[o].isDrilled,t=n[o],this.treemap.currentLevel=this.treemap.initialDrillDown.groupIndex,r=this.treemap.palette.length>0?this.treemap.palette[o%this.treemap.palette.length]:n[o].data[this.treemap.colorValuePath];break}if(this.treemap.enableDrillDown&&!c(this.treemap.drilledLegendItems)){var s=this.treemap.drilledLegendItems;if(r=s.data.options.fill,s.data.isDrilled)i=Mt(s.data).values;else{i=Mt(s.data.parent).values}}else i=Mt(t).values;var a;if(i&&i.length>0){for(var l=0;l<i.length;l++)(c(i[l].data[this.treemap.legendSettings.showLegendPath])||i[l].data[this.treemap.legendSettings.showLegendPath])&&(a=i[l].data[this.treemap.legendSettings.valuePath]?i[l].data[this.treemap.legendSettings.valuePath]:i[l].name,!!this.treemap.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollections,a)||this.legendCollections.push({legendName:a,legendFill:this.treemap.palette.length>0?c(this.treemap.currentLevel)?this.treemap.palette[l%this.treemap.palette.length]:r:i[l].data[this.treemap.colorValuePath],legendData:[],itemArea:i[l].weight}));if(this.legendCollections.sort(Xt),this.treemap.palette.length>0)for(var h=0;h<this.legendCollections.length;h++)this.legendCollections[h].legendFill=c(this.treemap.currentLevel)?this.treemap.palette[h%this.treemap.palette.length]:r}},t.prototype.calculateLegendItems=function(t){var e,i,r,n,o,s,a,l,h,u,p,d,f,g,m,y,b,v=!1,w=this.treemap.leafItemSettings,S=this.treemap.levels,P=this.treemap.legendSettings.position,C=!1,x=0;this.outOfRangeLegend=null;for(var O=0;O<t.length;O++){i="",f=!1,g=!1,C=!1,n=t[O].data,s=t[O].groupIndex;for(var B=0,L=0===this.treemap.levels.length||s===this.treemap.levels.length?w.colorMapping:S[s].colorMapping;B<L.length;B++){var T=L[B];if(l=null,r=Number(n[this.treemap.rangeColorValuePath]),a=n[this.treemap.equalColorValuePath],T.value=c(T.value)?T.value:T.value.toString(),!c(T.from)&&!c(T.to)&&r>=T.from&&r<=T.to&&T.showLegend?(v=!0,g=!0,p=T.from+" - "+T.to,o=c(T.label)?T.from+" - "+T.to:T.label,i=c(T.color)?i:T.color,e=this.isAddNewLegendData(p)):!c(T.value)&&a===T.value&&T.showLegend&&(v=!0,f=!0,p=T.value.toString(),o=c(T.label)?T.value.toString():T.label,i=c(T.color)?i:"[object Array]"===Object.prototype.toString.call(T.color)?T.color[0]:T.color,e=this.isAddNewLegendData(p)),v&&c(T.value)&&T.maxOpacity&&T.minOpacity&&"Interactive"===this.treemap.legendSettings.mode){var M=[];if(C=!0,"[object Array]"===Object.prototype.toString.call(T.color))for(var D=0;D<T.color.length;D++){var k={colorStop:(D*(100/(T.color.length-1))+"%").toString(),color:T.color[D]};M.push(k)}else{k={colorStop:"0%",color:i};var E={colorStop:"100%",color:i};M.push(k),M.push(E)}h="Top"===P||"Bottom"===P?"100%":"0%",u="Top"===P||"Bottom"===P?"0%":"100%";var j={id:"groupIndex_"+s+"_colorIndex_"+this.gradientCount,x1:"0%",y1:"0%",x2:h,y2:u};l=this.treemap.renderer.drawGradient("linearGradient",j,M).childNodes[0],"[object Array]"!==Object.prototype.toString.call(T.color)&&(l.childNodes[0].setAttribute("stop-opacity",T.minOpacity.toString()),l.childNodes[1].setAttribute("stop-opacity",T.maxOpacity.toString())),this.defsElement.appendChild(l),this.gradientCount++}d=!!this.treemap.legendSettings.removeDuplicateLegend&&this.removeDuplicates(this.legendCollections,o),e&&e.process&&v&&!d?(v=!1,i="[object Array]"===Object.prototype.toString.call(T.color)&&c(l)&&c(T.value)?this.legendGradientColor(T,x):i,this.legendCollections.push({actualValue:p,legendName:o,legendFill:i,legendData:[],gradientElement:c(l)?c(T.value)?this.legendLinearGradient:null:l,name:t[O].name,opacity:this.treemap.legendSettings.opacity,borderColor:this.treemap.legendSettings.border.color,borderWidth:this.treemap.legendSettings.border.width}),this.legendCollections[this.legendCollections.length-1].legendData.push(t[O]),x++):v&&!d&&(v=!1,this.legendCollections[e.value].legendData.push(t[O])),g||C||f||c(T.from)&&c(T.to)&&c(T.minOpacity)&&c(T.maxOpacity)&&c(T.value)&&!c(T.color)&&(m="[object Array]"===Object.prototype.toString.call(T.color)?T.color[0]:T.color,y=c(T.label)?"Others":T.label,c(this.outOfRangeLegend)&&(this.legendCollections.push({actualValue:y,legendData:[],legendName:y,legendFill:m}),b=this.legendCollections.length,this.outOfRangeLegend=this.legendCollections[b-1],x++),this.legendCollections[b-1].legendData.push(t[O]))}}},t.prototype.removeDuplicates=function(t,e){for(var i=!1,r=0;r<t.length;r++)if(t[r].legendName===e){i=!0;break}return i},t.prototype.isAddNewLegendData=function(t){var e,i;if(0===this.legendCollections.length)e=!0;else for(var r=0;r<this.legendCollections.length;r++){if(t===this.legendCollections[r].actualValue){e=!1,i=r;break}r===this.legendCollections.length-1&&(e=!0)}return{process:e,value:i}},t.prototype.drawLegend=function(){var t,e,i=this.treemap,r=i.legendSettings,n=i.renderer,o=r.textStyle;if(this.legendGroup=n.createGroup({id:i.element.id+"_Legend_Group"}),this.renderLegendBorder(),this.renderLegendTitle(),"Default"===r.mode)this.drawLegendItem(this.currentPage);else for(var s=0;s<this.legendRenderingCollections.length;s++){var a=i.element.id+"_Legend_Index_"+s,l=i.element.id+"_Legend_Index_"+s+"_Text",h=this.legendRenderingCollections[s];t=(e=h.element)?"url(#"+e.id+")":h.fill;var u=new Bn(h.x,h.y,h.width,h.height),c=new Dn(h.textX,h.textY),p=new Ln(a,t,r.shapeBorder,r.opacity,u);this.treemap.enableRtl&&("Left"===i.legendSettings.position||"Right"===i.legendSettings.position||"Auto"===i.legendSettings.position&&this.treemap.availableSize.width>=this.treemap.availableSize.height?(p.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-(this.translate.y+p.height)-Math.abs(this.legendBorderRect.y-p.y),c.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-this.translate.y+h.textHeight/2-Math.abs(this.legendBorderRect.y-c.y)):(p.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-(this.translate.x+p.width)-Math.abs(this.legendBorderRect.x-p.x),c.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-this.translate.x-Math.abs(this.legendBorderRect.x-c.x))),xt(new Mn(l,c.x,c.y,"middle",h.text,"",""),o,o.color||this.treemap.themeStyle.legendTextColor,this.legendGroup),this.legendGroup.appendChild(n.drawRectangle(p))}Zt(this.treemap,this.legendGroup)},t.prototype.defaultLegendRtlLocation=function(t,e,i,r){var n=t.Shape,o=t.Text,s=wt(t.DisplayText,r.textStyle);return n.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-(this.translate.x+e)-Math.abs(this.legendBorderRect.x-n.x),o.x=this.translate.x+this.legendBorderRect.x+this.legendBorderRect.width-(this.translate.x+s.width+e)-Math.abs(this.legendBorderRect.x-o.x),("Left"===i.legendSettings.position||"Right"===i.legendSettings.position||"Auto"===i.legendSettings.position&&this.treemap.availableSize.width>=this.treemap.availableSize.height)&&(n.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-this.translate.y-Math.abs(Math.abs(this.legendBorderRect.y)-n.y)-r.shapeHeight/2,o.y=this.translate.y+this.legendBorderRect.y+this.legendBorderRect.height-this.translate.y-Math.abs(Math.abs(this.legendBorderRect.y)-o.y)),{shapeLocation:n,textLocation:o}},t.prototype.drawLegendItem=function(t){var e,i,r=this,n=this.treemap,o=n.legendSettings,s=new On(o.shapeWidth,o.shapeHeight),a=n.renderer,l=o.shapeBorder;if(t>=0&&t<this.totalPages.length){document.getElementById(this.legendGroup.id)&&document.getElementById(this.legendGroup.id).remove();for(var h="HorizontalLine"===o.shape||"VerticalLine"===o.shape||"Cross"===o.shape,u=h?c(o.fill)?"#000000":o.fill:l.color,p=h&&0===l.width?1:l.width,d=function(l){var c=f.totalPages[t].Collection[l],d=a.createGroup({id:n.element.id+"_Legend_Index_"+l}),g=c.DisplayText,m=n.element.id+"_Legend_Shape_Index_"+l,y=n.element.id+"_Legend_Text_Index_"+l,b=c.Shape,v=c.Text;n.enableRtl&&(e=f.defaultLegendRtlLocation(c,10,n,o),b=e.shapeLocation,v=e.textLocation),i={cancel:!1,name:sn,treemap:n,fill:c.Fill,shape:o.shape,imageUrl:o.imageUrl},f.treemap.trigger(sn,i,function(t){var e=new Tn(m,t.fill,p,h?c.Fill:u,o.opacity,"");d.appendChild(le(b,t.shape,s,t.imageUrl,e,g)),xt(new Mn(y,v.x,v.y,"start",g,"",""),o.textStyle,o.textStyle.color||r.treemap.themeStyle.legendTextColor,d),r.legendGroup.appendChild(d)})},f=this,g=0;g<this.totalPages[t].Collection.length;g++)d(g);var m=void 0;if(0!==this.page){var y=t+1+"/"+this.totalPages.length,b=o.textStyle,v=wt(y,b),w=this.legendItemRect.x+this.legendItemRect.width-v.width-20-10,S=this.legendItemRect.x+this.legendItemRect.width,P=this.legendItemRect.y+this.legendItemRect.height+2.5+10,C=S-10-v.width/2-5;m=a.createGroup({id:n.element.id+"_Legend_Paging_Group"});var x=a.createGroup({id:n.element.id+"_Legend_Left_Paging_Group"}),O=a.createGroup({id:n.element.id+"_Legend_Right_Paging_Group"}),B=" M "+S+" "+P+" L "+(S-10)+" "+(P-5)+" L "+(S-10)+" "+(P+5)+" z ",L=" M "+w+" "+P+" L "+(w+10)+" "+(P-5)+" L "+(w+10)+" "+(P+5)+" z ",T=new Tn(n.element.id+"_Left_Page","#a6a6a6",0,"#a6a6a6",1,"",L);x.appendChild(a.drawPath(T));var M=new Ln(n.element.id+"_Left_Page_Rect","transparent",{},1,new Bn(w-5,P-10,20,20),"");x.appendChild(a.drawRectangle(M)),this.wireEvents(x);var D=new Tn(n.element.id+"_Right_Page","#a6a6a6",0,"#a6a6a6",1,"",B);O.appendChild(a.drawPath(D));var k=new Ln(n.element.id+"_Right_Page_Rect","transparent",{},1,new Bn(S-10,P-5,10,10),"");O.appendChild(a.drawRectangle(k)),this.wireEvents(O),m.appendChild(x),m.appendChild(O);var E={id:n.element.id+"_Paging_Text",x:C,y:P+v.height/4,fill:"#a6a6a6","font-size":"14px","font-style":b.fontStyle,"font-family":b.fontFamily,"font-weight":b.fontWeight,"text-anchor":"middle",transform:"",opacity:1,"dominant-baseline":""};m.appendChild(a.createText(E,y)),this.legendGroup.appendChild(m)}}},t.prototype.renderLegendBorder=function(){var t=this.treemap,e=t.legendSettings,i=e.title.text,r=e.titleStyle,n=wt(St(this.legendItemRect.width+20,i,r),r);this.legendBorderRect=new Bn(this.legendItemRect.x-10,this.legendItemRect.y-10-n.height,this.legendItemRect.width+20,this.legendItemRect.height+20+n.height+("Interactive"===e.mode?0:0!==this.page?10:0));var o=new Ln(t.element.id+"_Legend_Border",e.background,e.border,1,this.legendBorderRect,""),s=t.renderer.drawRectangle(o);s.style.pointerEvents="none",this.legendGroup.appendChild(s),this.getLegendAlignment(t,this.legendBorderRect.width,this.legendBorderRect.height,e),this.legendGroup.setAttribute("transform","translate( "+(this.translate.x+-this.legendBorderRect.x)+" "+(this.translate.y+-this.legendBorderRect.y)+" )"),t.svgObject.appendChild(this.legendGroup)},t.prototype.renderLegendTitle=function(){var t=this.treemap,e=t.legendSettings,i=e.titleStyle,r=e.title.text,n=St(this.legendItemRect.width+20,r,i),o=wt(n,i);r&&xt(new Mn(t.element.id+"_LegendTitle",this.legendItemRect.x+this.legendItemRect.width/2,this.legendItemRect.y-o.height/2-5,"middle",n,""),i,i.color||this.treemap.themeStyle.legendTitleColor,this.legendGroup)},t.prototype.renderInteractivePointer=function(t){var e=this.treemap,i=t.target,r=e.element.id+"_Interactive_Legend";i=t.type.indexOf("touch")>-1?document.elementFromPoint(t.changedTouches[0].clientX,t.changedTouches[0].clientY):i;var n,o=e.legendSettings;if(i.id.indexOf("_Item_Index")>-1&&o.visible&&this.legendRenderingCollections.length>0){var s=void 0,a=void 0,l=void 0,h=void 0,u=void 0,p=void 0,d=void 0;n=e.layout.renderItems[parseFloat(i.id.split("_Item_Index_")[1])];for(var f=e.svgObject.getBoundingClientRect(),g=0;g<this.legendCollections.length;g++){s=this.legendCollections[g],a=(d=document.getElementById(e.element.id+"_Legend_Index_"+g)).getBoundingClientRect();var m=new Bn(Math.abs(a.left-f.left),Math.abs(a.top-f.top),a.width,a.height);if(h=d.getAttribute("fill"),u=o.shapeBorder.color,p=o.shapeBorder.width,!c(s.legendData)){l=s.legendData;for(var y=0;y<l.length;y++)if(l[y].levelOrderName===n.levelOrderName){this.drawInteractivePointer(o,h,u,r,p,m);break}}}}else this.removeInteractivePointer()},t.prototype.drawInteractivePointer=function(t,e,i,r,n,o){var s,a,l;s="Horizontal"===("None"===t.orientation?"Top"===t.position||"Bottom"===t.position?"Horizontal":"Vertical":t.orientation)?t.invertedPointer?" M "+(a=o.x+o.width/2)+" "+(l=o.y+o.height)+" L "+(a-10)+" "+(l+10)+" L "+(a+10)+" "+(l+10)+" Z ":" M "+(a=o.x+o.width/2)+" "+(l=o.y)+" L "+(a-10)+" "+(l-10)+" L "+(a+10)+" "+(l-10)+" Z ":t.invertedPointer?" M "+(a=o.x)+" "+(l=o.y+o.height/2)+" L "+(a-10)+" "+(l-10)+" L "+(a-10)+" "+(l+10)+" z ":" M "+(a=o.x+o.width)+" "+(l=o.y+o.height/2)+" L "+(a+10)+" "+(l-10)+" L "+(a+10)+" "+(l+10)+" z ";var h=new Tn(r,e,n,i,1,"",s);this.treemap.svgObject.appendChild(this.treemap.renderer.drawPath(h))},t.prototype.getLegendAlignment=function(t,e,i,r){var n,o,s,a=(s=u({},t.areaRect,s,!0)).x,l=s.y,h=s.height,c=s.width,p=t.availableSize.width,d=t.availableSize.height,f="Auto"===r.position?p>d?"Right":"Bottom":r.position;if("Float"===r.position)this.translate=r.location;else{switch(f){case"Top":case"Bottom":s.height=h-i,n=p/2-e/2,o="Top"===f?l:l+s.height+10,s.y="Top"===f?l+i+10:l;break;case"Left":case"Right":s.width=c-e,n="Left"===f?a:a+s.width,o=d/2-i/2,s.x="Left"===f?a+e:a}switch(r.alignment){case"Near":"Top"===f||"Bottom"===f?n=s.x:o=s.y;break;case"Far":"Top"===f||"Bottom"===f?n=p-e:o=d-i}this.treemap.totalRect=s,this.translate=new Dn(n,o)}},t.prototype.mouseUpHandler=function(t){this.renderInteractivePointer(t),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeInteractivePointer.bind(this),3e3)},t.prototype.removeInteractivePointer=function(){if(document.getElementById(this.treemap.element.id+"_Interactive_Legend")){var t=document.getElementById(this.treemap.element.id+"_Interactive_Legend");t.parentNode.removeChild(t)}},t.prototype.changeNextPage=function(t){this.currentPage=t.target.id.indexOf("_Left_Page_")>-1?this.currentPage-1:this.currentPage+1,this.drawLegend()},t.prototype.wireEvents=function(t){Si.add(t,wi.touchStartEvent,this.changeNextPage,this)},t.prototype.addEventListener=function(){this.treemap.isDestroyed||(this.treemap.on(wi.touchMoveEvent,this.renderInteractivePointer,this),this.treemap.on(wi.touchEndEvent,this.mouseUpHandler,this))},t.prototype.removeEventListener=function(){this.treemap.isDestroyed||(this.treemap.off(wi.touchMoveEvent,this.renderInteractivePointer),this.treemap.off(wi.touchEndEvent,this.mouseUpHandler))},t.prototype.getModuleName=function(){return"treeMapLegend"},t.prototype.destroy=function(t){this.removeEventListener()},t.prototype.legendGradientColor=function(t,e){var i,r="http://www.w3.org/2000/svg";if(!c(t.color)&&"[object Array]"===Object.prototype.toString.call(t.color)){var n=this.treemap.renderer.createDefs(),o=document.createElementNS(r,"linearGradient"),s=this.treemap.legendSettings.position,a="Top"===s||"Bottom"===s?"100":"0",l="Top"===s||"Bottom"===s?"0":"100";o.setAttribute("id","linear_"+e),o.setAttribute("x1","0%"),o.setAttribute("y1","0%"),o.setAttribute("x2",a+"%"),o.setAttribute("y2",l+"%");for(var h=0;h<t.color.length;h++){var u=100/(t.color.length-1),p=document.createElementNS(r,"stop");p.setAttribute("offset",h*u+"%"),p.setAttribute("stop-color",t.color[h]),p.setAttribute("stop-opacity",1..toString()),o.appendChild(p)}n.appendChild(o),this.legendLinearGradient=o;var d="url(#linear_"+e+")";this.defsElement.appendChild(o),i=d}return i},t}(),uu=function(){function t(t){this.target="highlight",this.shapeTarget="highlight",this.shapeHighlightCollection=[],this.legendHighlightCollection=[],this.currentElement=[],this.treemap=t,this.addEventListener()}return t.prototype.mouseMove=function(t){var e,i,r,n,o,s,a,l=this.treemap,h=t.target.id,u=[],c=this.treemap.highlightSettings,p=[],d=this.treemap.treeMapSelectionModule;if(h.indexOf("_Item_Index")>-1&&(!d||this.treemap.selectionId!==h)){if(this.highLightId!==h){o=document.getElementById(l.element.id+"_TreeMap_"+l.layoutType+"_Layout");var f=document.getElementsByClassName("treeMapSelection");r=this.treemap.layout.renderItems[parseFloat(h.split("_Item_Index_")[1])];var g=void 0;if(this.treemap.legendSettings.visible){var m=this.treemap.treeMapLegendModule.legendCollections;g=ge(this.treemap.treeMapLegendModule.legendCollections.length,r,l),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+g):document.getElementById(this.treemap.element.id+"_Legend_Index_"+g),null===this.shapeElement||d&&this.shapeElement.getAttribute("id")===d.legendSelectId?this.currentElement.length>0&&this.currentElement[this.currentElement.length-1].currentElement!==this.shapeElement&&(fe(this.shapeHighlightCollection,this.currentElement,l),this.highLightId=""):d&&this.shapeElement===d.shapeElement?this.currentElement.length>0&&this.currentElement[this.currentElement.length-1].currentElement!==this.shapeElement&&(fe(this.shapeHighlightCollection,this.currentElement,l),this.highLightId=""):(this.currentElement.push({currentElement:this.shapeElement}),ce(this.shapeHighlightCollection),this.shapeHighlightCollection.push({legendEle:this.shapeElement,oldFill:m[g].legendFill,oldOpacity:m[g].opacity,oldBorderColor:m[g].borderColor,oldBorderWidth:m[g].borderWidth}),de(this.shapeElement,c.fill,c.opacity,c.border.color,c.border.width.toString()),this.target="highlight")}if(a=Dt(r,[],c.mode,l),!this.treemap.legendSettings.visible||(!d||(!this.shapeElement||this.shapeElement.getAttribute("id")!==d.legendSelectId)))if(this.treemap.legendSettings.visible&&(d&&this.shapeElement===d.shapeElement))e=!1;else{for(var y=0;y<o.childElementCount;y++){s=o.childNodes[y],n=!0,r=l.layout.renderItems[parseFloat(s.id.split("_Item_Index_")[1])];for(var b=0;b<f.length;b++)if(s.id===f[b].id){n=!1;break}a.indexOf(r.levelOrderName)>-1&&n&&(p.push(s),u.push(r))}te(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",l);for(var v=0;v<p.length;v++)ee((s=p[v]).childNodes[0],{border:c.border,fill:c.fill,opacity:c.opacity}),s.classList.add("treeMapHighLight"),this.highLightId=h;i={cancel:!1,name:en,treemap:l,items:u,elements:p},l.trigger(en,i)}}}else if(h.indexOf("_Legend_Shape")>-1||h.indexOf("_Legend_Index")>-1){if(this.treemap.legendSettings.visible&&(!d||d.legendSelectId!==h)&&(!d||d.shapeSelectId!==h)){var w,S=void 0,P=void 0,C=document.getElementById(h);"highlight"===this.shapeTarget&&pe(this.legendHighlightCollection),this.shapeTarget="highlight";g="Default"===this.treemap.legendSettings.mode?parseFloat(h.split("_Legend_Shape_Index_")[1]):parseFloat(h.split("_Legend_Index_")[1]);var x=this.treemap.treeMapLegendModule.legendCollections[g].legendData.length,O=(m=this.treemap.treeMapLegendModule.legendCollections,parseInt(h[h.length-1],10));for(y=0;y<x;y++)for(b=0;b<this.treemap.layout.renderItems.length;b++)if(this.treemap.treeMapLegendModule.legendCollections[g].legendData[y].levelOrderName===this.treemap.layout.renderItems[b].levelOrderName){S=b,P=this.treemap.layout.renderItems[b].groupIndex;var B=document.getElementById(this.treemap.element.id+"_Level_Index_"+P+"_Item_Index_"+S+"_RectPath");0===y&&(this.legendHighlightCollection=[],me(this.legendHighlightCollection,O,b,C,B,this.treemap.layout.renderItems,m),w=this.legendHighlightCollection.length,this.legendHighlightCollection[w-1].ShapeCollection={Elements:[]}),de(C,c.fill,c.opacity,c.border.color,c.border.width.toString()),de(B,c.fill,c.opacity,c.border.color,c.border.width.toString()),w=this.legendHighlightCollection.length,this.legendHighlightCollection[w-1].ShapeCollection.Elements.push(B)}}}else d&&this.shapeElement&&this.shapeElement.getAttribute("id")===d.legendSelectId||(d?this.shapeElement!==d.shapeElement:this.treemap.legendSettings.visible)&&te(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",l),"highlight"!==this.shapeTarget&&"highlight"!==this.target||!this.treemap.legendSettings.visible||d&&this.shapeElement&&this.shapeElement.getAttribute("id")===d.legendSelectId||(d?this.shapeElement!==d.shapeElement:!d||d.legendSelect)&&(ce(this.shapeHighlightCollection),this.shapeHighlightCollection=[]),"highlight"===this.shapeTarget&&this.treemap.legendSettings.visible&&pe(this.legendHighlightCollection),this.highLightId="",e=!1;return e},t.prototype.addEventListener=function(){this.treemap.isDestroyed||this.treemap.on(wi.touchMoveEvent,this.mouseMove,this)},t.prototype.removeEventListener=function(){this.treemap.isDestroyed||this.treemap.off(wi.touchMoveEvent,this.mouseMove)},t.prototype.getModuleName=function(){return"treeMapHighlight"},t.prototype.destroy=function(t){this.removeEventListener()},t}(),cu=function(){function t(t){this.shapeSelectionCollection=[],this.legendSelectionCollection=[],this.shapeSelect=!0,this.legendSelect=!0,this.treemap=t,this.addEventListener()}return t.prototype.mouseDown=function(t){var e,i=t.target,r=this.treemap;r.levelSelection=[];var n,o,s,a,l=[],h=i.id,u=i.innerHTML,c=[],p=r.selectionSettings,d=this.treemap.treeMapHighlightModule,f=r.element.id+"_TreeMap_"+r.layoutType+"_Layout";if(h.indexOf("_Item_Index")>-1)if(t.preventDefault(),this.treemap.selectionId!==h&&this.legendSelect){o=document.getElementById(f),n=r.layout.renderItems[parseFloat(h.split("_Item_Index_")[1])];var g=void 0;if(this.treemap.legendSettings.visible){this.shapeSelect=!1;var m=this.treemap.treeMapLegendModule.legendCollections.length,y=this.treemap.treeMapLegendModule.legendCollections;this.shapeElement=void 0,ce(this.shapeSelectionCollection),d&&(d.shapeTarget="selection",d.shapeHighlightCollection=[]),g=ge(m,n,r),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+g):document.getElementById(this.treemap.element.id+"_Legend_Index_"+g),null!==this.shapeElement&&(this.shapeSelectId=this.shapeElement.getAttribute("id"),this.shapeSelectionCollection.push({legendEle:this.shapeElement,oldFill:y[g].legendFill,oldOpacity:y[g].opacity,oldBorderColor:y[g].borderColor,oldBorderWidth:y[g].borderWidth}),de(this.shapeElement,p.fill,p.opacity,p.border.color,p.border.width.toString()))}a=Dt(n,[],p.mode,r);for(var b=0;b<o.childElementCount;b++)s=o.childNodes[b],n=r.layout.renderItems[parseFloat(s.id.split("_Item_Index_")[1])],a.indexOf(n.levelOrderName)>-1&&(c.push(s),r.levelSelection.push(s.id),l.push(n));te(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",r),this.treemap.selectionId=h;for(var v=document.getElementsByClassName("treeMapHighLight"),w=0;w<c.length;w++){if(s=c[w],v.length>0)for(var S=0;S<v.length;S++)v[S].id===s.id&&v[S].classList.remove("treeMapHighLight"),ee(s.childNodes[0],{border:p.border,fill:p.fill,opacity:p.opacity}),s.classList.add("treeMapSelection");else ee(s.childNodes[0],{border:p.border,fill:p.fill,opacity:p.opacity}),s.classList.add("treeMapSelection");e={cancel:!1,name:tn,treemap:r,items:l,elements:c,text:u,contentItemTemplate:u},r.trigger(tn,e,function(t){t.contentItemTemplate!==u&&Ot(h,i,t.contentItemTemplate)})}}else ce(this.shapeSelectionCollection),this.shapeSelectionCollection=[],this.shapeElement=void 0,this.shapeSelect=!0,this.shapeSelectId="",this.treemap.legendId=[],te(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",r),this.treemap.selectionId="";else if(h.indexOf("_Legend_Shape")>-1||h.indexOf("_Legend_Index")>-1){y=this.treemap.treeMapLegendModule.legendCollections;if(this.treemap.legendSettings.visible&&this.legendSelectId!==h&&this.shapeSelect){var P,C=void 0,x=void 0;this.legendSelectId=h,this.legendSelect=!1;var O=parseInt(h[h.length-1],10),B=document.getElementById(h);pe(this.legendSelectionCollection),d&&(d.shapeTarget="selection");g="Default"===this.treemap.legendSettings.mode?parseFloat(h.split("_Legend_Shape_Index_")[1]):parseFloat(h.split("_Legend_Index_")[1]);var L=this.treemap.treeMapLegendModule.legendCollections[g].legendData.length;for(w=0;w<L;w++)for(var T=0;T<this.treemap.layout.renderItems.length;T++)if(this.treemap.treeMapLegendModule.legendCollections[g].legendData[w].levelOrderName===this.treemap.layout.renderItems[T].levelOrderName){C=T,x=this.treemap.layout.renderItems[T].groupIndex;var M=document.getElementById(this.treemap.element.id+"_Level_Index_"+x+"_Item_Index_"+C+"_RectPath");0===w&&(me(this.legendSelectionCollection,O,T,B,M,this.treemap.layout.renderItems,y),P=this.legendSelectionCollection.length,this.legendSelectionCollection[P-1].ShapeCollection={Elements:[]}),de(B,p.fill,p.opacity,p.border.color,p.border.width.toString()),de(M,p.fill,p.opacity,p.border.color,p.border.width.toString()),P=this.legendSelectionCollection.length,this.legendSelectionCollection[P-1].ShapeCollection.Elements.push(M)}}else pe(this.legendSelectionCollection),d&&(d.shapeTarget="highlight"),this.legendSelect=!0,this.legendSelectId=""}},t.prototype.selectTreemapItem=function(t,e){if(e){for(var i=void 0,r=0;r<this.treemap.layout.renderItems.length;r++)if(t===this.treemap.layout.renderItems[r].levelOrderName){i=this.treemap.layout.renderItems[r];break}var n=this.treemap.selectionSettings,o=[],s=void 0,a=void 0,l=[];this.treemap.levelSelection=[];for(var h=this.treemap.element.id+"_TreeMap_"+this.treemap.layoutType+"_Layout",u=document.getElementById(h),c=Dt(i,[],n.mode,this.treemap),p=0;p<u.childElementCount;p++)s=u.childNodes[p],i=this.treemap.layout.renderItems[parseFloat(s.id.split("_Item_Index_")[1])],c.indexOf(i.levelOrderName)>-1&&(o.push(s),this.treemap.levelSelection.push(s.id),l.push(i));if(this.treemap.legendSettings.visible)for(var d=0;d<l.length;d++){this.shapeSelect=!1;var f=this.treemap.treeMapLegendModule.legendCollections.length,g=this.treemap.treeMapLegendModule.legendCollections;this.shapeElement=void 0,ce(this.shapeSelectionCollection),a=ge(f,l[d],this.treemap),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById(this.treemap.element.id+"_Legend_Shape_Index_"+a):document.getElementById(this.treemap.element.id+"_Legend_Index_"+a),null!==this.shapeElement&&(this.shapeSelectId=this.shapeElement.getAttribute("id"),this.treemap.legendId.push(this.shapeSelectId),this.shapeSelectionCollection.push({legendEle:this.shapeElement,oldFill:g[a].legendFill,oldOpacity:g[a].opacity,oldBorderColor:g[a].borderColor,oldBorderWidth:g[a].borderWidth}),de(this.shapeElement,n.fill,n.opacity,n.border.color,n.border.width.toString()))}te(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",this.treemap);var m=document.getElementById(this.treemap.levelSelection[0]);this.treemap.selectionId=m.childNodes[0].id;for(var y=document.getElementsByClassName("treeMapHighLight"),b=0;b<o.length;b++)if(s=o[b],y.length>0)for(var v=0;v<y.length;v++)y[v].id===s.id&&y[v].classList.remove("treeMapHighLight"),ee(s.childNodes[0],{border:n.border,fill:n.fill,opacity:n.opacity}),s.classList.add("treeMapSelection");else n.fill="null"===n.fill?this.treemap.layout.renderItems[parseInt(s.id.split("Item_Index_")[1],10)].options.fill:n.fill,ee(s.childNodes[0],{border:n.border,fill:n.fill,opacity:n.opacity}),s.classList.add("treeMapSelection")}else ce(this.shapeSelectionCollection),this.shapeElement=void 0,this.treemap.levelSelection=[],this.shapeSelect=!0,this.shapeSelectId="",this.treemap.legendId=[],te(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",this.treemap),this.treemap.selectionId=""},t.prototype.addEventListener=function(){this.treemap.isDestroyed||this.treemap.on(wi.touchStartEvent,this.mouseDown,this)},t.prototype.removeEventListener=function(){this.treemap.isDestroyed||this.treemap.off(wi.touchStartEvent,this.mouseDown)},t.prototype.getModuleName=function(){return"treeMapSelection"},t.prototype.destroy=function(t){this.removeEventListener()},t}(),pu=function(t,e){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(i[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&(i[r[n]]=t[r[n]])}return i},du=function(){function t(t){this.treemap=t,this.tooltipSettings=this.treemap.tooltipSettings,this.tooltipId=this.treemap.element.id+"_TreeMapTooltip",this.addEventListener()}return t.prototype.renderTooltip=function(t){var e,i,r,n,o,s=this;-1!==t.type.indexOf("touch")?(this.isTouch=!0,e=(n=t).changedTouches[0].pageX,i=n.changedTouches[0].pageY,r=n.target):(this.isTouch="touch"===t.pointerType,e=t.pageX,i=t.pageY,r=t.target);var a,l,h,u,p=r.id,d={},f={},g=[];p.indexOf("_Item_Index")>-1?c(d=this.treemap.layout.renderItems[parseFloat(p.split("_Item_Index_")[1])])||(d.name,a=d.weight,f=d.data,u=d.options.fill,g=this.treemap.enableRtl?[ie(this.tooltipSettings.format,f,this.treemap)||re(a,this.treemap)+" : "+this.treemap.weightValuePath.toString()]:[ie(this.tooltipSettings.format,f,this.treemap)||this.treemap.weightValuePath.toString()+" : "+re(a,this.treemap)],document.getElementById(this.tooltipId)?l=document.getElementById(this.tooltipId):(l=w("div",{id:this.treemap.element.id+"_TreeMapTooltip",className:"EJ2-TreeMap-Tooltip",styles:"position: absolute;pointer-events:none;"}),document.getElementById(this.treemap.element.id+"_Secondary_Element").appendChild(l)),(h=Vt(e,i,this.treemap.svgObject)).y=this.tooltipSettings.template?h.y+10:h.y,this.tooltipSettings.textStyle.fontFamily=this.treemap.themeStyle.fontFamily,this.tooltipSettings.textStyle.color=this.treemap.themeStyle.tooltipFontColor||this.tooltipSettings.textStyle.color,this.tooltipSettings.textStyle.opacity=this.treemap.themeStyle.tooltipTextOpacity||this.tooltipSettings.textStyle.opacity,o={cancel:!1,name:rn,item:d,options:{location:h,text:g,data:f,textStyle:this.tooltipSettings.textStyle,template:this.tooltipSettings.template},treemap:this.treemap,element:r,eventArgs:t},this.treemap.trigger(rn,o,function(t){s.addTooltip(o,u,l)})):(this.removeTooltip(),this.treemap.clearTemplate())},t.prototype.addTooltip=function(t,e,i,r){var n,o;if(c(t))n=r.cancel,o=r;else{n=t.cancel,o=pu(t,["cancel"]).options}n?(this.removeTooltip(),this.treemap.clearTemplate()):(this.svgTooltip=new Jr({enable:!0,header:"",data:o.data,template:o.template,content:o.text,shapes:[],location:o.location,palette:[e],areaBounds:this.treemap.areaRect,textStyle:o.textStyle,fill:this.treemap.tooltipSettings.fill?this.treemap.tooltipSettings.fill:this.treemap.themeStyle.tooltipFillColor}),(this.treemap.isVue||this.treemap.isVue3)&&(this.svgTooltip.controlInstance=this.treemap),this.svgTooltip.opacity=this.treemap.themeStyle.tooltipFillOpacity||this.svgTooltip.opacity,this.svgTooltip.appendTo(i),this.treemap.renderReactTemplates())},t.prototype.mouseUpHandler=function(t){this.renderTooltip(t),clearTimeout(this.clearTimeout),this.clearTimeout=setTimeout(this.removeTooltip.bind(this),2e3)},t.prototype.removeTooltip=function(){if(document.getElementsByClassName("EJ2-TreeMap-Tooltip").length>0){var t=document.getElementsByClassName("EJ2-TreeMap-Tooltip")[0];t.parentNode.removeChild(t)}},t.prototype.addEventListener=function(){this.treemap.isDestroyed||(this.treemap.on(wi.touchMoveEvent,this.renderTooltip,this),this.treemap.on(wi.touchEndEvent,this.mouseUpHandler,this))},t.prototype.removeEventListener=function(){this.treemap.isDestroyed||(this.treemap.off(wi.touchMoveEvent,this.renderTooltip),this.treemap.off(wi.touchEndEvent,this.mouseUpHandler))},t.prototype.getModuleName=function(){return"treeMapTooltip"},t.prototype.destroy=function(t){this.removeEventListener()},t}(),fu=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),gu=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(e),mu=gu.h,yu=!mu,bu=function(t){function e(){var e=t.call(this,arguments)||this;return e.hasInjectedModules=!1,e.hasChildDirective=!1,e.childDirObjects="",e.isDecorator=!1,e}return fu(e,t),e.prototype.created=function(){var t=this;if(this.propKeys){for(var e=function(e){i.ej2Instances.addEventListener(e,function(i){t.$emit(e,i)})},i=this,r=0,n=this.propKeys;r<n.length;r++){e(n[r])}var s=o("$root.$options.provide",this),a=o("$parent.$options.provide",this);if(this.hasInjectedModules&&!yu){var l=[];s&&s.managed?(this.isDecorator=!0,l=this.getInjectedServices()||[]):s?l=s[this.ej2Instances.getModuleName()]||[]:a&&(l=this.getInjectedServices()||[]);for(var h=0,u=this.ej2Instances.getInjectedModules()||[];h<u.length;h++){var c=u[h];-1===l.indexOf(c)&&l.push(c)}this.ej2Instances.injectedModules=l}}},e.prototype.mounted=function(){var t=this.$el?this.$el.querySelectorAll("div.e-directive"):null;if(mu&&t)for(var e=0;e<t.length;e++)t[e].parentElement&&t[e].parentElement.removeChild(t[e]);this.ej2Instances.isVue=!0,this.ej2Instances.isVue3=this.isVue3,this.ej2Instances.vueInstance=this,this.isVue3&&(this.ej2Instances.ej2Instances=this.ej2Instances,this.ej2Instances.referModels=this.models),this.ej2Instances.appendTo(this.$el)},e.prototype.getInjectedServices=function(){var t,e=[];if(this.$root&&this.isDecorator?t=o("$root.$options.provide",this):this.$vnode?t=o("$vnode.context.$options.provide",this):this.$parent&&(t=o("$parent.$options.provide",this)),t){var i=t;if("function"==typeof t)if(t.managed){var r=t.managed,n=Object.keys(r),s=void 0;this.$root&&this.isDecorator?s=Object.keys(this.$root):this.$vnode?s=Object.keys(this.$vnode.context):this.$parent&&(s=Object.keys(this.$parent));for(var a=0;a<n.length;a++)for(var l=0;l<s.length;l++)-1!==s[l].indexOf(n[a])&&(this.$root&&this.isDecorator?r[n[l]]=this.$root[s[a]]:this.$vnode?r[n[a]]=this.$vnode.context[s[l]]:this.$parent&&(r[n[a]]=this.$parent[s[l]]),i=r)}else this.$vnode?i=this.$vnode.context.$options.provide():this.$parent&&(i=this.$parent.$options.provide());e=i[this.ej2Instances.getModuleName()]||[]}return this.isDecorator=!1,e},e.prototype.updated=function(){if(this.hasChildDirective){var t={};this.fetchChildPropValues(t);var e=JSON.stringify(t);this.childDirObjects!==e&&(this.childDirObjects=e,this.assignValueToWrapper(t,!1))}},e.prototype.beforeDestroy=function(){var t=this;t.ej2Instances.destroy(),t.$el.style.visibility="hidden",t=null},e.prototype.bindProperties=function(){for(var t={},e=0,i=this.propKeys;e<i.length;e++){var r=i[e];(!c(this[r])&&!this.isVue3||this[0]&&!c(this[0][0])&&!c(this[0][0][r]))&&(t[r]=this.isVue3?this[0][0][r]:this[r])}if(this.hasChildDirective&&this.fetchChildPropValues(t),this.hasInjectedModules){for(var n=this.getInjectedServices()||[],o=0,s=this.ej2Instances.getInjectedModules()||[];o<s.length;o++){var a=s[o];-1===n.indexOf(a)&&n.push(a)}this.ej2Instances.injectedModules=n}this.assignValueToWrapper(t)},e.prototype.assignValueToWrapper=function(t,e){this.ej2Instances.setProperties(u({},{},t,!0),!!c(e)||e)},e.prototype.fetchChildPropValues=function(t){var e={};if(this.isVue3){var i=void 0;if(this[0]&&this[0][1].slots.default?i=this[0][1].slots.default():this&&this.$&&this.$.slots&&this.$.slots.default&&(i=this.$.slots.default()),!i)return;for(var r=0;r<i.length;r++)if(i[r].type.methods){var n=i[r].type.methods.getTag().replace("e-",""),o=this.resolveArrayDirectives(i[r].children,n),s=n.split("-"),a=this.ej2Instances.getModuleName().toLowerCase(),l=s.length>1&&a.indexOf(s[0])>-1?s[1]:s[0];l=l.replace(a,""),"splitter"==a&&"panes"==l?l="paneSettings":"bulletchart"==a&&"range"==l?l="ranges":"schedule"==a&&"header"==l&&(l="headerRows"),e[l]=o[n]}}else e=this.getDirectiveValues(this.$slots.default,this.tagMapper||{},this.tagNameMapper||{});this.childDirObjects||(this.childDirObjects=JSON.stringify(e));for(var h=0,u=Object.keys(e);h<u.length;h++){var c=u[h];t[c]=e[c]}},e.prototype.resolveArrayDirectives=function(t,e){var i,r=[];r=t.default?t.default():t;var n={};n[e]=[];for(var o=function(t){var r={},o=t.type.methods?t.type.methods.getTag():e;if(t.children){var a=void 0;if((i=s.resolveComplexDirs(t.children,s.tagMapper["e-"+e],o)).length)r=i;else for(var l=0;l<Object.keys(i).length;l++)a=Object.keys(i)[l],r[a]=i[a]}t.props&&Object.keys(t.props).forEach(function(e){r[e]=t.props[e]}),/[s]\b/.test(o)&&i&&(!/[s]\b/.test(e)||i.length)?n[e]=r:n[e].push(r)},s=this,a=0,l=r;a<l.length;a++){o(l[a])}return n},e.prototype.resolveComplexDirs=function(t,e,i){for(var r,n=[],o={},s=function(t){var s=void 0;e[i]&&(s=(s=Object.keys(e[i]).find(function(r){return e[i][r]===t.type.methods.getTag().replace(/[s]\b/,"")}))?s.replace("e-",""):t.type.methods.getTag().replace("e-",""),"diagram"==a.ej2Instances.getModuleName().toLowerCase()&&-1!=s.indexOf("annotations")&&(s="annotations")),t.children&&(r=a.resolveComplexInnerDirs(t.children,e[i],t.type.methods.getTag()),o[s]||(o[s]=[]),r.length>1?o[s]=r:o[s].push(r)),n.length>1?(o=0!=Object.keys(o).length||o.length?o:[],t.props&&o.push(t.props)):o=t.props?Object.assign(o,t.props):o},a=this,l=0,h=n=t.default?t.default():t;l<h.length;l++){s(h[l])}return o},e.prototype.resolveComplexInnerDirs=function(t,e,i){for(var r,n=[],o=(n=t.default?t.default():t).length>1?[]:{},s=0,a=n;s<a.length;s++){var l=a[s],h=l.type.methods.getTag().replace("e-","");l.children&&(r=this.resolveMultilevelComplexInnerDirs(l.children,e[i],l.type.methods.getTag()),/[s]\b/.test(h)||n.length>1?/[s]\b/.test(h)?(o[h]=o[h]?o[h]:[],r.length?o[h]=r:o[h].push(r)):r&&o.push(r):o=r||o),n.length>1&&l.props&&o.length>=0?o.push(l.props):o=l.props?Object.assign(o,l.props):o}return o},e.prototype.resolveMultilevelComplexInnerDirs=function(t,e,i){for(var r,n=[],o=(n=t.default?t.default():t).length>1?[]:{},s=0,a=n;s<a.length;s++){var l=a[s],h=l.type.methods.getTag().replace("e-","");l.children&&(r=this.resolveComplexInnerDirs(l.children,e[i],l.type.methods.getTag())),/[s]\b/.test(h)?(o[h]=o[h]?o[h]:[],r.length?o[h]=r:o[h].push(r),l.props&&o[h].push(l.props)):(o=r,o=l.props?Object.assign(o,l.props):o)}return o},e.prototype.getDirectiveValues=function(t,e,i){var r=Object.keys(e),n={};if(t)for(var o=0,s=t;o<s.length;o++){var a=s[o];if(a.componentOptions&&a.componentOptions.children&&a.componentOptions.tag){var l=a.componentOptions.tag;if(-1!==r.indexOf(l)){var h=i[l]?i[l]:l;n[h.replace("e-","")]=[];for(var u=0,c=a.componentOptions.children;u<c.length;u++){var p=c[u],d=this.getVNodeValue(p,e[l],i);0!==Object.keys(d).length&&n[h.replace("e-","")].push(d)}}}}return n},e.prototype.getMultiLevelDirValue=function(t,e,i){for(var r={},n=0,o=t;n<o.length;n++){var s=o[n];if(s.componentOptions){var a=s.componentOptions.tag,l=i[a]?i[a]:a;if(r[l.replace("e-","")]=[],s.componentOptions&&s.componentOptions.children)for(var h=0,u=s.componentOptions.children;h<u.length;h++){var c=u[h],p=this.getVNodeValue(c,e[a],i);0!==Object.keys(p).length&&r[l.replace("e-","")].push(p)}}}return r},e.prototype.getVNodeValue=function(t,e,i){var r={};if(t.componentOptions){var n=t.componentOptions.tag;"string"==typeof e&&n===e&&t.data?r=t.data.attrs?this.getCamelCaseProps(t.data.attrs):this.getCamelCaseProps(t.data):"object"==typeof e&&(t.componentOptions.children&&-1!==Object.keys(e).indexOf(n)&&(r=this.getMultiLevelDirValue(t.componentOptions.children,e[n],i)),t.data&&t.data.attrs&&(r=u(r,this.getCamelCaseProps(t.data.attrs))))}return r},e.prototype.getCamelCaseProps=function(t){for(var e={},i=0,r=Object.keys(t);i<r.length;i++){var n=r[i];e[n.replace(/-[a-z]/g,function(t){return t[1].toUpperCase()})]=t[n]}return e},e.prototype.dataBind=function(){this.ej2Instances.dataBind()},e.prototype.setProperties=function(t,e){return this.ej2Instances.setProperties(t,e)},e}((!yu||parseInt(gu.version),Be)),vu=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured"],wu=ct();ut({compile:function(t,e){var i=this;return function(r,n,s,a,l){var h;if(n){var c=n.vueInstance?n.vueInstance.plugins:null,p=d("templateParentDiv"),f=d("templateDiv"),g=w("div",{id:p,innerHTML:'<div id="'+f+'"></div>'});if(document.body.appendChild(g),mu&&"string"==typeof t){var m=function(t,e,i){if(t||i&&i.vueInstance)return xe(i&&i.vueInstance?i.vueInstance.$slots:t.$slots,e)}(n.vueInstance,t,l);if(!m)return B(g),wu(t,e)(r);var y=gu.createApp({render:function(){return m[t]({data:r})}});if(c)for(var b=0;b<c.length;b++)y.use(c[b]);y.mount("grid"===n.getModuleName()?"#"+p:"#"+f),h=g.childNodes,B(g)}else if(mu){var v=k=t.call(i,{}),S=o("template.propsData",k),P={data:{data:u(k.data||{},r)},parent:n.vueInstance};v.template||(v.template=v[Object.keys(v)[0]]);var C=void 0;if(v.template.extends)C=v.template.extends._context.components.template;else if(!(C=v.template._context.components[t.name])){var x=Object.keys(v.template._context.components)[0];C=v.template._context.components[x]}var O;if(S)O=Object.assign(C.data(),S);else if(O=Object.assign(C.data(),P.data),C.components)for(var L=function(t){var e=C.components[t];if(e&&e.data){var i=Object.assign(e.data(),P.data);e.data=function(){return i}}},T=0,M=Object.keys(C.components)||[];T<M.length;T++)L(M[T]);if(C.data=function(){return O},y=gu.createApp(C),c)for(b=0;b<c.length;b++)y.use(c[b]);y.mount("grid"===n.getModuleName()?"#"+p:"#"+f),h=g.childNodes,B(g)}else if("string"==typeof t){var D=function(t,e,i){if(t||i&&i.vueInstance)return Pe(i&&i.vueInstance?i.vueInstance:t,e)}(n.vueInstance,t,l);if(!D)return B(g),wu(t,e)(r);new Be({render:function(){return D[t]({data:r})}}).$mount("#"+f),h=g.childNodes,B(g)}else{var k,E=(k=t.call(i,{})).template;if(S=o("template.propsData",k),P={data:{data:u(k.data||{},r)},parent:n.vueInstance},S&&(E=k.template.extends,P.propsData=S),"function"!=typeof E&&(E=Be.extend(E)),new E(P).$mount("#"+f),h=g.childNodes,n.vueInstance){var j=n.vueInstance.templateCollection;j||(n.vueInstance.templateCollection={},j=n.vueInstance.templateCollection),s&&(j[s]||(j[s]=[]),j[s].push(h[0]))}B(g)}}return h||[]}}});var Su,Pu,Cu=!mu,xu=function(t){function e(){return t.call(this,arguments)||this}return pt(e,t),e.prototype.render=function(t){if(mu){var e=mu||t,i=null;return c(this.$slots.default)||(i=mu?this.$slots.default():this.$slots.default),e("div",{class:"e-directive"},i)}},e.prototype.updated=function(){mu&&this.custom&&this.custom()},e.prototype.getTag=function(){return"e-colorMappings"},e=dt([Se({},Cu)],e)}(Su=!Cu||parseInt(gu.version)<3?i.Vue:Be),Ou={name:"e-colorMappings",install:function(t){t.component(Ou.name,xu)}},Bu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return pt(e,t),e.prototype.render=function(){},e.prototype.getTag=function(){return"e-colorMapping"},e=dt([Se({},Cu)],e)}(Su),Lu={name:"e-colorMapping",install:function(t){t.component(Lu.name,Bu)}},Tu=!mu,Mu=function(t){function e(){return t.call(this,arguments)||this}return pt(e,t),e.prototype.render=function(t){if(mu){var e=mu||t,i=null;return c(this.$slots.default)||(i=mu?this.$slots.default():this.$slots.default),e("div",{class:"e-directive"},i)}},e.prototype.updated=function(){mu&&this.custom&&this.custom()},e.prototype.getTag=function(){return"e-levels"},e=dt([Se({},Tu)],e)}(Pu=!Tu||parseInt(gu.version)<3?i.Vue:Be),Du={name:"e-levels",install:function(t){t.component(Du.name,Mu)}},ku=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return pt(e,t),e.prototype.render=function(){},e.prototype.getTag=function(){return"e-level"},e=dt([Se({},Tu)],e)}(Pu),Eu={name:"e-level",install:function(t){t.component(Eu.name,ku)}},ju=["isLazyUpdate","plugins","allowImageExport","allowPdfExport","allowPrint","background","border","breadcrumbConnector","colorValuePath","dataSource","description","drillDownView","enableBreadcrumb","enableDrillDown","enablePersistence","enableRtl","equalColorValuePath","format","height","highlightSettings","initialDrillDown","layoutType","leafItemSettings","legendSettings","levels","locale","margin","palette","query","rangeColorValuePath","renderDirection","selectionSettings","tabIndex","theme","titleSettings","tooltipSettings","useGroupingSeparator","weightValuePath","width","beforePrint","click","doubleClick","drillEnd","drillStart","itemClick","itemHighlight","itemMove","itemRendering","itemSelected","legendItemRendering","legendRendering","load","loaded","mouseMove","resize","rightClick","tooltipRendering"],Iu=[],Ru=function(t){if(void 0===t&&(t={}),t.props)for(var e=function(e){(t.newprops||(t.newprops={}))[e]={},(t.watch||(t.watch={}))[e]=function(i){this.ej2Instances[e]=i,this.dataBind&&"DateRangePickerComponent"!==t.name&&this.dataBind()}},i=0,r=t.props;i<r.length;i++)e(r[i]);return[t.newprops,t.watch]}({props:ju})[1],Au=Object.keys(Ru);Au.push("modelchanged","update:modelValue");for(var Nu=0,Fu=Iu;Nu<Fu.length;Nu++){var Vu=Fu[Nu];Au.push("update:"+Vu)}var zu=!mu,Gu=function(t){function e(){var e=t.call(this,arguments)||this;return e.propKeys=ju,e.models=Iu,e.hasChildDirective=!0,e.hasInjectedModules=!0,e.tagMapper={"e-levels":{"e-level":{"e-colorMappings":"e-colorMapping"}}},e.tagNameMapper={"e-colorMappings":"e-colorMapping"},e.isVue3=!zu,e.ej2Instances=new au({}),e.bindProperties(),e.ej2Instances._setProperties=e.ej2Instances.setProperties,e.ej2Instances.setProperties=e.setProperties,e.ej2Instances.clearTemplate=e.clearTemplate,e.updated=e.updated,e}return pt(e,t),e.prototype.clearTemplate=function(t){if(t||(t=Object.keys(this.templateCollection||{})),t.length&&this.templateCollection)for(var e=0,i=t;e<i.length;e++){var r=i[e],n=this.templateCollection[r];if(n&&n.length){for(var s=0,a=n;s<a.length;s++){var l=a[s];o("__vue__.$destroy",l)&&l.__vue__.$destroy(),l.innerHTML&&(l.innerHTML="")}delete this.templateCollection[r]}}},e.prototype.setProperties=function(t,e){var i=this;this.isVue3&&(this.models=this.models?this.models:this.ej2Instances.referModels),this.ej2Instances&&this.ej2Instances._setProperties&&this.ej2Instances._setProperties(t,e),t&&this.models&&this.models.length&&Object.keys(t).map(function(e){i.models.map(function(r){e!==r||/datasource/i.test(e)||(i.isVue3?i.ej2Instances.vueInstance.$emit("update:"+e,t[e]):(i.$emit("update:"+e,t[e]),i.$emit("modelchanged",t[e])))})})},e.prototype.render=function(t){var e=mu||t,i=null;return c(this.$slots.default)||(i=mu?this.$slots.default():this.$slots.default),e("div",i)},e.prototype.custom=function(){this.updated()},e.prototype.calculatePreviousLevelChildItems=function(t,e,i,r){return this.ej2Instances.calculatePreviousLevelChildItems(t,e,i,r)},e.prototype.calculateSelectedTextLevels=function(t,e){return this.ej2Instances.calculateSelectedTextLevels(t,e)},e.prototype.clickOnTreeMap=function(t){return this.ej2Instances.clickOnTreeMap(t)},e.prototype.compareSelectedLabelWithDrillDownItems=function(t,e,i){return this.ej2Instances.compareSelectedLabelWithDrillDownItems(t,e,i)},e.prototype.doubleClickOnTreeMap=function(t){return this.ej2Instances.doubleClickOnTreeMap(t)},e.prototype.export=function(t,e,i,r){return this.ej2Instances.export(t,e,i,r)},e.prototype.findTotalWeight=function(t,e){return this.ej2Instances.findTotalWeight(t,e)},e.prototype.mouseDownOnTreeMap=function(t){return this.ej2Instances.mouseDownOnTreeMap(t)},e.prototype.mouseEndOnTreeMap=function(t){return this.ej2Instances.mouseEndOnTreeMap(t)},e.prototype.mouseLeaveOnTreeMap=function(t){return this.ej2Instances.mouseLeaveOnTreeMap(t)},e.prototype.mouseMoveOnTreeMap=function(t){return this.ej2Instances.mouseMoveOnTreeMap(t)},e.prototype.print=function(t){return this.ej2Instances.print(t)},e.prototype.reOrderLevelData=function(t){return this.ej2Instances.reOrderLevelData(t)},e.prototype.resizeOnTreeMap=function(t){return this.ej2Instances.resizeOnTreeMap(t)},e.prototype.rightClickOnTreeMap=function(t){return this.ej2Instances.rightClickOnTreeMap(t)},e.prototype.selectItem=function(t,e){return this.ej2Instances.selectItem(t,e)},e=dt([Se({props:ju},zu)],e)}(bu),_u={name:"ejs-treemap",install:function(t){t.component(_u.name,Gu),t.component(Eu.name,ku),t.component(Du.name,Mu),t.component(Lu.name,Bu),t.component(Ou.name,xu)}};au.Inject(du,hu,uu,cu,Jn,nu,Xn);var Hu=Object.freeze({ColorMappingsDirective:xu,ColorMappingDirective:Bu,ColorMappingsPlugin:Ou,ColorMappingPlugin:Lu,LevelsDirective:Mu,LevelDirective:ku,LevelsPlugin:Du,LevelPlugin:Eu,TreeMapComponent:Gu,TreeMapPlugin:_u,TreeMap:au,LevelsData:lu,Border:cn,Margin:pn,Font:dn,CommonTitleSettings:fn,SubTitleSettings:gn,TitleSettings:mn,ColorMapping:yn,LegendSettings:bn,InitialDrillSettings:vn,LeafItemSettings:wn,TooltipSettings:Sn,SelectionSettings:Pn,HighlightSettings:Cn,LevelSettings:xn,load:"load",loaded:"loaded",beforePrint:Xr,itemRendering:Qr,drillStart:Zr,drillEnd:"drillEnd",itemSelected:tn,itemHighlight:en,tooltipRendering:rn,itemClick:"itemClick",itemMove:"itemMove",click:"click",doubleClick:nn,rightClick:on,mouseMove:"mouseMove",legendItemRendering:sn,legendRendering:an,resize:"resize",defaultFont:ln,get Theme(){return _i},getThemeStyle:ve,Size:On,stringToNumber:vt,Rect:Bn,RectOption:Ln,PathOption:Tn,measureText:wt,TextOption:Mn,textTrim:St,Location:Dn,findPosition:Pt,createTextStyle:Ct,renderTextElement:xt,setItemTemplateContent:Ot,getElement:Bt,itemsToOrder:Lt,isContainsData:Tt,findChildren:Mt,findHightLightItems:Dt,getTemplateFunction:kt,convertElement:Et,findLabelLocation:jt,measureElement:It,getArea:Rt,getShortestEdge:At,convertToContainer:Nt,convertToRect:Ft,getMousePosition:Vt,colorMap:zt,deSaturationColor:Gt,colorCollections:_t,rgbToHex:Ht,getColorByValue:Wt,getGradientColor:Ut,getPercentageColor:qt,getPercentage:Kt,wordWrap:Yt,textWrap:$t,hide:Jt,orderByArea:Xt,maintainSelection:Qt,legendMaintain:Zt,removeClassNames:te,applyOptions:ee,textFormatter:ie,formatValue:re,ColorValue:kn,convertToHexCode:ne,componentToHex:oe,convertHexToColor:se,colorNameToHex:ae,drawSymbol:le,renderLegendShape:he,isParentItem:ue,TreeMapAjax:En,removeShape:ce,removeLegend:pe,setColor:de,removeSelectionWithHighlight:fe,getLegendIndex:ge,pushCollection:me,triggerDownload:ye,removeElement:be,TreeMapLegend:hu,LayoutPanel:jn,TreeMapHighlight:uu,TreeMapSelection:cu,TreeMapTooltip:du,ImageExport:Xn,PdfExport:nu,Print:Jn});return t.base=Ir,t.treemap=Hu,t}({},Vue,Vue3);if(this.ejs=ej,window.Vue)for(var packages=Object.keys(ejs),i=0;i<packages.length;i++)for(var pack=packages[i],packKeys=Object.keys(ejs[pack]),j=0;j<packKeys.length;j++){var packKey=packKeys[j];/Plugin/.test(packKey)&&Vue.use(ejs[pack][packKey])}"object"==typeof module&&"object"==typeof module.exports&&(module.exports={ej:ej}),"function"==typeof define&&define.amd&&define("ej",[],function(){return{ej:ej}});
|