@syncfusion/ej2-vue-treemap 19.3.43 → 19.4.52

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.
@@ -1,10 +1,10 @@
1
1
  /*!
2
2
  * filename: ej2-vue-treemap.min.js
3
- * version : 19.3.43
3
+ * version : 19.4.52
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,h=o.length;for(r=0;r<h;r++)n=o[r],r+1===h?a[n]=void 0===e?{}:e:c(a[n])&&(a[n]={}),a=a[n];return s}function a(t,e){delete t[e]}function h(t){return!c(t)&&t.constructor==={}.constructor}function l(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)||!h(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,l=!b()||!(o instanceof Event||a);r&&l&&(h(s)||Array.isArray(s))?h(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,l=1;l<o;l++)s(l);return n}function c(t){return void 0===t||null===t}function p(t){return void 0===t}function d(t){return t+"_"+Pe++}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="";c(e)&&(e=window.open("","print","height=452,width=1024,tabbar=no")),i.appendChild(t.cloneNode(!0));for(var o=0,s=r.length;o<s;o++)n+=r[o].outerHTML;e.document.write("<!DOCTYPE html> <html><head>"+n+"</head><body>"+i.innerHTML+"<script> (function() { window.ready = true; })(); <\/script></body></html>"),e.document.close(),e.focus();var a=setInterval(function(){e.ready&&(e.print(),e.close(),clearInterval(a))},500);return e}function b(){return Ce}function v(){if("undefined"!=typeof window){var t=new Uint16Array(5);return(window.msCrypto||window.crypto).getRandomValues(t)}}function w(t,e){var i=gi.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],l=0,u=i;l<u.length;l++){var p=u[l];if(h(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],l=h(a);if(l?o("attributes.className",a):""!==a.className)for(var u=0,c=i;u<c.length;u++){var p=c[u];if(l){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;fi.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(h(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){if(t.match(/#[0-9]/g)){for(var e=t.split(","),i=0;i<e.length;i++){for(var r=e[i].split(" "),n=0;n<r.length;n++)if(r[n].indexOf("#")>-1&&!r[n].match(/\[.*\]/)){if(r[n].split("#")[1].match(/^\d/)){var o=r[n].split(".");o[0]=o[0].replace(/#/,"[id='")+"']",r[n]=o.join(".")}}e[i]=r.join(" ")}return e.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=[],h=i?i.length:0,l=0;l<h;l++){var u=n;if(s&&(u=n(i[l],t)),o){var c=r(u,[t,e,{},!0]);c.setProperties(i[l],!0),a.push(c)}else a.push(r(u,[t,e,i[l],!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 h=z(o+r.length,null,!this.controlParent,t);this.serverDataBind(h,{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={};l(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 J(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)),h=Math.max(Math.abs(s-n.top),Math.abs(s-n.bottom)),l=Math.sqrt(a*a+h*h),u=2*l+"px",c=o-n.left-l,p=s-n.top-l;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&&fi.add(r,"mouseleave",Q,{parent:this.parent,rippleOptions:this.rippleOptions})}}function X(t){$(t,this)}function Q(t){$(t,this)}function $(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&&fi.remove(o,"mouseleave",Q),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,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(Xi,"").replace(sr,"'$1'").replace(hr,function(t,s,a,h){var l=s.match(rr);if(l){var u=l[1];if(Zi.test(s))s='";} '+s.replace(l[1],u.replace(or,function(t){return t=t.trim(),tt(t,!Qi.test(t)&&-1===o.indexOf(t),e,o,r)}))+'{ \n str = str + "';else if($i.test(s))s='"; '+s.replace(l[1],u.replace(ar,function(t){return rt(t,e,o,r)}))+'{ \n str = str + "';else if(er.test(s)){var c=l[1].split(" of ");s='"; '+s.replace(l[1],function(t){return o.push(c[0]),o.push(c[0]+"Index"),"var i"+(n+=1)+"=0; i"+n+" < "+tt(c[1],!0,e,o,r)+".length; i"+n+"++"})+"{ \n "+c[0]+"= "+tt(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=l[1].split(",");0===l[1].length||/data/.test(f[0])||/window./.test(f[0])||(l[1]="global"===d?e+"."+l[1]:l[1]);if(dr.test(s)&&/\]\./gm.test(s)||/@|\$|#/gm.test(s)){/@|\$|#|\]\./gm.test(s)&&(s='"+ '+("global"===d?"":d)+s.replace(l[1],u.replace(pr,function(t){return rt(t,e,o,r)}))+'+ "')}else s='" + '+("global"===d?"":d)+s.replace(u,tt(l[1].replace(/,( |)data.|,/gi,","+e+".").replace(/,( |)data.window/gi,",window"),"global"!==d,e,o,r))+'+"'}}else tr.test(s)?s='"; '+s.replace(tr,'} else { \n str = str + "'):s.match(ir)?s=s.replace(ir,'"; \n } \n str = str + "'):/@|#|\$/gm.test(s)?(s.match(ur)&&(s=it(s)),s='"+'+et(s,-1===o.indexOf(s),e,o)+'"]+"'):s=s.match(ur)?'"+'+et(s=it(s),-1===o.indexOf(s),e,o)+'"]+"':'"+'+tt(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(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 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 return str;";return new Function("data",r).bind(e)}function tt(t,e,i,r,n){return!e||nr.test(t)||-1!==r.indexOf(t.split(".")[0])||n?t:i+"."+t}function et(t,e,i,r){return e&&!nr.test(t)&&-1===r.indexOf(t.split(".")[0])?i+'["'+t:t}function it(t){return t=t.match(cr)?t:t.replace(ur,"\\\\")}function rt(t,e,i,r){t=t.trim();if(/\window\./gm.test(t))return t;var n=/'|"/gm;return/@|\$|#/gm.test(t)&&(t=et(t,-1===i.indexOf(t),e,i)+'"]'),lr.test(t)?function(t,e,i,r){return!e||nr.test(t)||-1!==r.indexOf(t.split(".")[0])||/^\..*/gm.test(t)?t:i+"."+t}(t,!n.test(t)&&-1===i.indexOf(t),e,i):tt(t,!n.test(t)&&-1===i.indexOf(t),e,i,r)}function nt(){return"-"+Math.random().toString(36).substr(2,5)}function ot(t,e,i){var r=yr.compile(t,e,i);return function(t,e,i,n,o,s,a){var h=r(t,e,i,a),l="BlazorTemplateId";if(b()&&!o){var u=n+nt();if(mr[n]||(mr[n]=[]),c(s))t[l]=u,mr[n].push(t);else for(var p=0,d=Object.keys(mr[n][s]);p<d.length;p++){var f=d[p];f!==l&&t[f]&&(mr[n][s][f]=t[f]),f===l&&(u=mr[n][s][f])}return"rowTemplate"===i?[w("tr",{id:u,className:"e-blazor-template"})]:[w("div",{id:u,className:"e-blazor-template"})]}if("string"==typeof h){if(gr.test(h)){return w("svg",{innerHTML:h}).childNodes}return w(fr.test(h)?"table":"div",{innerHTML:h}).childNodes}return h}}function st(t,e,i,r,n){if(b()){window.sfBlazor.updateTemplate(e,mr[t],t,i,n),!1!==r&&(mr[t]=[])}}function at(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 h=a.childNodes.length,l=0;l<h;l++)c(i)?n[o].appendChild(a.childNodes[0]):(n[i].appendChild(a.childNodes[0]),o=n.length)}}function ht(t){yr.compile=t.compile}function lt(){return yr.compile}function ut(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 ct(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 pt(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 Or(r.clientWidth,r.clientHeight)}function dt(t){return document.getElementById(t)}function ft(t){var e=dt(t);e&&L(e)}function gt(t,e,i,r,n,o){var s=new Cr(""),a=function(t,e,i,r,n){var o,s="Path",a=e.width,h=e.height,u=t.x,c=t.y,p=t.x+-a/2,d=t.y+-h/2;switch(i){case"Circle":case"Bubble":s="Ellipse",l(r,{rx:a/2,ry:h/2,cx:u,cy:c});break;case"Cross":l(r,{d:o="M "+p+" "+c+" L "+(u+a/2)+" "+c+" M "+u+" "+(c+h/2)+" L "+u+" "+(c+-h/2)});break;case"HorizontalLine":l(r,{d:o="M "+p+" "+c+" L "+(u+a/2)+" "+c});break;case"VerticalLine":l(r,{d:o="M "+u+" "+(c+h/2)+" L "+u+" "+(c+-h/2)});break;case"Diamond":l(r,{d:o="M "+p+" "+c+" L "+u+" "+(c+-h/2)+" L "+(u+a/2)+" "+c+" L "+u+" "+(c+h/2)+" L "+p+" "+c+" z"});break;case"Rectangle":l(r,{d:o="M "+p+" "+(c+-h/2)+" L "+(u+a/2)+" "+(c+-h/2)+" L "+(u+a/2)+" "+(c+h/2)+" L "+p+" "+(c+h/2)+" L "+p+" "+(c+-h/2)+" z"});break;case"Triangle":l(r,{d:o="M "+p+" "+(c+h/2)+" L "+u+" "+(c+-h/2)+" L "+(u+a/2)+" "+(c+h/2)+" L "+p+" "+(c+h/2)+" z"});break;case"InvertedTriangle":l(r,{d:o="M "+(u+a/2)+" "+(c-h/2)+" L "+u+" "+(c+h/2)+" L "+(u-a/2)+" "+(c-h/2)+" L "+(u+a/2)+" "+(c-h/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=h/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"),l(r,{d:o});break;case"Image":s="Image",l(r,{href:n,height:h,width:a,x:p,y:d})}return{renderOption:r,functionName:s}}(t,i,e,n,r),h=s["draw"+a.functionName](a.renderOption);return h.setAttribute("aria-label",o),h}function mt(t,e){return null!==t&&void 0!==t?-1!==t.indexOf("%")?e/100*parseInt(t,10):parseInt(t,10):null}function yt(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 dn(i.clientWidth,i.clientHeight)}function bt(t,e,i){var r=e,n=yt(e,i).width;if(n>t)for(var o=e.length-1;o>=0;--o)if(r=e.substring(0,o)+"...",(n=yt(r,i).width)<=t||r.length<4)return r.length<4&&(r=" "),r;return r}function vt(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 bn(n,o)}function wt(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 St(t,e,i,r,n){void 0===n&&(n=!1);var o,s,a,h={"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},l="string"==typeof t.text?t.text:n?t.text[t.text.length-1]:t.text[0],u=new Cr("");if(!c(l)&&!c(t.connectorText)&&l.search(t.connectorText[1])>=0)for(var p=l.split("#"),d=0;d<p.length;d++){var f=-1===p[d].search(t.connectorText)||c(t.connectorText)?p[d]:t.connectorText;if(h.id=t.id+"_"+d,a=wt(u,h,f),d%2==0&&0!==d){f=f.replace(/\s+/g,"&nbsp")}var g=yt(f,e);h.x=0!==d?h.x+g.width:h.x+g.width+5,r.appendChild(a)}else a=wt(u,h,l),r.appendChild(a);if("string"!=typeof t.text&&t.text.length>1){for(var m=1,y=t.text.length;m<y;m++)s=yt(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 Pt(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 Ct(t){return document.getElementById(t)}function xt(t,e){return t.weight===e.weight?0:t.weight<e.weight?1:-1}function Ot(t,e,i,r){for(var n=!1,o="",s=r.leafItemSettings,a=0;a<t.length;a++){var h=i[r.levels[a]?r.levels[a].groupPath:s.labelPath?s.labelPath:r.weightValuePath]||"undefined";if(t[a]===h&&(o+=h+(a===t.length-1?"":"#"))===e){n=!0;break}}return n}function Bt(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 Lt(t,e,i,r){if("Child"===i){e.push(t.levelOrderName);var n=Bt(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++)Lt(n[s],e,i,r)}}else if("Parent"===i)"string"==typeof t.levelOrderName&&-1===e.indexOf(t.levelOrderName)&&(e.push(t.levelOrderName),Lt(t.parent,e,i,r));else if("All"===i){var a=t.levelOrderName.split("#")[0],h=void 0;for(o=0;o<r.layout.renderItems.length;o++)(h=r.layout.renderItems[o]).levelOrderName.indexOf(a)>-1&&-1===e.indexOf(h.levelOrderName)&&e.push(h.levelOrderName)}else e.push(t.levelOrderName);return e}function Tt(t){var e=null;try{document.querySelectorAll(t).length&&(e=ot(document.querySelector(t).innerHTML.trim()))}catch(i){e=ot(t)}return e}function Mt(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 Dt(t,e,i,r,n){var o=new bn(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 kt(t,e){var i=new dn(0,0);if(!c(e)){e.appendChild(t),i.height=t.offsetHeight,i.width=t.offsetWidth;var r=document.getElementById(t.id);r.parentNode.removeChild(r)}return i}function Et(t){return(t.width-t.x)*(t.height-t.y)}function jt(t){var e=It(t),i=e.width,r=e.height;return Math.min(i,r)}function It(t){var e=t.x,i=t.y;return{x:e,y:i,width:t.width-e,height:t.height-i}}function Rt(t){var e=t.x,i=t.y;return{x:e,y:i,width:e+t.width,height:i+t.height}}function At(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,h=r.left+n-a,l=r.top+o-s;return new bn(t-h,e-l)}function Nt(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 h=!1,l=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&&(h=!0),n="[object Array]"===Object.prototype.toString.call(t[a].color)?h?t[a].color[0]:Vt(t[a],l):t[a].color):i>=t[a].from&&t[a].to>=i&&t[a].value===e&&(h=!0,n="[object Array]"===Object.prototype.toString.call(t[a].color)?h?t[a].color[0]:Vt(t[a],l):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=Ft(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 Ft(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 Vt(t,e){return Gt(t,e)}function zt(t,e,i){return"#"+ie(t)+ie(e)+ie(i)}function Gt(t,e){var i;return Number(e)===t.from?t.color[0]:Number(e)===t.to?t.color[t.color.length-1]:zt((i=_t(Number(e),t)).r,i.g,i.b)}function _t(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]:ne(e.color[0]),a="#"===e.color[e.color.length-1].charAt(0)?e.color[e.color.length-1]:ne(e.color[e.color.length-1]);else{s="#"===e.color[0].charAt(0)?e.color[0]:ne(e.color[0]),a="#"===e.color[e.color.length-1].charAt(0)?e.color[e.color.length-1]:ne(e.color[e.color.length-1]);for(var h=o/(e.color.length-1),l=e.color.length-1,u=[],c={},p=1;p<l;p++)c={b:i+p*h,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:ne(u[d].color),n=t<u[d].b?1-Math.abs((t-u[d].b)/h):(t-u[d].b)/h):u[d].b<=t&&t<=r&&d===u.length-1&&(s="#"===u[d].color.charAt(0)?u[d].color:ne(u[d].color),n=t<u[d].b?1-Math.abs((t-u[d].b)/h):(t-u[d].b)/h),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:ne(u[d].color),a="#"===u[d+1].color.charAt(0)?u[d+1].color:ne(u[d+1].color),n=Math.abs(t-u[d+1].b)/h)}return Ht(n,s,a)}function Ht(t,e,i){var r=i.split("#")[1],n=e.split("#")[1],o=Wt(t,parseInt(n.substr(0,2),16),parseInt(r.substr(0,2),16)),s=Wt(t,parseInt(n.substr(2,2),16),parseInt(r.substr(2,2),16)),a=Wt(t,parseInt(n.substr(4,2),16),parseInt(r.substr(4,2),16));return new vn(o,s,a)}function Wt(t,e,i){var r=i-e;return Math.round(e+r*t)}function Ut(t,e,i){for(var r,n=e.split(" "),o="",s=[],a=0,h=n.length;a<h;a++)r=n[a],yt(o.concat(r),i).width<t?o=o.concat((""===o?"":" ")+r):""!==o?(s.push(bt(t,o,i)),o=r):(s.push(bt(t,r,i)),r=""),o&&a===h-1&&s.push(bt(t,o,i));return s}function qt(t,e,i){var r=[],n=0,o=yt(e,i).width,s=e.length;if(t>=o)return r.push(e),r;for(var a=e.length;a>n;a--){var h=e.slice(n,a);if((o=yt(h,i).width)<=t){if(r.push(h),n+=h.length,s===n)return r;a=s+1}}return r}function Kt(t,e,i,r){var n=yt(i,r);return n.width>t||n.height>e?" ":i}function Yt(t,e){return t.itemArea===e.itemArea?0:t.itemArea<e.itemArea?1:-1}function Jt(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),$t(e.childNodes[0],{border:t.selectionSettings.border,fill:t.selectionSettings.fill,opacity:t.selectionSettings.opacity})):e.setAttribute("class","")}function Xt(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 Qt(t,e,i){for(var r,n=0;n<t.length;n++)$t(r=c(t[n].childNodes[0])?t[n]:t[n].childNodes[0],i.layout.renderItems[r.id.split("_")[6]].options),t[n].classList.remove(e),n-=1}function $t(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 Zt(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(te(e[o],i).toString())}return t}function te(t,e){return(e.format&&!isNaN(Number(t))?e.intl.getNumberFormat({format:e.format,useGrouping:e.useGroupingSeparator})(Number(t)):t)||""}function ee(t){return"#"+ie(t.r)+ie(t.g)+ie(t.b)}function ie(t){var e=t.toString(16);return 1===e.length?"0"+e:e}function re(t){var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?new vn(parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)):new vn(255,255,255)}function ne(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 ee(new vn(parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)))}function oe(t,e,i,r,n,o){var s=new Cr(""),a=se(t,i,e,n,r),h=s["draw"+a.functionName](a.renderOption);return h.setAttribute("aria-label",o),h}function se(t,e,i,r,n){var o,s="Path",a=e.width,h=e.height,u=t.x,c=t.y,p=t.x+-a/2,d=t.y+-h/2;switch(i){case"Circle":case"Bubble":s="Ellipse",l(r,{rx:a/2,ry:h/2,cx:u,cy:c});break;case"VerticalLine":l(r,{d:o="M "+u+" "+(c+h/2)+" L "+u+" "+(c+-h/2)});break;case"Diamond":l(r,{d:o="M "+p+" "+c+" L "+u+" "+(c+-h/2)+" L "+(u+a/2)+" "+c+" L "+u+" "+(c+h/2)+" L "+p+" "+c+" z"});break;case"Rectangle":l(r,{d:o="M "+p+" "+(c+-h/2)+" L "+(u+a/2)+" "+(c+-h/2)+" L "+(u+a/2)+" "+(c+h/2)+" L "+p+" "+(c+h/2)+" L "+p+" "+(c+-h/2)+" z"});break;case"Triangle":l(r,{d:o="M "+p+" "+(c+h/2)+" L "+u+" "+(c+-h/2)+" L "+(u+a/2)+" "+(c+h/2)+" L "+p+" "+(c+h/2)+" z"});break;case"InvertedTriangle":l(r,{d:o="M "+(u+a/2)+" "+(c-h/2)+" L "+u+" "+(c+h/2)+" L "+(u-a/2)+" "+(c-h/2)+" L "+(u+a/2)+" "+(c-h/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)+" ");l(r,{d:o=o.concat("Z")});break;case"Star":l(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":l(r,{d:o="M "+p+" "+c+" L "+(u+a/2)+" "+c+" M "+u+" "+(c+h/2)+" L "+u+" "+(c+-h/2)});break;case"Image":s="Image",l(r,{href:n,height:h,width:a,x:p,y:d})}return{renderOption:r,functionName:s}}function ae(t,e){for(var i=!1,r=0;r<t.length;r++)if(e.levelOrderName===t[r].levelOrderName){i=!0;break}return i}function he(t,e){if(t.length>0)for(var i=0;i<t.length;i++){var r=t[i];ue(r.legendEle,r.oldFill,r.oldOpacity,r.oldBorderColor,r.oldBorderWidth)}}function le(t,e){if(t.length>0)for(var i=0;i<t.length;i++){var r=t[i];ue(r.legendEle,r.oldFill,r.oldOpacity,r.oldBorderColor,r.oldBorderWidth);for(var n=r.ShapeCollection.Elements.length,o=0;o<n;o++)ue(r.ShapeCollection.Elements[o],r.shapeOldFill,r.shapeOldOpacity,r.shapeOldBorderColor,r.shapeOldBorderWidth)}}function ue(t,e,i,r,n){t.setAttribute("fill",e),t.setAttribute("opacity",i),t.setAttribute("stroke",r),t.setAttribute("stroke-width",n)}function ce(t,e,i){he(t),Qt(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",i)}function pe(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 de(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 fe(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 ge(t){var e=document.getElementById(t);return e?L(e):null}function me(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;default:e={backgroundColor:"#FFFFFF",titleFontColor:"#424242",subTitleFontColor:"#424242",tooltipFillColor:"#363F4C",tooltipFontColor:"#ffffff",legendTitleColor:"#353535",legendTextColor:"#353535",fontFamily:"Roboto, Noto, Sans-serif"}}return e}function ye(t,e){if(null===t||void 0===t)throw new Error("ArgumentException: "+e+" cannot be null or undefined")}function be(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(au.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(su.prototype).forEach(function(t){au.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 h=Object.getPrototypeOf(t.prototype);return(h instanceof we?h.constructor:we).extend(e)}(e,t)}}window.process={env:{NODE_ENV:"production"}};var ve,we=e.default,Se="ej2_instances",Pe=0,Ce=!1,xe={latn:{_digits:"0123456789",_type:"numeric"}},Oe={decimal:".",group:",",percentSign:"%",plusSign:"+",minusSign:"-",infinity:"∞",nan:"NaN",exponential:"E"},Be=[0,1,2,3,4,5,6,7,8,9],Le=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(Oe);i<r.length;i++){var n=r[i];e[t[n]]=Oe[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,Be),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,h=Be;a<h.length;a++){var l=h[a];r.mapper[l]=s[l]}}return r},t.nPair="numericPair",t.nRegex="numericRegex",t.numberingSystems=xe,t}(),Te={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),h=a-Math.floor(a/4)-2,l=Math.floor(365.25*(s+4716))+Math.floor(30.6001*(o+1))+i-h-1524,u=l+(h=(a=Math.floor((l-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=l-24e5,g=l-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)),h=Math.floor((a-122.1)/365.25),l=Math.floor(365.25*h),u=Math.floor((a-l)/30.6001),c=a-l-Math.floor(30.6001*u),p=u-(u>13.5?13:1),d=h-(p>2.5?4716:4715);return d<=0&&p--,new Date(d+"/"+p+"/"+c)}}(ve||(ve={}));var Me,De=/\/MMMMM|MMMM|MMM|a|LLLL|LLL|EEEEE|EEEE|E|K|cccc|ccc|WW|W|G+|z+/gi,ke=["sun","mon","tue","wed","thu","fri","sat"],Ee={m:"getMinutes",h:"getHours",H:"getHours",s:"getSeconds",d:"getDate",f:"getMilliseconds"},je={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"},Ie=function(){function t(){}return t.dateFormat=function(t,e,i){var r=this,n=Me.getDependables(i,t,e.calendar),s=o("parserObject.numbers",n),a=n.dateObject,h={isIslamic:Me.islamicRegex.test(e.calendar)};b()&&e.isServerRendered&&(e=Me.compareBlazorDateFormats(e,t));var l=e.format||Me.getResultantPattern(e.skeleton,n.dateObject,e.type,!1,b()?t:"");if(h.dateSeperator=b()?o("dateSeperator",a):Me.getDateSeparator(n.dateObject),p(l))m("Format options or type given must be invalid");else{l=Me.ConvertDateToWeekFormat(l),b()&&(l=l.replace(/tt/,"a")),h.pattern=l,h.numMapper=b()?u({},s):Le.getNumberMapper(n.parserObject,Le.getNumberingSystem(i));for(var c=0,d=l.match(De)||[];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()?h.weekday=o("days."+Me.monthIndex[g],a):h.weekday=n.dateObject[Me.days]["stand-alone"][Me.monthIndex[g]];break;case"M":case"L":b()?h.month=o("months."+Me.monthIndex[g],a):h.month=n.dateObject[Me.month]["stand-alone"][Me.monthIndex[g]];break;case"a":h.designator=b()?o("dayPeriods",a):o("dayPeriods.format.wide",a);break;case"G":var v=g<=3?"eraAbbr":4===g?"eraNames":"eraNarrow";h.era=b()?o("eras",a):o("eras."+v,n.dateObject);break;case"z":h.timeZone=o("dates.timeZoneNames",n.parserObject)}}}return function(t){return isNaN(t.getDate())?null:r.intDateFormatter(t,h)}},t.intDateFormatter=function(t,e){for(var i="",r=e.pattern.match(Me.dateParseRegex),n=this.getCurrentDateValue(t,e.isIslamic),o=0,s=r;o<s.length;o++){var a=s[o],h=a.length,l=a[0];"K"===l&&(l="h");var u=void 0,p="",d=void 0,f=void 0,g="";switch(l){case"M":case"L":u=n.month,h>2?i+=e.month[u]:d=!0;break;case"E":case"c":i+=e.weekday[ke[t.getDay()]];break;case"H":case"h":case"m":case"s":case"d":case"f":if(d=!0,"d"===l)u=n.date;else if("f"===l){d=!1,f=!0;var m=(p=(p=t[Ee[l]]().toString()).substring(0,h)).length;if(h!==m){if(h>3)continue;for(var y=0;y<h-m;y++)p="0"+p.toString()}g+=p}else u=t[Ee[l]]();"h"===l&&(u=u%12||12);break;case"y":f=!0,g+=n.year,2===h&&(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=h<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=Me.getWeekOfYear(t);break;default:i+=a}d&&(f=!0,g=this.checkTwodigitNumber(u,h)),f&&(i+=Le.convertValueParts(g,Me.latnParseRegex,e.numMapper.mapper))}return i},t.getCurrentDateValue=function(t,e){return e?ve.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}(),Re={ms:"minimumSignificantDigits",ls:"maximumSignificantDigits",mf:"minimumFractionDigits",lf:"maximumFractionDigits"},Ae=["infinity","nan","group","decimal","exponential"],Ne=function(){function t(){}return t.numberFormatter=function(t,e,i){var r,n=this,s=u({},e),a={},h={},l=Me.getDependables(i,t,"",!0),c=l.numericObject;h.numberMapper=b()?u({},c):Le.getNumberMapper(l.parserObject,Le.getNumberingSystem(i),!0),h.currencySymbol=b()?o("currencySymbol",c):Me.getCurrencySymbol(l.numericObject,s.currency||Xe,e.altSymbol),h.percentSymbol=b()?o("numberSymbols.percentSign",c):h.numberMapper.numberSymbols.percentSign,h.minusSymbol=b()?o("numberSymbols.minusSign",c):h.numberMapper.numberSymbols.minusSign;var d=h.numberMapper.numberSymbols;if(e.format&&!Me.formatRegex.test(e.format))a=Me.customFormat(e.format,h,l.numericObject);else{if(u(s,Me.getProperNumericSkeleton(e.format||"N")),s.isCurrency="currency"===s.type,s.isPercent="percent"===s.type,b()||(r=Me.getSymbolPattern(s.type,h.numberMapper.numberSystem,l.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,Me.defaultCurrency)),b())a.nData=u({},{},o(s.type+"nData",c)),a.pData=u({},{},o(s.type+"pData",c)),"currency"===s.type&&e.currency&&Me.replaceBlazorCurrency([a.pData,a.nData],h.currencySymbol,e.currency);else{var f=r.split(";");a.nData=Me.getFormatData(f[1]||"-"+f[0],!0,h.currencySymbol),a.pData=Me.getFormatData(f[0],!1,h.currencySymbol),s.useGrouping&&(s.groupSeparator=d[Ae[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[Ae[1]]:isFinite(t)?n.intNumberFormatter(t,a,h):d[Ae[0]]}},t.getGroupingDetails=function(t){var e={},i=t.match(Me.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=Re["l"+n],a=Re["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[Ae[4]])),n=n.replace(".",i.numberMapper.numberSymbols[Ae[3]]),r.useGrouping&&(n=this.groupNumbers(n,r.groupData.primary,r.groupSeparator||",",i.numberMapper.numberSymbols[Ae[3]]||".",r.groupData.secondary)),n=Le.convertValueParts(n,Me.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],h=a.length,l="";h>e;)l=a.slice(h-e,h)+(l.length?i+l:""),h-=e,o&&(e=n,o=!1);return s[0]=a.slice(0,h)+(l.length?i:"")+l,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}(),Fe=/^[0-9]*$/,Ve={minute:"setMinutes",hour:"setHours",second:"setSeconds",day:"setDate",month:"setMonth",milliseconds:"setMilliseconds"},ze=function(){function t(){}return t.dateParser=function(t,e,i){var r=this,n=Me.getDependables(i,t,e.calendar),s=Le.getCurrentNumericOptions(n.parserObject,Le.getNumberingSystem(i),!1,b()),a={};b()&&e.isServerRendered&&(e=Me.compareBlazorDateFormats(e,t));var h,l=e.format||Me.getResultantPattern(e.skeleton,n.dateObject,e.type,!1,b()?t:""),u="";if(p(l))m("Format options or type given must be invalid");else{l=Me.ConvertDateToWeekFormat(l),a={isIslamic:Me.islamicRegex.test(e.calendar),pattern:l,evalposition:{},culture:t};for(var d=l.match(Me.dateParseRegex)||[],f=d.length,g=0,y=0,v=!1,w=s.numericRegex,S=b()?n.parserObject.numbers:Le.getNumberMapper(n.parserObject,Le.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=je[O],M=2===x?"":"?";switch(v&&(g=y,v=!1),O){case"E":case"c":var D=void 0;D=b()?o("days."+Me.monthIndex[x],n.dateObject):n.dateObject[Me.days]["stand-alone"][Me.monthIndex[x]];var k=Le.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."+Me.monthIndex[x],n.dateObject):n.dateObject.months["stand-alone"][Me.monthIndex[x]],a[T]=Le.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]=Le.reverseObject(j),u+="("+Object.keys(a[T]).join("|")+")";break;case"G":L=!0;var I=x<=3?"eraAbbr":4===x?"eraNames":"eraNarrow";a[T]=Le.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=(h=x<4)?"+H;-H":R.hourFormat;A=A.replace(/:/g,S.timeSeparator),u+="("+this.parseTimeZoneRegx(A,R,w)+")?",v=!0,y=h?6:12;break;case"'":u+="("+C.replace(/'/g,"")+")?";break;default:u+="([\\D])"}L&&(a.evalposition[T]={isNumber:B,pos:P+1+g,hourOnly:h}),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,h=e.month,l=n?n+"":"",u=2===l.length;n&&h&&o&&!u||(i=ve.getHijriDate(new Date)),u&&(n=parseInt((i.year+"").slice(0,2)+l,10));var p=ve.toGregorian(n||i.year,h||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 h=a[s],l=t[h];if(p(l)&&"day"===h&&i.setDate(1),!p(l))if("month"===h){if((l-=1)<0||l>11)return new Date("invalid");var u=i.getDate();i.setDate(1),i[Ve[h]](l);var c=new Date(i.getFullYear(),l+1,0).getDate();i.setDate(u<c?u:c)}else{if("day"===h){var d=new Date(i.getFullYear(),i.getMonth()+1,0).getDate();if(l<1||l>d)return null}i[Ve[h]](l)}}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],h=e.evalposition[a],l=r[h.pos];if(h.isNumber)n[a]=this.internalNumberParser(l,i);else if("timeZone"!==a||p(l))l="month"!==a||e.isIslamic||"en"!==e.culture&&"en-GB"!==e.culture&&"en-US"!==e.culture?l:l[0].toUpperCase()+l.substring(1).toLowerCase(),n[a]=e[a][l];else{var u=h.pos,d=void 0,f=r[u+1],g=!p(f);h.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=Le.convertValueParts(t,e.numberParseRegex,e.numericPair),Fe.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}(),Ge=/^([^0-9]*)(([0-9,]*[0-9]+)(\.[0-9]+)?)([Ee][+-]?[0-9]+)?([^0-9]*)$/,_e=/,/g,He=["minusSign","infinity"],We=function(){function t(){}return t.numberParser=function(t,e,i){var r,n=this,s=Me.getDependables(i,t,"",!0),a={custom:!0};Me.formatRegex.test(e.format)||!e.format?(u(a,Me.getProperNumericSkeleton(e.format||"N")),a.custom=!1,a.fractionDigits||e.maximumFractionDigits&&(a.maximumFractionDigits=e.maximumFractionDigits)):u(a,Me.customFormat(e.format,null,null));var h=o("numbers",s.parserObject);r=Le.getCurrentNumericOptions(s.parserObject,Le.getNumberingSystem(i),!0,b()),a.symbolRegex=Le.getSymbolRegex(Object.keys(r.symbolMatch)),a.infinity=r.symbolNumberSystem[He[1]];var l;if(b())a.nData=u({},{},o(a.type+"nData",h)),a.pData=u({},{},o(a.type+"pData",h)),"currency"===a.type&&e.currency&&Me.replaceBlazorCurrency([a.pData,a.nData],o("currencySymbol",h),e.currency);else if(l=Me.getSymbolPattern(a.type,r.numberSystem,s.numericObject,a.isAccount)){var c=(l=l.replace(/\u00A4/g,Me.defaultCurrency)).split(";");a.nData=Me.getFormatData(c[1]||"-"+c[0],!0,""),a.pData=Me.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,h;if(-1!==t.indexOf(e.infinity))return 1/0;t=Le.convertValueParts(t,e.symbolRegex,i.symbolMatch),0===(t=-1!==(t=Le.convertValueParts(t,i.numberParseRegex,i.numericPair)).indexOf("-")?t.replace("-.","-0."):t).indexOf(".")&&(t="0"+t);var l=t.match(Ge);if(c(l))return NaN;s=l[1],o=l[2];var u=l[5];return a=l[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),h=+o,("percent"===e.type||n)&&(h/=100),(e.custom||e.fractionDigits)&&(h=parseFloat(h.toFixed(e.custom?r?e.nData.maximumFractionDigits:e.pData.maximumFractionDigits:e.fractionDigits))),e.maximumFractionDigits&&(h=this.convertMaxFracDigits(o,e,h,r)),r&&(h*=-1),h},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}(),Ue=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 h=a[s];h.handler.call(h.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],h=a.handler.call(a.context,e);if(h&&"function"==typeof h.then){if(!i)return h;h.then(function(h){if(h="string"==typeof h&&o.isJson(h)?JSON.parse(h,o.dateReviver):h,u(e,e,h,!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}(),qe=new Ue,Ke=!1,Ye={},Je="en-US",Xe="USD",Qe=["numericObject","dateObject"],$e=function(){function t(t){t&&(this.culture=t)}return t.prototype.getDateFormat=function(t){return Ie.dateFormat(this.getCulture(),t||{type:"date",skeleton:"short"},Ye)},t.prototype.getNumberFormat=function(t){return t&&!t.currency&&(t.currency=Xe),b()&&t&&!t.format&&(t.minimumFractionDigits=0),Ne.numberFormatter(this.getCulture(),t||{},Ye)},t.prototype.getDateParser=function(t){return ze.dateParser(this.getCulture(),t||{skeleton:"short",type:"date"},Ye)},t.prototype.getNumberParser=function(t){return b()&&t&&!t.format&&(t.minimumFractionDigits=0),We.numberParser(this.getCulture(),t||{format:"N"},Ye)},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 Me.getActualDateTimeFormat(this.getCulture(),t,Ye,e)},t.prototype.getNumberPattern=function(t,e){return Me.getActualNumberFormat(this.getCulture(),t,Ye,e)},t.prototype.getFirstDayOfWeek=function(){return Me.getWeekData(this.getCulture(),Ye)},t.prototype.getCulture=function(){return this.culture||Je},t}(),Ze={"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 h,l=r||"date";if(a)h=s({skeleton:e},a).format||s({skeleton:"d"},"en-US").format;else{if(-1!==t.basicPatterns.indexOf(e)){if(h=o(l+"Formats."+e,i),"dateTime"===l){var u=o("dateFormats."+e,i),c=o("timeFormats."+e,i);h=h.replace("{1}",u).replace("{0}",c)}}else h=o("dateTimeFormats.availableFormats."+e,i);p(h)&&"yMd"===e&&(h="M/d/y")}return h}function i(e,i,r,n){var s={},a=r||"gregorian";if(s.parserObject=Le.getMainObject(e,i)||(b()?t.blazorDefaultObject:t.defaultObject),n)s.numericObject=o("numbers",s.parserObject);else{var h=b()?"dates":"dates.calendars."+a;s.dateObject=o(h,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,Ze);return r||(r=o("en-US."+i,Ze)),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 h(e,i,r,n){var o=n?{}:{nlead:"",nend:""},s=e.match(t.customRegex);if(s){n||(o.nlead=l(s[1],r),o.nend=l(s[10],r),o.groupPattern=s[4]);var a=s[7];if(a&&i){var h=a.match(w);c(h)?o.minimumFraction=0:o.minimumFraction=h.length,o.maximumFraction=a.length-1}}return o}function l(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];o.useGrouping=-1!==a.indexOf(","),a=a.replace(/,/g,"");var h=s[7];if(-1!==a.indexOf("0")&&(o.minimumIntegerDigits=a.length-a.indexOf("0")),c(h)||(o.minimumFractionDigits=h.lastIndexOf("0"),o.maximumFractionDigits=h.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 l=r(o.type,i.numberMapper.numberSystem,n,!1);o.useGrouping&&(o.groupSeparator=i.numberMapper.numberSymbols[S[2]],o.groupData=Ne.getGroupingDetails(l.split(";")[0])),o.nlead=o.nlead.replace(/'/g,""),o.nend=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#]*)?)|([#,]*@+#*))(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=h,t.changeCurrencySymbol=l,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(/[d‏M‏]([^d‏M])[d‏M‏]/i);return e?e[1]:"/"},t.getActualDateTimeFormat=function(t,r,n,a){var h=i(n,t,r.calendar);b()&&(r=s(r,t));var l=r.format||e(r.skeleton,h.dateObject,r.type);if(a){if(-1!==(l=l.replace(P,function(t){return C[t]})).indexOf("z")){var u=l.match(/z/g).length,c=void 0,p={timeZone:{}};p.numMapper=Le.getNumberMapper(h.parserObject,Le.getNumberingSystem(n)),p.timeZone=o("dates.timeZoneNames",h.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=Ie.getTimeZoneValue(d,f),c=p.timeZone.gmtFormat.replace(/\{0\}/,c)),l=l.replace(/[z]+/,'"'+c+'"')}l=l.replace(/ $/,"")}return l},t.getActualNumberFormat=function(e,n,s,l){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):Le.getNumberMapper(p.parserObject,Le.getNumberingSystem(s),!0);var x=b()?o("currencySymbol",p.numericObject):d(p.numericObject,n.currency||Xe,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):h(B[1]||"-"+B[0],!0,x),w.pData=b()?o(P.type+"pData",g):h(B[0],!1,x),S[2]||n.minimumFractionDigits||n.maximumFractionDigits||(c=h(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=l?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]||x),O[i]},t.replaceBlazorCurrency=function(t,e,i){var r=function(t){return o(t||"",Te)}(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(this.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}}(Me||(Me={}));var ti=/^(.*?):[ \t]*([^\r\n]*)$/gm,ei="GET",ii=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():ei,this.mode=!!c(i)||i):"object"==typeof t&&(this.options=t,l(this,this.options)),this.type=this.type?this.type.toUpperCase():ei,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=ti.exec(this.httpRequest.getAllResponseHeaders());r;)e[r[1].toLowerCase()]=r[2],r=ti.exec(this.httpRequest.getAllResponseHeaders());return i=e[t.toLowerCase()],c(i)?null:i},t}(),ri=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i,ni=/msie|trident/i,oi=/Trident\/7\./,si=/(ipad|iphone|ipod touch)/i,ai=/(ipad|iphone|ipod touch);.*os 7_\d|(ipad|iphone|ipod touch);.*os 8_\d/i,hi=/android/i,li=/trident|windows phone|edge/i,ui=/(version)[ /]([\w.]+)/i,ci={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 pi,di=function(){function t(){}return t.extractBrowserDetail=function(){for(var e={culture:{}},i=[],r=0,n=Object.keys(ci);r<n.length;r++){var o=n[r];if(i=t.userAgent.match(ci[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(oi)){e.name="msie";break}var s=t.userAgent.match(ui);"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 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",ni)},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",ri)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isIos",{get:function(){return t.getValue("isIos",si)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isIos7",{get:function(){return t.getValue("isIos7",ai)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isAndroid",{get:function(){return t.getValue("isAndroid",hi)},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",li)},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}(),fi=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 h=i.split(" "),l=0;l<h.length;l++)a.push({name:h[l],listener:r,debounce:s}),di.isIE?e.addEventListener(h[l],s):e.addEventListener(h[l],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}(),gi=/^svg|^path|^g/,mi=new RegExp("]"),yi=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 Ue(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,l(this,t),!0!==e?(l(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(mi.test(t)){var h=o(t,this);if(h){if(window.Blazor){var l=h.call(this,e);l&&"function"==typeof l.then?i?l.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=l:i&&i.call(this,e)}else h.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}(),bi=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)}}(),vi=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=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}bi(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 h=t.timeStamp/i;t.timeStamp<o&&t.timeStamp+h<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 vi([G("FadeIn")],e.prototype,"name",void 0),vi([G(400)],e.prototype,"duration",void 0),vi([G("ease")],e.prototype,"timingFunction",void 0),vi([G(0)],e.prototype,"delay",void 0),vi([W()],e.prototype,"progress",void 0),vi([W()],e.prototype,"begin",void 0),vi([W()],e.prototype,"end",void 0),vi([W()],e.prototype,"fail",void 0),e=i=vi([U],e)}(yi),Si=!1,Pi=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,h=e;a<h.length;a++){var l=h[a],u=o.member;if(l.prototype.getModuleName()===o.member&&!this.isModuleLoaded(u)){var c=r(l,o.args),p=this.getMemberName(u);o.isProperty?s(p,l,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}(),Ci=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",yi),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?(l(this,t),this.updateChange(!1,this.propName),this.clearChanges()):l(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 h=0;h<a.length;h++){var l=h===a.length-1;n[a[h]]=l?e:{},n=l?n:n[a[h]]}}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}(),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)}}(),Oi=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},Bi=0,Li=0,Ti=!1,Mi=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:Ke},!0),c(r.locale)&&r.setProperties({locale:Je},!0),r.moduleLoader=new Pi(r),r.localObserver=new Ue(r),qe.on("notifyExternalChange",r.detectFunction,r,r.randomId),p(i)||r.appendTo(),r}return xi(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(),qe.off("notifyExternalChange",this.detectFunction,this.randomId)))},e.prototype.refresh=function(){this.refreshing=!0,this.moduleLoader.clean(),this.destroy(),this.clearChanges(),this.localObserver=new Ue(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 Ti?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=Ti?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||(Ti?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()&&(Bi=0),pi=this.pageID(location.href),Li=history.length,t+"_"+pi+"_"+Bi++},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 pi!==this.pageID(location.href)||Li!==history.length},e.prototype.addOnPersist=function(t){for(var e=this,i={},r=0,n=t;r<n.length;r++){var a=n[r],h=void 0;p(h=o(a,this))||s(a,this.getActualProperties(h),i)}return JSON.stringify(i,function(t,i){return e.getActualProperties(i)})},e.prototype.getActualProperties=function(t){return t instanceof Ci?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},Oi([G(!1)],e.prototype,"enablePersistence",void 0),Oi([G()],e.prototype,"enableRtl",void 0),Oi([G()],e.prototype,"locale",void 0),e=Oi([U],e)}(yi);"undefined"!=typeof window&&window.addEventListener("popstate",function(){Bi=0});var Di,ki=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)}}(),Ei=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={left:0,top:0,bottom:0,right:0},Ii={isDragged:!1},Ri=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ki(e,t),Ei([G(0)],e.prototype,"left",void 0),Ei([G(0)],e.prototype,"top",void 0),e}(Ci),Ai=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.tapHoldTimer=0,n.externalInitialize=!1,n.diffY=0,n.parentScrollX=0,n.parentScrollY=0,n.droppables={},n.bind(),n}ki(e,t),i=e,e.prototype.bind=function(){this.toggleEvents(),di.isIE&&S([this.element],"e-block-touch"),this.droppables[this.scope]={}},e.getDefaultPosition=function(){return u({},ji)},e.prototype.toggleEvents=function(t){var e;p(this.handle)||(e=M(this.handle,this.element));var i=this.enableTapHold&&di.isDevice&&di.isTouch?this.mobileInitialize:this.initialize;t?fi.remove(e||this.element,di.touchStartEvent,i):fi.add(e||this.element,di.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),fi.add(document,di.touchMoveEvent,this.removeTapholdTimer,this),fi.add(document,di.touchEndEvent,this.removeTapholdTimer,this)},e.prototype.removeTapholdTimer=function(){clearTimeout(this.tapHoldTimer),fi.remove(document,di.touchMoveEvent,this.removeTapholdTimer),fi.remove(document,di.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):(fi.add(document,di.touchMoveEvent,this.intDragStart,this),fi.add(document,di.touchEndEvent,this.intDestroy,this)),this.toggleEvents(!0),"touchstart"!==t.type&&this.isPreventSelect&&document.body.classList.add("e-prevent-select"),this.externalInitialize=!1,fi.trigger(document.documentElement,di.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,h=this.initialPosition.y-r.pageY;if(Math.sqrt(a*a+h*h)>=this.distance||this.externalInitialize){var l=this.getHelperElement(t);if(!l||c(l))return;var u=this.helperElement=l;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.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})),fi.remove(document,di.touchMoveEvent,this.intDragStart),fi.remove(document,di.touchEndEvent,this.intDestroy),b()||this.bindDragEvents(u)}}},e.prototype.bindDragEvents=function(t){x(t)?(fi.add(document,di.touchMoveEvent,this.intDrag,this),fi.add(document,di.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){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 h=this.droppables[this.scope].helper;this.parentClientRect=this.calculateParentPosition(this.helperElement.offsetParent);var l=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(h),v=parseFloat(b.marginTop);if(this.dragArea){if(this.pageX!==f||this.skipDistanceCheck){var w=h.offsetWidth+(parseFloat(b.marginLeft)+parseFloat(b.marginRight));e=this.dragLimit.left>m&&m>0?this.dragLimit.left:this.dragLimit.right+window.pageXOffset<m+w&&m>0?m-(m-this.dragLimit.right)+window.pageXOffset-w:m<0?this.dragLimit.left:m}if(this.pageY!==g||this.skipDistanceCheck){var S=h.offsetHeight+(parseFloat(b.marginTop)+parseFloat(b.marginBottom));i=this.dragLimit.top>y&&y>0?this.dragLimit.top:this.dragLimit.bottom+window.pageYOffset<y+S&&y>0?y-(y-this.dragLimit.bottom)+window.pageYOffset-S:y<0?this.dragLimit.top:y}}else e=m,i=y;var P=u+this.borderWidth.top,C=l+this.borderWidth.left;this.dragProcessStarted&&(c(i)&&(i=this.prevTop),c(e)&&(e=this.prevLeft));var x,O;if(this.dragArea){if(this.dragLimit.top=this.clone?this.dragLimit.top:0,x=i-P<0?this.dragLimit.top:i-P,O=e-C<0?this.dragElePosition.left:e-C,v>0&&(this.clone&&(x+=this.element.offsetTop,y<0&&(this.element.offsetTop+y>=0?x=this.element.offsetTop+y:x-=this.element.offsetTop),x=this.dragLimit.bottom<x?this.dragLimit.bottom:x),i-P<0))if(y+v+(h.offsetHeight-P)>=0){var B=this.dragLimit.top+y-P;B+v+P<0?x-=v+P:x=B}else x-=v+P}else x=i-P,O=e-C;this.enableScrollHandler&&!this.clone&&(x-=this.parentScrollY,O-=this.parentScrollX);var L=this.getProcessedPositionValue({top:x+"px",left:O+"px"});j(h,this.getDragPosition(L)),!this.elementInViewport(h)&&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"),fi.remove(document,di.touchMoveEvent,this.intDragStart),fi.remove(document,di.touchEndEvent,this.intDragStop),fi.remove(document,di.touchEndEvent,this.intDestroy),fi.remove(document,di.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&&(Ii.isDragged=!Ii.isDragged),Ii.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),h=0;h<s.length;h++){var l=s[h],u=a["border"+l+"Width"],c=a["padding"+l],p=l.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),this.clone||!this.dragArea||e||(this.getScrollableValues(),r-=this.tempScrollHeight?this.parentScrollY:0,i-=this.tempScrollWidth?this.parentScrollX:0),{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 Ei([_({},Ri)],e.prototype,"cursorAt",void 0),Ei([G(!0)],e.prototype,"clone",void 0),Ei([G()],e.prototype,"dragArea",void 0),Ei([G()],e.prototype,"isDragScroll",void 0),Ei([G()],e.prototype,"isReplaceDragEle",void 0),Ei([G(!0)],e.prototype,"isPreventSelect",void 0),Ei([W()],e.prototype,"drag",void 0),Ei([W()],e.prototype,"dragStart",void 0),Ei([W()],e.prototype,"dragStop",void 0),Ei([G(1)],e.prototype,"distance",void 0),Ei([G()],e.prototype,"handle",void 0),Ei([G()],e.prototype,"abort",void 0),Ei([G()],e.prototype,"helper",void 0),Ei([G("default")],e.prototype,"scope",void 0),Ei([G("")],e.prototype,"dragTarget",void 0),Ei([G()],e.prototype,"axis",void 0),Ei([G()],e.prototype,"queryPositionInfo",void 0),Ei([G(!1)],e.prototype,"enableTailMode",void 0),Ei([G(!1)],e.prototype,"skipDistanceCheck",void 0),Ei([G(!0)],e.prototype,"preventDefault",void 0),Ei([G(!1)],e.prototype,"enableAutoScroll",void 0),Ei([G(!1)],e.prototype,"enableTapHold",void 0),Ei([G(750)],e.prototype,"tapHoldThreshold",void 0),Ei([G(!1)],e.prototype,"enableScrollHandler",void 0),e=i=Ei([U],e)}(yi),Ni=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)}}(),Fi=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},Vi=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 Ni(e,t),e.prototype.bind=function(){this.wireEvents()},e.prototype.wireEvents=function(){fi.add(this.element,di.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(){fi.remove(this.element,di.touchEndEvent,this.intDrop),t.prototype.destroy.call(this)},Fi([G()],e.prototype,"accept",void 0),Fi([G("default")],e.prototype,"scope",void 0),Fi([W()],e.prototype,"drop",void 0),Fi([W()],e.prototype,"over",void 0),Fi([W()],e.prototype,"out",void 0),e=Fi([U],e)}(yi),zi=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)}}(),Gi=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},_i={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},Hi=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,h=Object.keys(n.keyConfigs);a<h.length;a++)for(var l=h[a],u=0,c=n.keyConfigs[l].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=l,n.keyAction&&n.keyAction(t))}},n.bind(),n}zi(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 _i[t]||t.toUpperCase().charCodeAt(0)};var i;return e.configCache={},Gi([G({})],e.prototype,"keyConfigs",void 0),Gi([G("keyup")],e.prototype,"eventName",void 0),Gi([W()],e.prototype,"keyAction",void 0),e=i=Gi([U],e)}(yi),Wi=function(){function t(t,e,i){this.controlName=t,this.localeStrings=e,this.setLocale(i||Je)}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}(),Ui=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},Ki=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ui(e,t),qi([G(50)],e.prototype,"swipeThresholdDistance",void 0),e}(Ci),Yi=/(Up|Down)/,Ji=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),fi.add(r.element,di.touchMoveEvent,r.moveEvent,r),fi.add(r.element,di.touchEndEvent,r.endEvent,r),fi.add(r.element,di.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),fi.remove(r.element,di.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 h=!1,l=r.element,c=r.isScrollable(l),p=Yi.test(r.movedDirection);(a<r.distanceX&&!p||a<r.distanceY&&p)&&(h=!c||r.checkSwipe(l,p)),h&&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(),fi.remove(r.element,di.touchMoveEvent,r.moveEvent),fi.remove(r.element,di.touchEndEvent,r.endEvent),fi.remove(r.element,di.touchCancelEvent,r.cancelEvent)},r.bind(),r}return Ui(e,t),e.prototype.onPropertyChanged=function(t,e){},e.prototype.bind=function(){this.wireEvents(),di.isIE&&this.element.classList.add("e-block-touch")},e.prototype.destroy=function(){this.unwireEvents(),t.prototype.destroy.call(this)},e.prototype.wireEvents=function(){fi.add(this.element,di.touchStartEvent,this.startEvent,this)},e.prototype.unwireEvents=function(){fi.remove(this.element,di.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;fi.remove(this.element,di.touchMoveEvent,this.moveEvent),fi.remove(this.element,di.touchEndEvent,this.endEvent),e={originalEvent:t},this.trigger("tapHold",e),fi.remove(this.element,di.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},qi([W()],e.prototype,"tap",void 0),qi([W()],e.prototype,"tapHold",void 0),qi([W()],e.prototype,"swipe",void 0),qi([W()],e.prototype,"scroll",void 0),qi([G(350)],e.prototype,"tapThreshold",void 0),qi([G(750)],e.prototype,"tapHoldThreshold",void 0),qi([_({},Ki)],e.prototype,"swipeSettings",void 0),e=qi([U],e)}(yi),Xi=new RegExp("\\n|\\r|\\s\\s+","g"),Qi=new RegExp(/'|"/g),$i=new RegExp("if ?\\("),Zi=new RegExp("else if ?\\("),tr=new RegExp("else"),er=new RegExp("for ?\\("),ir=new RegExp("(/if|/for)"),rr=new RegExp("\\((.*)\\)",""),nr=new RegExp("^[0-9]+$","g"),or=new RegExp("[\\w\"'.\\s+]+","g"),sr=new RegExp('"(.*?)"',"g"),ar=new RegExp("[\\w\"'@#$.\\s-+]+","g"),hr=new RegExp("\\${([^}]*)}","g"),lr=/^\..*/gm,ur=/\\/gi,cr=/\\\\/gi,pr=new RegExp("[\\w\"'@#$.\\s+]+","g"),dr=/\window\./gm,fr=/^[\n\r.]+<tr|^<tr/,gr=/^[\n\r.]+<svg|^<path|^<g/,mr={},yr={compile:(new(function(){function t(){}return t.prototype.compile=function(t,e,i){return void 0===e&&(e={}),Z(t,e)},t}())).compile},br=["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"]'],vr=[{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"]'}],wr=["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"],Sr=function(){function t(){}return t.beforeSanitize=function(){return{selectors:{tags:br,attributes:vr}}},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},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("["+wr.join("],[")+"]");t.length>0&&t.forEach(function(t){wr.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}(),Pr=Object.freeze({blazorCultureFormats:Ze,get IntlBase(){return Me},Ajax:ii,Animation:wi,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&&!Si?Function:(t.setAttribute("data-ripple","true"),fi.add(t,"mousedown",J,{parent:t,rippleOptions:r}),fi.add(t,"mouseup",X,{parent:t,rippleOptions:r,done:i}),fi.add(t,"mouseleave",Q,{parent:t,rippleOptions:r}),di.isPointer&&fi.add(t,"transitionend",Q,{parent:t,rippleOptions:r}),function(){t.removeAttribute("data-ripple"),fi.remove(t,"mousedown",J),fi.remove(t,"mouseup",X),fi.remove(t,"mouseleave",Q),fi.remove(t,"transitionend",Q)})},get isRippleEnabled(){return Si},enableRipple:function(t){return Si=t},Base:yi,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:di,get versionBasedStatePersistence(){return Ti},enableVersionBasedPersistence:function(t){Ti=t},Component:Mi,ChildProperty:Ci,Position:Ri,Draggable:Ai,Droppable:Vi,EventHandler:fi,onIntlChange:qe,get rightToLeft(){return Ke},cldrData:Ye,get defaultCulture(){return Je},get defaultCurrencyCode(){return Xe},Internationalization:$e,setCulture:function(t){Je=t,qe.notify("notifyExternalChange",{locale:Je})},setCurrencyCode:function(t){Xe=t,qe.notify("notifyExternalChange",{currencyCode:Xe})},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(Ye,n,{},!0)}},enableRtl:function(t){void 0===t&&(t=!0),Ke=t,qe.notify("notifyExternalChange",{enableRtl:Ke})},getNumericObject:function(t,e){var i=Me.getDependables(Ye,t,"",!0)[Qe[0]],r=Me.getDependables(Ye,t,"")[Qe[1]],n=o("defaultNumberingSystem",i),s=b()?o("numberSymbols",i):o("symbols-numberSystem-"+n,i),a=Me.getSymbolPattern(e||"decimal",n,i,!1);return u(s,Me.getFormatData(a,!0,"",!0),{dateSeparator:Me.getDateSeparator(r)})},getNumberDependable:function(t,e){var i=Me.getDependables(Ye,t,"",!0);return Me.getCurrencySymbol(i.numericObject,e)},getDefaultDateObject:function(t){return Me.getDependables(Ye,"",t,!1)[Qe[1]]},KeyboardEvents:Hi,L10n:Wi,ModuleLoader:Pi,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:Ki,Touch:Ji,get HijriParser(){return ve},blazorTemplates:mr,getRandomId:nt,compile:ot,updateBlazorTemplate:st,resetBlazorTemplate:at,setTemplateEngine:ht,getTemplateEngine:lt,disableBlazorMode:function(){Ce=!1},createInstance:r,setImmediate:n,getValue:o,setValue:s,deleteObject:a,isObject:h,getEnumValue:function(t,e){return t[e]},merge:l,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"auto"===e||-1!==e.indexOf("%")||-1!==e.indexOf("px")?e:e+"px"},enableBlazorMode:function(){Ce=!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[Se])for(var r=0,n=i[Se];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[Se]?i[Se].push(e):i[Se]=[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=h(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 h(t)?new RegExp("\\b"+e+"\\b","i").test(t.attributes.className):t.classList.contains(e)},cloneNode:function(t,e){return h(t)?e?u({},{},t,!0):void 0:t.cloneNode(e)},Observer:Ue,SanitizeHtmlHelper:Sr}),Cr=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.setAttribute("style",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++)e.setAttribute(i[r],t[i[r]]);return e},t.prototype.createCanvas=function(){return null},t}(),xr=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)}}(),Or=function(){return function(t,e){this.width=t,this.height=e}}(),Br=function(){return function(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}}(),Lr=function(){return function(t,e){this.isRight=e,this.isBottom=t}}(),Tr=function(){return function(t){this.id=t}}(),Mr=function(t){function e(e,i,r,n,o,s,a,h){void 0===s&&(s="");var l=t.call(this,e)||this;return l.transform="",l.baseLine="auto",l.labelRotation=0,l.x=i,l.y=r,l.anchor=n,l.text=o,l.transform=s,l.baseLine=a,l.labelRotation=h,l}return xr(e,t),e}(Tr),Dr=function(t){function e(e,i,r,n,o,s,a){var h=t.call(this,e)||this;return h.opacity=o,h.fill=i,h.stroke=n,h["stroke-width"]=r,h["stroke-dasharray"]=s,h.d=a,h}return xr(e,t),e}(Tr),kr=function(){return function(t,e){this.x=t,this.y=e}}(),Er=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)}}(),jr=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},Ir=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Er(e,t),jr([G(null)],e.prototype,"size",void 0),jr([G("")],e.prototype,"color",void 0),jr([G("Segoe UI")],e.prototype,"fontFamily",void 0),jr([G("Normal")],e.prototype,"fontWeight",void 0),jr([G("Normal")],e.prototype,"fontStyle",void 0),jr([G(1)],e.prototype,"opacity",void 0),e}(Ci),Rr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Er(e,t),jr([G("")],e.prototype,"color",void 0),jr([G(1)],e.prototype,"width",void 0),e}(Ci),Ar=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Er(e,t),jr([G(0)],e.prototype,"x",void 0),jr([G(0)],e.prototype,"y",void 0),jr([G(0)],e.prototype,"width",void 0),jr([G(0)],e.prototype,"height",void 0),e}(Ci),Nr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Er(e,t),jr([G(0)],e.prototype,"x",void 0),jr([G(0)],e.prototype,"y",void 0),e}(Ci),Fr=function(t){function e(e,i){return t.call(this,e,i)||this}return Er(e,t),e.prototype.preRender=function(){this.allowServerDataBinding=!1,this.initPrivateVariable(),this.isCanvas||this.removeSVG(),this.createTooltipElement()},e.prototype.initPrivateVariable=function(){this.renderer=new Cr(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:"rgba(0, 0, 0, 0.9)",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;default:e={tooltipFill:"rgba(0, 8, 22, 0.75)",tooltipBoldLabel:"#ffffff",tooltipLightLabel:"#dbdbdb",tooltipHeaderLine:"#ffffff"}}return e}(this.theme),this.formattedText=[],this.padding=5,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&&at(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){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=dt(this.element.id+"_group"),a=2*this.marginX+i/2+(e?this.arrowPadding:0),h=0,l=this.shapes;h<l.length;h++){var u=l[h];"None"!==u&&(r=new Dr(this.element.id+"_Trackball_"+n,this.palette[n],1,"#cccccc",1,null),this.markerPoint[n]&&o.appendChild(gt(new kr(a,this.markerPoint[n]-this.padding+(t?this.arrowPadding:0)),u,new Or(i,i),"",r,null)),n++)}s.appendChild(o)},e.prototype.renderTooltipElement=function(t,e){var i,r=dt(this.element.id),n=new kr(0,0),o=new kr(0,0),s=dt(this.element.id+"_svg"),a=dt(this.element.id+"_group"),h=dt(this.element.id+"_path"),l=!1,u=!1,p=!1,d=0,f=0;if(this.tipRadius=1,""!==this.header&&(this.elementSize.height+=this.marginY),this.content.length>1?(i=this.sharedTooltipLocation(t,this.location.x,this.location.y),l=!0):(i=this.tooltipLocation(t,e,n,o),this.inverted?d=(u=i.x<e.x+this.clipBounds.x)?0:this.arrowPadding:(p=!(l=i.y<e.y+this.clipBounds.y),f=l?0:this.arrowPadding)),""!==this.header){var g=pt(this.isWrap?this.wrappedText:this.header,this.textStyle).height+2*this.marginY+(p?this.arrowPadding:0)+(this.isWrap?5:0),m="M "+(3*this.marginX+(u||l||p?0:this.arrowPadding))+" "+g+"L "+(i.width+(u||l||p?0:this.arrowPadding)-2*this.marginX)+" "+g,y=this.renderer.drawPath({id:this.element.id+"_header_path","stroke-width":1,fill:null,opacity:.8,stroke:this.themeStyle.tooltipHeaderLine,d:m});a.appendChild(y)}var b=this.border.width/2,v=new Br(b+d,b+f,i.width-b,i.height-b);if(a.setAttribute("opacity","1"),!this.enableAnimation||this.shared||this.isFirst?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)||(l=this.tooltipPlacement.indexOf("Top")>-1,p=this.tooltipPlacement.indexOf("Bottom")>-1,u=this.tooltipPlacement.indexOf("Left")>-1),h.setAttribute("d",function(t,e,i,r,n,o,s,a,h,l,u){var c="",p=i.x,d=i.y,f=i.x+i.width,g=i.y+i.height;return u=u||0,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=(c=c.concat(" L "+(r.x+n/2)+" "+g)).concat(" L "+(h+u)+" "+(g+n-u)),c+=" Q "+h+" "+(g+n)+" "+(h-u)+" "+(g+n-u)),c=r.x-n/2>p?c.concat(" L "+(r.x-n/2)+" "+g+" 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.concat("M "+p+" "+(d+e)+" Q "+p+" "+d+" "+(p+t)+" "+d+" L "+(r.x-n/2)+" "+d)).concat(" L "+(h-u)+" "+(r.y+u)),c=(c=(c+=" Q "+h+" "+r.y+" "+(h+u)+" "+(r.y+u)).concat(" L "+(r.x+n/2)+" "+d+" 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=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/2))).concat(" L "+(f+n-u)+" "+(l-u)),c=(c=(c+=" Q "+(f+n)+" "+l+" "+(f+n-u)+" "+(l+u)).concat(" L "+f+" "+(r.y+n/2)+" L "+f+" "+(g-e)+" Q "+f+" "+g+" "+(f-t)+" "+g)).concat(" L "+(p+t)+" "+g+" Q "+p+" "+g+" "+p+" "+(g-e)+" z")):(c=(c=c.concat("M "+(p+t)+" "+d+" Q "+p+" "+d+" "+p+" "+(d+e)+" L "+p+" "+(r.y-n/2))).concat(" L "+(p-n+u)+" "+(l-u)),c=(c=(c+=" Q "+(p-n)+" "+l+" "+(p-n+u)+" "+(l+u)).concat(" L "+p+" "+(r.y+n/2)+" 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,v,n,this.arrowPadding,l,p,u,o.x,o.y,this.tipRadius)),this.enableShadow&&"Bootstrap4"!==this.theme){var w=this.element.id+"_shadow";"Tailwind"===this.theme||"TailwindDark"===this.theme||"Bootstrap5"===this.theme||"Bootstrap5Dark"===this.theme?h.setAttribute("box-shadow","0px 1px 2px rgba(0, 0, 0, 0.06), 0px 1px 3px rgba(0, 0, 0, 0.1)"):h.setAttribute("filter",di.isIE?"":"url(#"+w+")");var S='<filter id="'+w+'" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="3"/>';S+='<feOffset dx="3" dy="3" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="0.5"/>',S+='</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';var P=this.renderer.createDefs();P.setAttribute("id",this.element.id+"SVG_tooltip_definition"),a.appendChild(P),P.innerHTML=S}return h.setAttribute("stroke",this.border.color),this.changeText(new kr(d,f),p,!u&&!l&&!p),new Lr(p,!u&&!l&&!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,h=0,l=u({},this.textStyle,null,!0).properties,c=dt(this.element.id+"_group"),p="";this.findFormattedText();var d="rtl"===document.body.getAttribute("dir")?"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=pt(this.formattedText[0],l).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(l.size);t&&!this.isCanvas||(ft(this.element.id+"_text"),ft(this.element.id+"_header_path"),ft(this.element.id+"_trackball_group"),ft(this.element.id+"SVG_tooltip_definition"));for(var T=new Mr(this.element.id+"_text",2*this.marginX,2*this.marginY+2*this.padding+(2===this.marginY?3:0),d,""),M=function(t,e,i,r){var n={},o=new Cr("");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}(T,l,null,c),D=1===this.formattedText.length&&this.formattedText[0].indexOf(" : <b>")>-1,k=""!==this.header,E=k&&g?16:13,j=0,I=this.formattedText.length;j<I;j++)if(r=this.formattedText[j].replace(/<(b|strong)>/g,"<b>").replace(/<\/(b|strong)>/g,"</b>").split(/<br.*?>/g),0===j&&!D&&this.isTextWrap&&(this.leftSpace<m||y)&&(this.rightSpace<m||b)&&(P=Math.round(this.leftSpace>this.rightSpace?this.leftSpace/E:this.rightSpace/E),r=(""!==f?f:this.formattedText[j]).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===j&&""!==f||this.markerPoint.push((""!==f?this.marginY:0)+T.y+s);for(var R=0,A=r.length;R<A;R++){h=0,S=!0,s+=L;for(var N=0,F=(e=r[R].replace(/<b>/g,"<br><b>").replace(/<\/b>/g,"</b><br>").replace(/:/g,"<br>‎:<br>").split("<br>")).length;N<F;N++)n=e[N],/\S/.test(n)||""===n||(n=" "),(!S&&" "===n||""!==n.replace(/<b>/g,"").replace(/<\/b>/g,"").trim())&&(h+=" "!==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,""),M.appendChild(i),n.indexOf("<b>")>-1||g&&0===N&&0===j&&(k||this.isWrap)?(O="bold",B=this.themeStyle.tooltipBoldLabel,p="font-weight:"+O,l.fontWeight=O,i.setAttribute("fill",this.textStyle.color||B)):(p="bold"===O?"font-weight:"+O:"",l.fontWeight=O,i.setAttribute("fill",this.textStyle.color||B)),(n.indexOf("</b>")>-1||g&&N===F-1&&0===j&&(k||this.isWrap))&&(O="Normal",B=this.themeStyle.tooltipLightLabel),i.textContent=n=this.getTooltipTextContent(n),h+=pt(n,l).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);h-=4,a=Math.max(a,h)}}this.elementSize=new Or(a+(a>0?2*this.marginX:0),s),this.elementSize.width+=C+x;var V=M.childNodes[0];if(""!==f&&V&&!this.isWrap){l.fontWeight="bold";var z=(this.elementSize.width+2*this.padding)/2-pt(f,l).width/2;V.setAttribute("x",z.toString())}},e.prototype.getTooltipTextContent=function(t){var e=t.match(/<[a-zA-Z\/](.|\n)*?>/g);if(c(e))return t;for(var i=/[\u0590-\u07FF\u200F\u202B\u202E\uFB1D-\uFDFD\uFE70-\uFEFC]/.test(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.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(dt(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,h=a.getBoundingClientRect();this.padding=0,this.elementSize=new Or(h.width,h.height);var l=this.shared?this.sharedTooltipLocation(t,this.location.x,this.location.y):this.tooltipLocation(t,e,new kr(0,0),new kr(0,0));if(!this.enableAnimation||this.shared||this.isFirst?this.updateDiv(a,l.x,l.y):this.animateTooltipDiv(this.element,l),this.blazorTemplate){var u=function(){var i=dt(c.element.id).getBoundingClientRect();c.elementSize=new Or(i.width,i.height);var r=c.tooltipLocation(t,e,new kr(0,0),new kr(0,0));c.updateDiv(dt(c.element.id),r.x,r.y)},c=this;u.bind(c,t,e),st(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 Br(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,h=this.elementSize.width+2*this.marginX,l=this.elementSize.height+2*this.marginY,u=new kr(e.x,e.y);return"Top"===n||"Bottom"===n?(u=new kr(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=h/2,"Bottom"===n&&(u.y=e.y+s+a),t.x+t.width<u.x+h?(u.x=t.width>h?t.x+t.width-h+6:t.x,i.x=r.x=t.width>h?t.x+e.x-u.x:e.x):t.x>u.x&&(u.x=t.x,i.x=r.x=e.x)):(u=new kr(u.x+o+a,u.y+s-this.elementSize.height/2-this.padding),i.y=r.y=l/2,"Left"===n&&(u.x=e.x+o-a-(h+this.arrowPadding)),t.y+t.height<u.y+l?(u.y=t.height>l?t.y+t.height-l+6:t.y,i.y=r.y=t.height>l?t.y+e.y-u.y:e.y):t.y>u.y&&(u.y=t.y,i.y=r.y=e.y)),new Br(u.x,u.y,h,l)},e.prototype.tooltipLocation=function(t,e,i,r){if(!c(this.tooltipPlacement)){return this.getCurrentPosition(t,e,i,r)}var n=new kr(e.x,e.y),o=this.elementSize.width+2*this.marginX,s=this.elementSize.height+2*this.marginY,a=this.offset,h=this.clipBounds.x,l=this.clipBounds.y,u=t.x,p=t.y;return this.inverted?(n=new kr(n.x+h+a,n.y+l-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.width:e.x)+h-a-(o+this.arrowPadding)),n.x<u&&(n.x=(e.x<0?0:e.x)+h+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/2>s-this.ry&&(i.y=s-this.ry-this.arrowPadding/2,r.y=s,this.tipRadius=0),i.y-this.arrowPadding/2<this.ry&&(i.y=this.ry+this.arrowPadding/2,r.y=0,this.tipRadius=0)):(n=new kr(n.x+h-this.elementSize.width/2-this.padding,n.y+l-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)+l+a),n.y+s+this.arrowPadding>p+t.height&&(n.y=Math.min(e.y,p+t.height)+l-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/2>o-this.rx&&(i.x=o-this.rx-this.arrowPadding/2,r.x=o,this.tipRadius=0),i.x-this.arrowPadding/2<this.rx&&(i.x=this.rx+this.arrowPadding/2,r.x=0,this.tipRadius=0)),new Br(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 wi({}).animate(t,{duration:this.duration,progress:function(r){i=r.timeStamp/r.duration,t.style.animation=null,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){t.style.left=e+"px",t.style.top=i+"px"},e.prototype.updateTemplateFn=function(){if(this.template)try{document.querySelectorAll(this.template).length&&(this.templateFn=ot(document.querySelector(this.template).innerHTML.trim()))}catch(t){this.templateFn=ot(this.template)}},e.prototype.fadeOut=function(){var t=this,e=this.isCanvas&&!this.template?dt(this.element.id+"_svg"):dt(this.element.id);if(e){var i=e.firstChild;if(this.isCanvas&&!this.template&&(i=document.getElementById(this.element.id+"_group")?document.getElementById(this.element.id+"_group"):i),!i)return null;var r=parseFloat(i.getAttribute("opacity"));r=c(r)?1:r,new wi({}).animate(i,{duration:200,progress:function(e){t.progressAnimation(i,r,e.timeStamp/e.duration)},end:function(){t.fadeOuted=!0,t.endAnimation(i)}})}},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&&at(this.element.id+"parent_template_blazorTemplate"),this.isFirst=!1,this.render()},jr([G(!1)],e.prototype,"enable",void 0),jr([G(!1)],e.prototype,"shared",void 0),jr([G(!0)],e.prototype,"enableShadow",void 0),jr([G(null)],e.prototype,"fill",void 0),jr([G("")],e.prototype,"header",void 0),jr([G(.75)],e.prototype,"opacity",void 0),jr([_({size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},Ir)],e.prototype,"textStyle",void 0),jr([G(null)],e.prototype,"template",void 0),jr([G(!0)],e.prototype,"enableAnimation",void 0),jr([G(300)],e.prototype,"duration",void 0),jr([G(!1)],e.prototype,"inverted",void 0),jr([G(!1)],e.prototype,"isNegative",void 0),jr([_({color:"#cccccc",width:.5},Rr)],e.prototype,"border",void 0),jr([G([])],e.prototype,"content",void 0),jr([G(10)],e.prototype,"markerSize",void 0),jr([_({x:0,y:0},Nr)],e.prototype,"clipBounds",void 0),jr([G([])],e.prototype,"palette",void 0),jr([G([])],e.prototype,"shapes",void 0),jr([_({x:0,y:0},Nr)],e.prototype,"location",void 0),jr([G(0)],e.prototype,"offset",void 0),jr([G(2)],e.prototype,"rx",void 0),jr([G(2)],e.prototype,"ry",void 0),jr([G(5)],e.prototype,"marginX",void 0),jr([G(5)],e.prototype,"marginY",void 0),jr([G(12)],e.prototype,"arrowPadding",void 0),jr([G(null)],e.prototype,"data",void 0),jr([G("Material")],e.prototype,"theme",void 0),jr([_({x:0,y:0,width:0,height:0},Ar)],e.prototype,"areaBounds",void 0),jr([G(null)],e.prototype,"availableSize",void 0),jr([G()],e.prototype,"blazorTemplate",void 0),jr([G(!1)],e.prototype,"isCanvas",void 0),jr([G(!1)],e.prototype,"isTextWrap",void 0),jr([G(null)],e.prototype,"tooltipPlacement",void 0),jr([G(null)],e.prototype,"controlInstance",void 0),jr([W()],e.prototype,"tooltipRender",void 0),jr([W()],e.prototype,"loaded",void 0),jr([W()],e.prototype,"animationComplete",void 0),e=jr([U],e)}(Mi),Vr="beforePrint",zr="itemRendering",Gr="drillStart",_r="itemSelected",Hr="itemHighlight",Wr="tooltipRendering",Ur="doubleClick",qr="rightClick",Kr="legendItemRendering",Yr="legendRendering",Jr="Roboto, Segoe UI, Noto, Sans-serif",Xr=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)}}(),Qr=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},$r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),Qr([G("#808080")],e.prototype,"color",void 0),Qr([G(0)],e.prototype,"width",void 0),e}(Ci),Zr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),Qr([G(10)],e.prototype,"left",void 0),Qr([G(10)],e.prototype,"right",void 0),Qr([G(10)],e.prototype,"top",void 0),Qr([G(10)],e.prototype,"bottom",void 0),e}(Ci),tn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),Qr([G(null)],e.prototype,"size",void 0),Qr([G(null)],e.prototype,"color",void 0),Qr([G(Jr)],e.prototype,"fontFamily",void 0),Qr([G("Normal")],e.prototype,"fontWeight",void 0),Qr([G("Normal")],e.prototype,"fontStyle",void 0),Qr([G(1)],e.prototype,"opacity",void 0),e}(Ci),en=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),Qr([G("")],e.prototype,"text",void 0),Qr([G("")],e.prototype,"description",void 0),e}(Ci),rn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),Qr([_({size:"14px"},tn)],e.prototype,"textStyle",void 0),Qr([G("Center")],e.prototype,"alignment",void 0),e}(en),nn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),Qr([_({size:"15px"},tn)],e.prototype,"textStyle",void 0),Qr([G("Center")],e.prototype,"alignment",void 0),Qr([_({},rn)],e.prototype,"subtitleSettings",void 0),e}(en),on=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),Qr([G(null)],e.prototype,"from",void 0),Qr([G(null)],e.prototype,"to",void 0),Qr([G(null)],e.prototype,"color",void 0),Qr([G(null)],e.prototype,"label",void 0),Qr([G(null)],e.prototype,"value",void 0),Qr([G(null)],e.prototype,"minOpacity",void 0),Qr([G(null)],e.prototype,"maxOpacity",void 0),Qr([G(!0)],e.prototype,"showLegend",void 0),e}(Ci),sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),Qr([G(!1)],e.prototype,"visible",void 0),Qr([G("Default")],e.prototype,"mode",void 0),Qr([G("transparent")],e.prototype,"background",void 0),Qr([G("Circle")],e.prototype,"shape",void 0),Qr([G("")],e.prototype,"width",void 0),Qr([G("")],e.prototype,"height",void 0),Qr([_({size:"13px"},tn)],e.prototype,"textStyle",void 0),Qr([G(null)],e.prototype,"fill",void 0),Qr([G(1)],e.prototype,"opacity",void 0),Qr([G(15)],e.prototype,"shapeWidth",void 0),Qr([G(15)],e.prototype,"shapeHeight",void 0),Qr([G(10)],e.prototype,"shapePadding",void 0),Qr([G(null)],e.prototype,"imageUrl",void 0),Qr([_({color:"#000000",width:0},$r)],e.prototype,"border",void 0),Qr([_({color:"#000000",width:0},$r)],e.prototype,"shapeBorder",void 0),Qr([_({},en)],e.prototype,"title",void 0),Qr([_({size:"14px"},tn)],e.prototype,"titleStyle",void 0),Qr([G("Bottom")],e.prototype,"position",void 0),Qr([G("None")],e.prototype,"orientation",void 0),Qr([G(!1)],e.prototype,"invertedPointer",void 0),Qr([G("After")],e.prototype,"labelPosition",void 0),Qr([G("None")],e.prototype,"labelDisplayMode",void 0),Qr([G("Center")],e.prototype,"alignment",void 0),Qr([G({x:0,y:0})],e.prototype,"location",void 0),Qr([G(null)],e.prototype,"showLegendPath",void 0),Qr([G(null)],e.prototype,"valuePath",void 0),Qr([G(!1)],e.prototype,"removeDuplicateLegend",void 0),e}(Ci),an=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),Qr([G(null)],e.prototype,"groupIndex",void 0),Qr([G(null)],e.prototype,"groupName",void 0),e}(Ci),hn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),Qr([G(null)],e.prototype,"fill",void 0),Qr([G(!1)],e.prototype,"autoFill",void 0),Qr([_({},$r)],e.prototype,"border",void 0),Qr([G(0)],e.prototype,"gap",void 0),Qr([G(10)],e.prototype,"padding",void 0),Qr([G(1)],e.prototype,"opacity",void 0),Qr([G(!0)],e.prototype,"showLabels",void 0),Qr([G(null)],e.prototype,"labelPath",void 0),Qr([G(null)],e.prototype,"labelFormat",void 0),Qr([G("TopLeft")],e.prototype,"labelPosition",void 0),Qr([_({color:null,size:"12px"},tn)],e.prototype,"labelStyle",void 0),Qr([G(null)],e.prototype,"labelTemplate",void 0),Qr([G("Center")],e.prototype,"templatePosition",void 0),Qr([G("Trim")],e.prototype,"interSectAction",void 0),Qr([H([],on)],e.prototype,"colorMapping",void 0),e}(Ci),ln=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),Qr([G(!1)],e.prototype,"visible",void 0),Qr([G("")],e.prototype,"template",void 0),Qr([G(null)],e.prototype,"format",void 0),Qr([G(null)],e.prototype,"fill",void 0),Qr([G(.75)],e.prototype,"opacity",void 0),Qr([G(["Circle"])],e.prototype,"markerShapes",void 0),Qr([_({},$r)],e.prototype,"border",void 0),Qr([_({fontFamily:Jr,size:"13px"},tn)],e.prototype,"textStyle",void 0),e}(Ci),un=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),Qr([G(!1)],e.prototype,"enable",void 0),Qr([G(null)],e.prototype,"fill",void 0),Qr([G("0.5")],e.prototype,"opacity",void 0),Qr([_({},$r)],e.prototype,"border",void 0),Qr([G("Item")],e.prototype,"mode",void 0),e}(Ci),cn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),Qr([G(!1)],e.prototype,"enable",void 0),Qr([G("#808080")],e.prototype,"fill",void 0),Qr([G("0.5")],e.prototype,"opacity",void 0),Qr([_({},$r)],e.prototype,"border",void 0),Qr([G("Item")],e.prototype,"mode",void 0),e}(Ci),pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),Qr([G(null)],e.prototype,"groupPath",void 0),Qr([G(0)],e.prototype,"groupGap",void 0),Qr([G(10)],e.prototype,"groupPadding",void 0),Qr([_({},$r)],e.prototype,"border",void 0),Qr([G(null)],e.prototype,"fill",void 0),Qr([G(!1)],e.prototype,"autoFill",void 0),Qr([G(1)],e.prototype,"opacity",void 0),Qr([G(!0)],e.prototype,"showHeader",void 0),Qr([G(20)],e.prototype,"headerHeight",void 0),Qr([G(null)],e.prototype,"headerTemplate",void 0),Qr([G(null)],e.prototype,"headerFormat",void 0),Qr([G("Near")],e.prototype,"headerAlignment",void 0),Qr([_({color:null,size:"13px"},tn)],e.prototype,"headerStyle",void 0),Qr([G("TopLeft")],e.prototype,"templatePosition",void 0),Qr([H([],on)],e.prototype,"colorMapping",void 0),e}(Ci),dn=function(){return function(t,e){this.width=t,this.height=e}}(),fn=function(){return function(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}}(),gn=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}}(),mn=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}}(),yn=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}}(),bn=function(){return function(t,e){this.x=t,this.y=e}}(),vn=function(){return function(t,e,i){this.r=t,this.g=e,this.b=i}}(),wn=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}}(),Sn=function(){function t(t){this.treemap=t}return t.prototype.processLayoutPanel=function(){var t,e;if(Xl.levelsData&&Xl.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)?Xl.levelsData[0]:this.getDrilldownData(Xl.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||Xl.levelsData[0],e),this.renderLayoutItems(t||Xl.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||Xl.levelsData[0],e),this.renderLayoutItems(n||Xl.levelsData[0])}},t.prototype.getDrilldownData=function(t,e){var i=this.treemap,r={},n=Bt(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,h=Bt(t).values;if(h&&h.length>0&&(this.sliceAndDiceProcess(h,e),this.treemap.levels.length>0))for(var l=0;l<h.length;l++)r=h[l].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=h[l].rect,i=new fn(i.x+n/2,i.y+(o+n/2),i.width-n,Math.abs(i.height-(n+o))),this.computeSliceAndDiceDimensional(h[l],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(xt);for(var h=0;h<t.length;h++){var l=t[h];l.isLeafItem=0===n.length||(this.treemap.isHierarchicalData||c(this.treemap.leafItemSettings.labelPath)?l.groupIndex===n.length-1:l.groupIndex===this.treemap.levels.length),a?(i=r/s*t[h].weight/e.height,o<=e.width&&(t[h].rect=new fn(o+e.x,e.y,i,e.height))):(i=r/s*t[h].weight/e.width,o<=e.height&&(t[h].rect=new fn(e.x,o+e.y,e.width,i))),o+=i,this.renderItems.push(t[h])}},t.prototype.computeSquarifyDimensional=function(t,e){var i,r,n,o,s,a=this.treemap.leafItemSettings,h=this.treemap.levels,l=Bt(t).values;if(l&&l.length>0&&(0===this.parentData.length&&(this.parentData=[],this.parentData.push(l)),this.calculateChildrenLayout(t,l,e),this.treemap.levels.length>0))for(var u=0;u<l.length;u++)n=(r=l[u]).groupIndex,i=r.rect,o=(r.isLeafItem?a.padding:h[n].groupPadding)/2,s=this.treemap.isHierarchicalData?0===n&&r.isLeafItem?0:h[n]&&h[n].showHeader?h[n].headerHeight:0:0===h.length?0:h[n]&&h[n].showHeader?h[n].headerHeight:0,i=new fn(i.x+o,i.y+(s+o),i.width-o,i.height-o),!r.isLeafItem&&r.weight>0&&this.computeSquarifyDimensional(l[u],i)},t.prototype.calculateChildrenLayout=function(t,e,i){this.computeTotalArea(e,Et(i)),e.sort(Yt),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=jt(i),a=t[0],h=t.slice(1,n);if(this.aspectRatio(e,a,s)){var l=e.concat(a);return this.performRowsLayout(h,l,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=It(t),r=i.width,n=i.height,o=i.x,s=i.y;if(r>=n){var a=e/n;return Rt({x:o+a,y:s,width:r-a,height:n})}var h=e/r;return Rt({x:o,y:s+h,width:r,height:n-h})},t.prototype.getCoordinates=function(t,e){for(var i,r=It(e),n=r.width,o=r.height,s=r.x,a=r.y,h=t.length,l=this.treemap.levels,u=this.treemap.leafItemSettings,p=0,d=0;d<h;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<h;d+=1){var P=t[d];if(i=P.groupIndex,P.isLeafItem=0===l.length||(this.treemap.isHierarchicalData?i===l.length:!c(u.labelPath)&&i===l.length),g=ae(this.parentData[0],P),m=g?this.treemap.areaRect:P.parent.rect,f=P.isLeafItem?u.padding:l[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 h=e/s,l=void 0,u=0;u<o;u++)(l=t[u]).itemArea=l.weight*h,r.push(l)}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,h,l,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],h=f.groupIndex,N.treemap.drillDownView&&c(N.treemap.currentLevel)&&h>0||N.treemap.drillDownView&&h>N.treemap.currentLevel+1)return"continue";u=f.rect,I=f.isLeafItem,y=P+"_Level_Index_"+h+"_Item_Index_"+t,T=N.renderer.createGroup({id:y+"_Group"}),v=(I?R.gap:L[h].groupGap)/2;var w=N.treemap.totalRect?It(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[h].colorMapping,r=N.getItemColor(I,f),d=r.fill,m=r.opacity,p=I?R.labelFormat:L[h].headerFormat;var C;if(i=I?R.showLabels:L[h].showHeader,h===N.treemap.currentLevel)if(N.treemap.enableBreadcrumb){E="#"+N.treemap.breadcrumbConnector+"#",C=f.levelOrderName.replace(/#/gi,E),C=0!==h?"#"+C:C}else C=f.name;else N.treemap.enableBreadcrumb&&(f.isDrilled=!1),C=f.name;g=Zt(p,f.data,N.treemap)||C||"undefined",k=Bt(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[h].headerStyle).fontFamily=N.treemap.themeStyle.labelFontFamily||S.fontFamily,D=I?R.border:L[h].border,e=I?R.labelPosition:"Near"===L[h].headerAlignment?"TopLeft":"Center"===L[h].headerAlignment?"TopCenter":"TopRight",l=I?R.templatePosition:L[h].templatePosition,M=I?R.labelTemplate:L[h].headerTemplate,f.options={border:D,opacity:m,fill:d},n={cancel:!1,name:zr,treemap:N.treemap,text:g,currentItem:f,RenderItems:N.renderItems,options:f.options},N.treemap.trigger(zr,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 mn(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=Zt(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,l,M,f,I),j.appendChild(b),o.treemap.renderReactTemplates()),T.setAttribute("aria-label",f.name),T.setAttribute("tabindex",(o.treemap.tabIndex+t+2).toString()),Jt(o.treemap,T,"treeMapSelection"),o.layoutGroup.appendChild(T)}})},N=this,F=0;F<this.renderItems.length;F++)A(F);j.childNodes.length>0&&!c(B)&&B.appendChild(j),this.treemap.svgObject.appendChild(this.layoutGroup)},t.prototype.renderItemText=function(t,e,i,r,n,o,s,a,h){document.getElementById(this.treemap.element.id+"_Secondary_Element"),this.treemap.leafItemSettings;var l,u,p,d=[],f=[],g=0;if(d=-1!==t.indexOf("<br>")?t.split("<br>"):null,u=this.labelInterSectAction(r,t,i,n),l=yt(d&&d[0]||u[0],i),this.treemap.enableRtl){var m=yt(t,i),y=t.search("[+]")||t.search("[-]");if(r.width<m.width&&y>0){var b=t.substring(y-1,t.length),v=yt("[+]",i);u[0]=bt(r.width-v.width-5,u[0],i)+b}}var w=Dt(r,a,l,"Text",this.treemap);if(!c(d)){for(var S=[],P=null,C=[],x=0;x<d.length;x++)g+=(l=yt(P=bt(r.width-5,d[x],i),i)).height,C.push(l.width),S.push(P);u=S,l.width=Math.max.apply(null,C),l.height=g}if("WrapByWord"===n||"Wrap"===n||"Trim"===n){for(var O=0;O<u.length;O++)g+=(l=yt(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);St(new yn(o+"_Text",w.x,w.y,"start",f,"","",h),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(Xl.defaultLevelsData)||Xl.defaultLevelsData.length>0&&(Xl.levelsData=Xl.defaultLevelsData);var o=Bt(Xl.levelsData[0]).values,s=t?i.leafItemSettings.colorMapping:i.levels[e.groupIndex].colorMapping;if(s.length>0){var a=Nt(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 h=0;h<o.length;h++)o[h].levelOrderName===e.levelOrderName.split("#")[0]&&(r=c(r)?c(i.colorValuePath)?i.palette.length>0?i.palette[h%i.palette.length]:"#808080":o[h].data[i.colorValuePath]:r);return{fill:r,opacity:n}},t.prototype.getSaturatedColor=function(t){var e=t,i=re(ne(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",h=s?"_LabelTemplate":"_HeaderTemplate";if(c(n.prototype))for(var l=Object.keys(o.data),u=0;u<l.length;u++)n=n.replace(new RegExp("{{:"+l[u]+"}}","g"),o.data[l[u].toString()]);var p=Mt(Tt(n)(o.data,this.treemap,n,this.treemap.element.id+h,!1),a,o.data),d=Dt(i,r,kt(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=[Kt(o,t.height,e,i)];break;case"Trim":n=[bt(o+3,e,i)];break;case"WrapByWord":n=Ut(o,e,i);break;case"Wrap":n=qt(o,e,i)}return n},t}(),Pn=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):On.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):On.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 Cn(t,e,i,r,n):t instanceof Cn&&(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=On.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&&On.endsWith(e.toLowerCase()," desc")&&(e=e.replace(/ desc$/i,""),i="descending"),i&&"string"!=typeof i||(a=i?i.toLowerCase():"ascending",i=On.fnSort(i)),r){o=t.filterQueries(this.queries,"onSortBy");for(var h=0;h<o.length;h++)if("string"==typeof(s=o[h].e.fieldName)){if(s===e)return this}else if(s instanceof Array)for(var l=0;l<s.length;l++)if(s[l]===e||e.toLowerCase()===s[l]+" 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}(),Cn=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=On.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,On.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)):On.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}(),xn={GroupGuid:"{271bbba0-1ee7}"},On=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 h=e;if(h.GroupGuid===xn.GroupGuid){for(var l=function(t){if(c(o))h[t].items=u.group(h[t].items,i,r,h.level+1,null,s,a),h[t].count=h[t].items.length;else{var e=-1,n=o.filter(function(e){return e.key===h[t].key});e=o.indexOf(n[0]),h[t].items=u.group(h[t].items,i,r,h.level+1,o[e].items,s,a),h[t].count=o[e].count}},u=this,p=0;p<h.length;p++)l(p);return h.childLevels+=1,h}var d={},f=[];f.GroupGuid=xn.GroupGuid,f.level=n,f.childLevels=0,f.records=h;for(var g=function(t){var e=m.getVal(h,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(h[t])},m=this,y=0;y<h.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 h=o.filter(function(t){return t.key===f[e].key});n&&(i[s[a].field+" - "+s[a].type]=n(h[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 h.length&&f||h},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,h=o.length;for(r=0;r<h;r++)n=o[r],r+1===h?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,h="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))||(h&&(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,h){(n="object"==typeof e[h]?t.getVal(e,h,i):e[h])in s||(o.push(r?e[h]:n),s[n]=1)}),o},t.processData=function(t,e){var i=this.prepareQuery(t),r=new Rn(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 Pn;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 Cn(t.field,t.operator,t.value,t.ignoreCase,t.ignoreAccent)):e=e.concat(i.getPredicate(t.predicates)),"or"==t.condition?r.where(Cn.or(e)):"and"==t.condition&&r.where(Cn.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 Cn(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 h=a[s];n.push(o[h])}e.push("or"==r.condition?Cn.or(n):Cn.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 Rn(t).executeLocal((new Pn).where(e,"equal",!0,!0)).length},falsecount:function(t,e){return new Rn(t).executeLocal((new Pn).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):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)),h=parseInt(s[6],10),l=parseInt(s[7],10);if(isNaN(h)&&isNaN(l))return a;i.indexOf("+")>-1?a.setHours(a.getHours()-h,a.getMinutes()-l):a.setHours(a.getHours()+h,a.getMinutes()+l),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}(),Bn=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)}}(),Ln={GroupGuid:"{271bbba0-1ee7}"},Tn=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}(),Mn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Bn(e,t),e.prototype.processQuery=function(t,e){for(var i,r,n,o=t.dataSource.json.slice(0),s=o.length,a=!0,h={},l=0,u=[],c=0;c<e.lazyLoad.length;c++)l++,h[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(l){var d={query:e,lazyLoad:h,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=On.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=On.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=Pn.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:On.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=On.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&&On.getFieldList(t[0],e.fieldNames),t.filter(function(t){for(var i=0;i<e.fieldNames.length;i++)if(e.comparer.call(t,On.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=On.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,On.endsWith(n[o]," desc")&&(r=On.fnSort("descending"),n[o]=n[o].replace(" desc","")),t=On.sort(t,n[o],r));return t}return On.sort(t,n,e.comparer)},e.prototype.onGroup=function(t,e,i){if(!t||!t.length)return t;var r=this.getAggregate(i);return On.group(t,On.getValue(e.fieldName,i),r,null,null,e.comparer)},e.prototype.onPage=function(t,e,i){var r=On.getValue(e.pageSize,i),n=(On.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(On.getValue(e.start),On.getValue(e.end)):t},e.prototype.onTake=function(t,e){return t&&t.length?t.slice(0,On.getValue(e.nos)):t},e.prototype.onSkip=function(t,e){return t&&t.length?t.slice(On.getValue(e.nos)):t},e.prototype.onSelect=function(t,e){return t&&t.length?On.select(t,On.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=On.getObject(e,i)),n=0;n<o.length&&On.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?l(a[n],i):null},e}(Tn),Dn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Bn(e,t),e.prototype.processQuery=function(t,e,i){var r,n,o=this.getQueryRequest(e),s=Pn.filterQueryLists(e.queries,["onSelect","onPage","onSkip","onTake","onRange"]),a=e.params,h=t.dataSource.url,l=null,u=this.options,p={sorts:[],groups:[],filters:[],searches:[],aggregates:[]};"onPage"in s?(r=s.onPage,n=((n=On.getValue(r.pageIndex,e))-1)*(l=On.getValue(r.pageSize,e))):"onRange"in s&&(n=(r=s.onRange).start,l=r.end-r.start);for(var d=0;d<o.sorts.length;d++)r=On.getValue(o.sorts[d].e.fieldName,e),p.sorts.push(On.callAdaptorFunction(this,"onEachSort",{name:r,direction:o.sorts[d].e.direction},e));i&&(r=this.getFiltersFrom(i,e))&&p.filters.push(On.callAdaptorFunction(this,"onEachWhere",r.toJson(),e));for(d=0;d<o.filters.length;d++){var f=On.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];On.isNull(p[y])&&delete p[y]}}for(d=0;d<o.searches.length;d++)r=o.searches[d].e,p.searches.push(On.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(On.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:On.getValue(r.field,e)});var b={};if(this.getRequestQuery(u,e,s,p,b),On.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];(On.isNull(b[y])||""===b[y]||0===b[y].length)&&delete b[y]}u.skip in b&&u.take in b||null===l||(b[u.skip]=On.callAdaptorFunction(this,"onSkip",n,e),b[u.take]=On.callAdaptorFunction(this,"onTake",l,e));var S=this.pvt;return this.pvt={},"json"===this.options.requestType?{data:JSON.stringify(b,On.parse.jsonDateReplacer),url:h,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?h.replace(/\/*$/,r):h,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?On.callAdaptorFunction(this,"onDistinct",e.distincts):""),!e.distincts.length&&t.expand&&(o[t.expand]="onExpand"in this&&"onSelect"in i?On.callAdaptorFunction(this,"onExpand",{selects:On.getValue(i.onSelect.fieldNames,e),expands:e.expands},e):e.expands),o[t.select]="onSelect"in i&&!e.distincts.length?On.callAdaptorFunction(this,"onSelect",On.getValue(i.onSelect.fieldNames,e),e):"",o[t.count]=e.isCountRequired?On.callAdaptorFunction(this,"onCount",e.isCountRequired,e):"",o[t.search]=r.searches.length?On.callAdaptorFunction(this,"onSearch",r.searches,e):"",o[t.skip]="onSkip"in i?On.callAdaptorFunction(this,"onSkip",On.getValue(i.onSkip.nos,e),e):"",o[t.take]="onTake"in i?On.callAdaptorFunction(this,"onTake",On.getValue(i.onTake.nos,e),e):"",o[t.where]=r.filters.length||r.searches.length?On.callAdaptorFunction(this,"onWhere",r.filters,e):"",o[t.sortBy]=r.sorts.length?On.callAdaptorFunction(this,"onSortBy",r.sorts,e):"",o[t.group]=r.groups.length?On.callAdaptorFunction(this,"onGroup",r.groups,e):"",o[t.aggregates]=r.aggregates.length?On.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=On.timeZoneHandling;e&&!e.timeZoneHandling&&(On.timeZoneHandling=!1),t=On.parse.parseJson(t),On.timeZoneHandling=s}var a=n,h=a.pvtData||{},l=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,h.groups.length-1)),i&&i.lazyLoad.length&&h.groups.length)for(var f=0;f<i.lazyLoad.length;f++)if("onDemandGroupInfo"===i.lazyLoad[f].key){var g=i.lazyLoad[f].value.level;h.groups.length===g&&(d=!0)}}return d||this.getAggregateResult(h,t,p,l,i),On.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=Ln.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]},On.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"},On.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"},On.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:On.getObject(e,i),table:r},On.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]?On.getObject(o||n,t[a]):t[a],s.push(new Cn(r,"equal",i));return Cn.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,h=o,l={};e.aggregate&&(h=e.aggregate);for(var u=0;u<s.length;u++)(a=On.aggregates[s[u].type])&&(l[s[u].field+" - "+s[u].type]=a(h,s[u].field));i.aggregates=l}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=On.group(r,d[u]));var f=Pn.filterQueries(n.queries,"onGroup")[u].e;o=On.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=Pn.filterQueries(t.queries,"onSortBy"),e.groups=Pn.filterQueries(t.queries,"onGroup"),e.filters=Pn.filterQueries(t.queries,"onWhere"),e.searches=Pn.filterQueries(t.queries,"onSearch"),e.aggregates=Pn.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}(Tn),kn=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 Bn(e,t),e.prototype.getModuleName=function(){return"ODataAdaptor"},e.prototype.onPredicate=function(t,i,r){var n,o,s="",a=t.value,h=typeof a,l=t.field?e.getField(t.field):null;if(a instanceof Date&&(a="datetime'"+On.parse.replacer(a)+"'"),"string"===h&&(a="'"+(a=encodeURIComponent(a))+"'",r&&(l="cast("+l+", 'Edm.String')"),On.parse.isGuid(a)&&(o="guid"),t.ignoreCase&&(o||(l="tolower("+l+")"),a=a.toLowerCase())),n=On.odBiOperator[t.operator])return s+=l,s+=n,o&&(s+=o),s+a;if("substringof"===(n=c(this.getModuleName)||"ODataV4Adaptor"!==this.getModuleName()?On.odUniOperator[t.operator]:On.odv4UniOperator[t.operator])){var u=a;a=l,l=u}return s+=n+"(",s+=l+",",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&&On.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 Cn(t.fields[i],t.operator,t.key,t.ignoreCase));this.pvt.search=e},e.prototype.onSearch=function(t){return this.pvt.search=Cn.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){On.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 h=0;h<a.length;h++)c(a[h].__metadata)||delete a[h].__metadata}var l=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(l,t,g,null,i),On.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]=On.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||On.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]||On.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=On.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:On.getGuid(this.options.changeSet)},h="--"+o+"\n";return h+="Content-Type: multipart/mixed; boundary="+a.cSet.replace("--","")+"\n",this.pvt.changeSet=0,h+=this.generateInsertRequest(e.addedRecords,a,t),h+=this.generateUpdateRequest(e.changedRecords,a,t,n?n.changedRecords:[]),h+=this.generateDeleteRequest(e.deletedRecords,a,t),h+=a.cSet+"--\n",h+="--"+o+"--",{type:"POST",url:s,dataType:"json",contentType:"multipart/mixed; charset=UTF-8;boundary="+o,data:h}},e.prototype.generateDeleteRequest=function(t,e,i){if(!t)return"";var r={method:"DELETE ",url:function(t,e,i){var r=On.getObject(i,t[e]);if("number"==typeof r||On.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 On.getObject(e.key,i)===On.getObject(e.key,t)})[0],e.key)});var o={method:this.options.updateType+" ",url:function(t,e,i){if("number"==typeof t[e][i]||On.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&&On.endsWith(r.url,this.options.batch)&&"post"===r.type.toLowerCase()){var o=i.getResponseHeader("Content-Type"),s=void 0,a=void 0,h=t+"";if(o=o.substring(o.indexOf("=batchresponse")+1),(h=h.split(o)).length<2)return{};h=h[1];var l=/(?:\bContent-Type.+boundary=)(changesetresponse.+)/i.exec(h);l&&h.replace(l[0],"");for(var c=l?l[1]:"",p=(h=h.split(c)).length;p>-1;p--)/\bContent-ID:/i.test(h[p])&&/\bHTTP.+201/.test(h[p])&&(s=parseInt(/\bContent-ID: (\d+)/i.exec(h[p])[1],10),n.addedRecords[s]&&(a=On.parse.parseJson(/^\{.+\}/m.exec(h[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(On.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}(Dn),En=(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}Bn(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 Pn)for(var a=this.getQueryRequest(i),h=0;h<a.filters.length;h++)a.filters[h].e.key===e.value&&(r=!0);return n=t.prototype.onPredicate.call(this,e,i,r),s&&(n=n.replace(/datetime'(.*)'$/,"$1")),On.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 e=t.split(".");e[0]in i||(i[e[0]]=[]),i[e[0]].push(e[1])}),Object.keys(i).forEach(function(t){-1===n.indexOf(t)&&n.push(t)}),n.forEach(function(t){r[t]=t in i?t+"("+e.options.select+"="+i[t].join(",")+")":t}),Object.keys(r).forEach(function(t){return o.push(r[t])}),o.join(",")},e.prototype.onDistinct=function(t){return"groupby(("+t.map(function(t){return kn.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 h=o&&o.pvtData,l=t.prototype.processBatchResponse.call(this,e,r,n,o,s);if(l)return l;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(h,e,p,null,r),On.isNull(u)?p.result:{result:p.result,count:u,aggregates:p.aggregates}}}(kn),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Bn(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=On.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 h=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)+h(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):"")})},h=0,l=e.addedRecords.length;h<l;h++)a(h);var u=function(o,a){e.changedRecords.forEach(function(a,h){r.options.updateType;var l=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)+l(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(h=0,l=e.changedRecords.length;h<l;h++)u(h);var c=function(r,o){e.deletedRecords.forEach(function(o,a){var h=function(t,e,i){var r=On.getObject(i,t[e]);if("number"==typeof r||On.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)+h(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(h=0,l=e.deletedRecords.length;h<l;h++)c(h);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,h={};if(n&&"post"!==n.type.toLowerCase()){var l=r&&n.getResponseHeader("DataServiceVersion"),u=l&&parseInt(l,10)||2;i&&i.isCountRequired&&(On.isNull(t.Count)||(a=t.Count)),u<3&&t.Items&&(t=t.Items),h.count=a,h.result=t,this.getAggregateResult(s,t,h,null,i)}return h.result=h.result||t,On.isNull(a)?h.result:{result:h.result,count:h.count,aggregates:h.aggregates}}}(kn),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Bn(e,t),e.prototype.processQuery=function(t,e,i){var r=(new Dn).processQuery(t,e,i),n=On.parse.parseJson(r.data),o={};if(n.param)for(var s=0;s<n.param.length;s++){var a=n.param[s],h=Object.keys(a)[0];o[h]=a[h]}o.value=n;return{data:JSON.stringify(o),url:r.url,pvtData:r.pvtData,type:"POST",contentType:"application/json; charset=utf-8"}}}(Dn),function(t){function e(){var e=t.call(this)||this;return s("beforeSend",Dn.prototype.beforeSend,e),e}return Bn(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"},On.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"},On.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},On.getAddParams(this,t,n)))}},e.prototype.processResponse=function(e,i,r,n,o,s,a){var h;if(e="batch"===(o?JSON.parse(o.data):e).action?On.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(h=0;h<e.added.length;h++)t.prototype.insert.call(this,i,e.added[h]);if(e.changed)for(h=0;h<e.changed.length;h++)t.prototype.update.call(this,i,a.key,e.changed[h]);if(e.deleted)for(h=0;h<e.deleted.length;h++)t.prototype.remove.call(this,i,a.key,e.deleted[h]);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},On.getAddParams(this,t,r)))}},e.prototype.addParams=function(t){(new Dn).addParams(t)},e}(Mn)),jn=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 Bn(e,t),e.prototype.getModuleName=function(){return"CustomDataAdaptor"},e}(Dn),In=(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}Bn(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,h=t,l=o(this.schema.result,h.data);this.schema.count&&(s=o(this.schema.count,h.data)),this.schema.aggregates&&(a=c(a=o(this.schema.aggregates,h.data))?a:On.parse.parseJson(a));var u=n.pvtData||{},p={result:l,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}}(Dn),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=On.getGuid("cacheAdaptor");window.localStorage.setItem(n.guidId,JSON.stringify({keys:[],results:[]}));var o=n.guidId;return c(i)||setInterval(function(){var t;t=On.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 Bn(e,t),e.prototype.generateKey=function(t,e){var i=this.getQueryRequest(e),r=Pn.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 h=0;h<s.e.predicates.length;h++)a.queries.push({fn:"onWhere",e:s.e.predicates[h],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=On.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&&On.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={},h=(a=On.parse.parseJson(window.localStorage.getItem(this.guidId))).keys.indexOf(s);for(-1!==h&&(a.results.splice(h,1),a.keys.splice(h,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)&&On.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}(Dn)),Rn=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 En||t.adaptor instanceof jn)&&!t.url,requiresFormat:t.requiresFormat}):On.throwError("DataManager: Invalid arguments"),void 0!==n.requiresFormat||On.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 kn,this.dataSource.offline=!1,this.ready=this.executeQuery(e||new Pn),this.ready.then(function(t){r.dataSource.offline=!0,r.isDataAvailable=!0,n.json=t.result,r.adaptor=new Mn})):this.adaptor=n.offline?new Mn:new kn,!n.jsonp&&this.adaptor instanceof kn&&(n.jsonp="callback"),this.adaptor=i||this.adaptor,n.enableCaching&&(this.adaptor=new In(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 Pn||On.throwError("DataManager - executeLocal() : A query is required to execute"),this.dataSource.json||On.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&&On.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 Pn||On.throwError("DataManager - executeQuery() : A query is required to execute");var a=new An,h={query:e};if(!this.dataSource.offline&&void 0!==this.dataSource.url&&""!==this.dataSource.url||!c(this.adaptor[s])||this.isCustomDataAdaptor(this.adaptor)){var l=this.adaptor.processQuery(this,e);c(this.adaptor[s])?!c(l.url)||this.isCustomDataAdaptor(this.adaptor)?this.makeRequest(l,a,h,e):(h=t.getDeferedArgs(e,l,h),a.resolve(h)):this.adaptor[s](l,a,h,e)}else t.nextTick(function(){var i=o.executeLocal(e);h=t.getDeferedArgs(e,i,h),a.resolve(h)});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,h){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=h,e.resolve(i)},h=function(t,e){var h=new An,l={parent:i};r.subQuery.isChild=!0;var u=n.adaptor.processQuery(n,r.subQuery,t?n.adaptor.processResponse(t):e),c=n.makeRequest(u,h,l,r.subQuery);return o||h.then(function(e){t&&(On.buildHierarchy(r.subQuery.fKey,r.subQuery.fromTable,t,e,r.subQuery.key),a(t,e.count,e.xhr))},s),c},l=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=On.parse.parseJson(t));var i=n.adaptor.processResponse(t,n,r,e.httpRequest,e),l=0,p=null,d=t.virtualSelectRecords;r.isCountRequired&&(l=i.count,p=i.aggregates,i=i.result),r.subQuery?o||h(i,e):a(i,l,e.httpRequest,e.type,t,p,d)},s);if(this.isCustomDataAdaptor(this.adaptor)){this.ajaxReqOption=l;var p=l;this.adaptor.options.getData({data:p.data,onSuccess:p.onSuccess,onFailure:p.onFailure})}else{var d=new ii(l);d.beforeSend=function(){n.beforeSend(d.httpRequest,d)},(l=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([l,h(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]),h=0;r.isCountRequired&&(h=s.count,s=s.result);var l=n.adaptor.processResponse(i[1],n,r.subQuery,n.requests[1].httpRequest,n.requests[1]);h=0,r.subQuery.isCountRequired&&(h=l.count,l=l.result),On.buildHierarchy(r.subQuery.fKey,r.subQuery.fromTable,s,l,r.subQuery.key),o=!1,a(s,h,n.requests[0].httpRequest)}):o=!1}return l},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 Pn&&(r=i,i=null);var s={url:i,key:e||this.dataSource.key},a=this.adaptor.batchRequest(this,t,s,r||new Pn,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 h=new An,l=new ii(a);return l.beforeSend=function(){o.beforeSend(l.httpRequest,l)},l.onSuccess=function(e,i){o.isGraphQLAdaptor(o.adaptor)&&(c(e.errors)||l.onFailure(JSON.stringify(e.errors))),h.resolve(o.adaptor.processResponse(e,o,null,i.httpRequest,i,t,s))},l.onFailure=function(t){h.reject([{error:t}])},l.send().catch(function(t){return!0}),h.promise}return this.adaptor.doAjaxRequest(a)},t.prototype.insert=function(t,e,i,r){e instanceof Pn&&(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=On.getObject(t,e)),i instanceof Pn&&(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 Pn&&(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{On.parse.parseJson(t)}catch(e){t=[]}t=this.adaptor.processResponse(On.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 An,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 ii(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}(),An=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)}}();(Di||(Di={})).mapsTitleFont={size:"14px",fontWeight:"Medium",color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"};var Nn,Fn=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:Vr};this.control.trigger(Vr,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(Ct(t).cloneNode(!0))}):t instanceof Element?e.appendChild(t.cloneNode(!0)):e.appendChild(Ct(t).cloneNode(!0)):e.appendChild(this.control.element.cloneNode(!0)),e},t.prototype.getModuleName=function(){return"Print"},t.prototype.destroy=function(t){},t}(),Vn=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=!(di.userAgent.toString().indexOf("HeadlessChrome")>-1),h='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'+r.control.svgObject.outerHTML+"</svg>",l=window.URL.createObjectURL(new Blob("SVG"===t?[h]:[(new XMLSerializer).serializeToString(r.control.svgObject)],{type:"image/svg+xml"}));if("SVG"===t)i?fe(e,t,l,a):n(null);else{var u=new Image,c=s.getContext("2d");u.onload=function(){c.drawImage(u,0,0),window.URL.revokeObjectURL(l),i?fe(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=l}})},t.prototype.getModuleName=function(){return"ImageExport"},t.prototype.destroy=function(t){},t}(),zn=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}(),Gn=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}(),_n=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}(),Hn=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"}}(),Wn=function(){function t(t){if(this.position7=-1,this.primitiveItems=new zn,this.prefix="<<",this.suffix=">>",this.resources=[],this.object=null,this.archive=!0,this.isFont=!1,void 0===t)this.primitiveItems=new zn,this.encrypt=!0,this.dictionaryProperties=new Hn;else{this.primitiveItems=new zn;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 Hn}}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 Gn(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(_n.newLine))},t.prototype.saveItems=function(t){t.write(_n.newLine);for(var e=this.primitiveItems.keys(),i=this.primitiveItems.values(),r=0;r<e.length;r++){var n=e[r];new Gn(n).save(t),t.write(_n.whiteSpace);i[r].save(t),t.write(_n.newLine)}},t}(),Un=function(){return function(t){this.sender=t}}(),qn=function(){return function(t){this.sender=t}}(),Kn=function(){return function(t){this.sender=t}}(),Yn=function(){return function(t){this.sender=t}}(),Jn=function(){return function(t,e){this.sender=t,this.state=e}}(),Xn=function(){return function(t){this.sender=t}}(),Qn=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}(),$n=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 Qn(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(_n.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}(),Zn=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 h=new FileReader;h.onloadend=function(){window.open(h.result,"_blank")||(window.location.href=h.result)},h.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}(),to=(function(){function t(){this.contentPos=0,this.bufferText="",this.bufferBlob=new Blob([""],{type:"text/plain"}),this.currentState="Initial",this.namespaceStack=[],this.namespaceStack.push(new to),this.namespaceStack[0].set("xmlns","http://www.w3.org/2000/xmlns/","Special"),this.namespaceStack.push(new to),this.namespaceStack[1].set("xml","http://www.w3.org/XML/1998/namespace","Special"),this.namespaceStack.push(new to),this.namespaceStack[2].set("","","Implied"),this.elementStack=[],this.elementStack.push(new eo),this.elementStack[0].set("","","",this.namespaceStack.length-1),this.attributeStack=[],Zn.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(),Zn.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 eo),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,"&amp;")).replace(/\</g,"&lt;")).replace(/\>/g,"&gt;"),e&&(t=t.replace(/\"/g,"&quot;")),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 to),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 io),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}()),eo=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}(),io=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}(),ro=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(ye(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,h=t.charCodeAt(++e);r+=this.utf8Len(this.toCodepoint(a,h))}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(ye(t,"string"),ye(e,"charIndex"),ye(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(ye(t,"bytes"),ye(e,"index"),ye(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 h=n[s];r+=String.fromCharCode(h),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 h=e.charCodeAt(i++);o[s]=h<2048?h: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,h=0;h<r;h++){var l=e.charCodeAt(s);l<=127?o[a]=l:l<2048?(o[a]=192|l>>6,o[++a]=128|63&l):l<55296||l>=57344?(o[a]=224|l>>12,o[++a]=128|l>>6&63,o[++a]=128|63&l):(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}(),no=function(){function t(t){this.bufferBlob=new Blob([""]),this.bufferText="",this.init(t),Zn.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 ro(!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(),Zn.save(t,this.buffer)},t.prototype.write=function(t){if(void 0===this.encoding)throw new Error("Object Disposed Exception: current writer is disposed");ye(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");ye(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 ro&&this.enc.destroy(),this.enc=void 0},t}(),oo=new Int16Array(286),so=new Uint8Array(286),ao=new Int16Array(30),ho=new Uint8Array(30),lo=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 uo(this,286,257,15),this.treeDistances=new uo(this,30,1,15),this.treeCodeLengths=new uo(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 ro(!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),h=this.stringStart+258-1,l=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]===l&&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<h;);if(n>o){if(this.matchStart=t,o=n,(s=n-this.stringStart)>=r)break;l=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[uo.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]*so[o];for(o=0;o<30;o++)a+=this.treeDistances.codeFrequencies[o]*ho[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(oo,so),this.treeDistances.setStaticCodes(ao,ho),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[uo.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;)oo[t]=uo.bitReverse(48+t<<8),so[t++]=8;for(;t<256;)oo[t]=uo.bitReverse(256+t<<7),so[t++]=9;for(;t<280;)oo[t]=uo.bitReverse(-256+t<<9),so[t++]=7;for(;t<286;)oo[t]=uo.bitReverse(-88+t<<8),so[t++]=8;for(t=0;t<30;t++)ao[t]=uo.bitReverse(t<<11),ho[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}(),uo=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 h=i,l=new Int32Array(4*i-2),u=new Int32Array(2*i-1),c=0;c<i;c++){var p=e[c],d=2*c;l[d]=p,l[d+1]=-1,u[c]=this.codeFrequency[p]<<8,e[c]=c}this.constructHuffmanTree(e,i,u,h,l),this.buildLength(l)},t.prototype.constructHuffmanTree=function(t,e,i,r,n){do{for(var o=t[0],s=t[--e],a=i[s],h=0,l=1;l<e;)l+1<e&&i[t[l]]>i[t[l+1]]&&l++,t[h]=t[l],l=2*(h=l)+1;for(;(l=h)>0&&i[t[h=Math.floor((l-1)/2)]]>a;)t[l]=t[h];t[l]=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,h=0,l=1;l<e;)l+1<e&&i[t[l]]>i[t[l+1]]&&l++,t[h]=t[l],l=2*(h=l)+1;for(;(l=h)>0&&i[t[h=Math.floor((l-1)/2)]]>a;)t[l]=t[h];t[l]=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,h=o[0]=s>>t.checkSumBitOffset;n>0;){var l=Math.min(n,t.checksumIterationCount);for(n-=l;--l>=0;)h+=a+=o[0]=255&i[r++];a%=t.checksumBase,h%=t.checksumBase}return s=h<<t.checkSumBitOffset|a},t.checkSumBitOffset=16,t.checksumBase=65521,t.checksumIterationCount=3800,t}(),po=[],fo=(function(){function t(){0===po.length&&t.initCrc32Table(),this.files=[],this.level="Normal",Zn.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 fo&&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,h=0;h<r.files.length;h++){i.getCompressedData(i.files[h]).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 fo&&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 fo){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,po);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,po),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 lo(!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,h=this.writeCentralDirectory(e,s,i,n);return t.push({localHeader:a,centralDir:h,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 h=new Blob(o,{type:"application/zip"});return r||Zn.save(t,h),h},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;po[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}()),go=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)}}(),mo=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 go(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 lo;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 Po){e=e.object}var i=e,r=e;null!=r&&((i=new $n).insert(0,r),this.items.setValue(this.dictionaryProperties.filter,i)),r=new Gn(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 Qn(n)),t.prototype.save.call(this,e,!1),e.write(this.dicPrefix),e.write(_n.newLine),i.length>0&&e.write(i),e.write(_n.newLine),e.write(this.dicSuffix),e.write(_n.newLine)},e.bytesToString=function(t){for(var e="",i=0;i<t.length;i++)e+=String.fromCharCode(t[i]);return e},e}(Wn),yo=function(){return function(t){this.sender=t}}(),bo=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={}))}(Nn||(Nn={}));var vo,wo=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===Nn.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===Nn.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}(),So=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}(),Po=function(){function t(t,e){this.index4=-1,this.position4=-1,this.objectIndex=-1,this.dictionaryProperties=new Hn,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 $n||t instanceof Wn||t instanceof Gn||t instanceof Qn||t instanceof mo||t instanceof So||t instanceof wo)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}(),Co=function(){function t(){this.action=null,this.dictionaryProperties=new Hn,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 Po(this.action))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dictionary",{get:function(){return void 0===this.pdfDictionary&&(this.pdfDictionary=new Wn),this.pdfDictionary},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){this.dictionary.items.setValue(this.dictionaryProperties.type,new Gn(this.dictionaryProperties.action))},Object.defineProperty(t.prototype,"element",{get:function(){return this.dictionary},enumerable:!0,configurable:!0}),t}(),xo=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)}}(),Oo=function(t){function e(e){var i=t.call(this)||this;return i.uniformResourceIdentifier="",i}return xo(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 wo(this.uniformResourceIdentifier))},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.dictionary.items.setValue(this.dictionaryProperties.s,new Gn(this.dictionaryProperties.uri))},e}(Co);!function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right"}(vo||(vo={}));var Bo;!function(t){t[t.Top=0]="Top",t[t.Middle=1]="Middle",t[t.Bottom=2]="Bottom"}(Bo||(Bo={}));var Lo;!function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right",t[t.Justify=3]="Justify"}(Lo||(Lo={}));var To;!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"}(To||(To={}));var Mo;!function(t){t[t.Miter=0]="Miter",t[t.Round=1]="Round",t[t.Bevel=2]="Bevel"}(Mo||(Mo={}));var Do;!function(t){t[t.Flat=0]="Flat",t[t.Round=1]="Round",t[t.Square=2]="Square"}(Do||(Do={}));var ko;!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"}(ko||(ko={}));var Eo;!function(t){t[t.Winding=0]="Winding",t[t.Alternate=1]="Alternate"}(Eo||(Eo={}));var jo;!function(t){t[t.Rgb=0]="Rgb",t[t.Cmyk=1]="Cmyk",t[t.GrayScale=2]="GrayScale",t[t.Indexed=3]="Indexed"}(jo||(jo={}));var Io;!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"}(Io||(Io={}));var Ro;!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"}(Ro||(Ro={}));var Ao;!function(t){t[t.Fit=0]="Fit",t[t.Center=1]="Center",t[t.Stretch=2]="Stretch",t[t.Tile=3]="Tile"}(Ao||(Ao={}));var No;!function(t){t[t.None=0]="None",t[t.LeftToRight=1]="LeftToRight",t[t.RightToLeft=2]="RightToLeft"}(No||(No={}));var Fo,Vo=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=Qn.min(1-n,1-o,1-s),h=1===a?0:(1-n-a)/(1-a),l=1===a?0:(1-o-a)/(1-a),u=1===a?0:(1-s-a)/(1-a);this.blackColor=a,this.cyanColor=h,this.magentaColor=l,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 jo.Rgb:i=this.rgbToString(e);break;case jo.GrayScale:i=this.grayScaleToString(e);break;case jo.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+_n.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 h=i/t.maxColourChannelValue,l=r/t.maxColourChannelValue,u=n/t.maxColourChannelValue;s=e?h.toString()+" "+l.toString()+" "+u.toString()+" RG":h.toString()+" "+l.toString()+" "+u.toString()+" rg",t.rgbStrings.setValue(o,s)}else s=a.toString();return s+_n.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"+_n.newLine},t.prototype.toArray=function(t){var e=new $n;switch(t){case jo.Rgb:e.add(new Qn(this.red)),e.add(new Qn(this.green)),e.add(new Qn(this.blue))}return e},t.rgbStrings=new zn,t.grayStringsSroke=new zn,t.grayStringsFill=new zn,t.maxColourChannelValue=255,t}(),zo=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)}}(),Go=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)}}(),_o=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 zo&&e instanceof Go&&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,h=i,l=r;this.x=s,this.y=a,this.height=l,this.width=h}}}(),Ho=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 zo(this.left,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return new Go(this.width,this.height)},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.topLeft+"x"+this.size},t}(),Wo=function(){function t(){}return t.prototype.clone=function(){return this},t}(),Uo=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)}}(),qo=function(t){function e(e){var i=t.call(this)||this;return i.pdfColor=e,i}return Uo(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 Vo(0,0,0),jo.Rgb,!1)},e}(Wo);!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"}(Fo||(Fo={}));var Ko;!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"}(Ko||(Ko={}));var Yo;!function(t){t[t.Standard=0]="Standard",t[t.TrueType=1]="TrueType",t[t.TrueTypeEmbedded=2]="TrueTypeEmbedded"}(Yo||(Yo={}));var Jo;!function(t){t[t.None=0]="None",t[t.Word=1]="Word",t[t.WordOnly=2]="WordOnly",t[t.Character=3]="Character"}(Jo||(Jo={}));var Xo;!function(t){t[t.None=0]="None",t[t.SuperScript=1]="SuperScript",t[t.SubScript=2]="SubScript"}(Xo||(Xo={}));var Qo;!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"}(Qo||(Qo={}));var $o;!function(t){t[t.Apple=0]="Apple",t[t.Microsoft=4]="Microsoft",t[t.Trimmed=6]="Trimmed"}($o||($o={}));var Zo;!function(t){t[t.Unknown=0]="Unknown",t[t.Symbol=1]="Symbol",t[t.Unicode=2]="Unicode",t[t.Macintosh=3]="Macintosh"}(Zo||(Zo={}));var ts;!function(t){t[t.AppleUnicode=0]="AppleUnicode",t[t.Macintosh=1]="Macintosh",t[t.Iso=2]="Iso",t[t.Microsoft=3]="Microsoft"}(ts||(ts={}));var es;!function(t){t[t.Undefined=0]="Undefined",t[t.Unicode=1]="Unicode"}(es||(es={}));var is;!function(t){t[t.Roman=0]="Roman",t[t.Japanese=1]="Japanese",t[t.Chinese=2]="Chinese"}(is||(is={}));var rs;!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"}(rs||(rs={}));var ns;!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"}(ns||(ns={}));var os,ss=function(){function t(t,e){this.scalingFactor=100,this.wordWrapType=Jo.Word,this.internalLineLimit=!0,this.wordWrapType=Jo.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?Bo.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?Xo.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}(),as=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}(),hs=function(){function t(){this.isOverloadWithPosition=!1}return t.prototype.layout=function(t,e,i,r,n,o,s){if(r instanceof _o){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 Go(r.width,r.height),this.rectangle=r,this.pageHeight=n,this.reader=new as(t)}else this.initialize(t,e,i,new _o(new zo(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 ls,e=new ls,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 ls;i.layoutLineHeight=this.getLineHeight();var r=[],n=this.size.width,o=this.getLineWidth(t)+e,s=os.FirstParagraphLine,a=!0;if(n<=0||Math.round(o)<=Math.round(n))this.addToLineResult(i,r,t,o,os.NewLineBreak|s);else{var h="",l="";o=e;var u=e,c=new as(t),p=c.peekWord();for(p.length!==c.length&&" "===p&&(l+=p,h+=p,c.position+=1,p=c.peekWord());null!=p;){l+=p;var d=this.getLineWidth(l.toString())+u;if(" "===l.toString()&&(l="",d=0),d>n){if(this.getWrapType()===Jo.None)break;if(l.length===p.length){if(this.getWrapType()===Jo.WordOnly){i.textRemainder=t.substring(c.position);break}if(1===l.length){h+=p;break}a=!1,l="",p=c.peek().toString();continue}if(this.getLineWidth(p.toString())>n?this.format.wordWrap=Jo.Character:void 0!==this.format&&null!==this.format&&(this.format.wordWrap=Jo.Word),this.getWrapType()===Jo.Character&&a)a=!1,l="",l+=h.toString(),p=c.peek().toString();else{" "!==(f=h.toString())&&this.addToLineResult(i,r,f,o,os.LayoutBreak|s),this.isOverloadWithPosition&&(n=this.clientSize.width),l="",h="",o=0,u=0,d=0,s=os.None,p=a?p:c.peekWord(),a=!0}}else h+=p,o=d,a?(c.readWord(),p=c.peekWord()):(c.read(),p=c.peek().toString())}if(h.length>0){var f=h.toString();this.addToLineResult(i,r,f,o,os.NewLineBreak|os.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 us;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 h=0,l=e.lines.length;h<l;h++){var u=s+e.lineHeight;if(!(u<=a||a<=0||o)){n=!1;break}var c=e.lines[h];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,os.FirstParagraphLine,null==this.format||this.format.rightToLeft;return(i=i.trim()).length!==t.text.length&&(r=this.getLineWidth(i),(t.lineType&os.FirstParagraphLine)>0&&(r+=this.getLineIndent(e))),t.text=i,t.width=r,t},t.prototype.getWrapType=function(){return null!=this.format?this.format.wordWrap:Jo.Word},t}(),ls=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 Go(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}(),us=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"}(os||(os={}));var cs,ps=function(){function t(t,e){this.fontStyle=Fo.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&Fo.Bold)>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"italic",{get:function(){return(this.style&Fo.Italic)>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"strikeout",{get:function(){return(this.style&Fo.Strikeout)>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"underline",{get:function(){return(this.style&Fo.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 ss||null==e)&&void 0===i&&void 0===r){var o=e;return this.measureString(t,o,0,0)}if("string"==typeof t&&(e instanceof ss||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 ss||null==i)&&"number"==typeof r&&"number"==typeof n){var s=new Go(e,0),a=i;return this.measureString(t,s,a,r,n)}if(null==t)throw Error('ArgumentNullException("text")');o=e,a=i;var h=(new hs).layout(t,this,a,o,!1,new Go(0,0));return r=t.length,n=h.empty?0:h.lines.length,h.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=as.spaces;r+=as.getCharsCount(t,n)*e.wordSpacing}return r},t.charSizeMultiplier=.001,t.syncObject=new Object,t}(),ds=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 fs,gs=function(){function t(){this.objectCollections=[],this.mainObjectCollection=new zn,this.primitiveObjectCollection=new zn}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 ms(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 zn,this.primitiveObjectCollection=new zn},t}(),ms=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}(),ys=function(){function t(t){this.isStreamCopied=!1,t instanceof ah&&(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 ro(!0),r=new no(i);if(void 0===t){var n=new ro(!0),o=new no(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"}(fs||(fs={}));var bs,vs=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)}}(),ws=function(t){function e(){var e=t.call(this)||this;return e.sections=null,e.tempDictionaryProperties=new Hn,e.items.setValue((new Hn).type,new Gn("Catalog")),e}return vs(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 Po(t))},enumerable:!0,configurable:!0}),e}(Wn),Ss=function(){function t(){this.objects=new zn,this.maxGenNumIndex=0,this.objectCount=0,this.dictionaryProperties=new Hn}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 mo),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 So(0,-1),!0);t.write(_n.xref),t.write(_n.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(_n.newLine+_n.startxref+_n.newLine),t.write(e.toString()+_n.newLine),t.write(_n.eof+_n.newLine)},t.prototype.saveTrailer=function(t,e,i){t.write(_n.trailer+_n.newLine);var r=this.trailer;r.items.setValue(this.dictionaryProperties.size,new Qn(this.objectCount+1)),(r=new Wn(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)+_n.newLine);for(var r=e;r<=e+i;++r){var n=this.objects.getValue(r),o="";o=n.type===fs.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?_n.f:_n.n)+_n.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(_n.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 So(s,0);if(i){this.document.pdfObjects.add(t),this.document.pdfObjects.trySetReference(t,n,void 0);var a=this.document.pdfObjects.count-1,h=this.document.pdfObjects.objectCollections[a].reference.objNumber,l=this.document.pdfObjects.objectCollections[this.document.pdfObjects.count-1];this.document.pdfObjects.mainObjectCollection.setValue(h,l),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 ws&&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(_n.whiteSpace),i.write(e.genNumber.toString()),i.write(_n.whiteSpace),i.write(_n.obj),i.write(_n.newLine),t.save(i);i.stream;i.write(_n.endObj),i.write(_n.newLine)},t.prototype.registerObject=function(t,e,i){"boolean"==typeof i?(this.objects.setValue(e.objNumber,new Ps(t,e,i)),this.maxGenNumIndex=Math.max(this.maxGenNumIndex,e.genNumber)):void 0===i&&(this.objects.setValue(e.objNumber,new Ps(t,e)),this.maxGenNumIndex=Math.max(this.maxGenNumIndex,e.genNumber))},t.dereference=function(t){return null!=t&&(t=t.object),t},t}(),Ps=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?fs.Normal:fs.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}(),Cs=function(){function t(){}return t.letter=new Go(612,792),t.note=new Go(540,720),t.legal=new Go(612,1008),t.a0=new Go(2380,3368),t.a1=new Go(1684,2380),t.a2=new Go(1190,1684),t.a3=new Go(842,1190),t.a4=new Go(595,842),t.a5=new Go(421,595),t.a6=new Go(297,421),t.a7=new Go(210,297),t.a8=new Go(148,210),t.a9=new Go(105,148),t.a10=new Go(74,105),t.b0=new Go(2836,4008),t.b1=new Go(2004,2836),t.b2=new Go(1418,2004),t.b3=new Go(1002,1418),t.b4=new Go(709,1002),t.b5=new Go(501,709),t.archE=new Go(2592,3456),t.archD=new Go(1728,2592),t.archC=new Go(1296,1728),t.archB=new Go(864,1296),t.archA=new Go(648,864),t.flsa=new Go(612,936),t.halfLetter=new Go(396,612),t.letter11x17=new Go(792,1224),t.ledger=new Go(1224,792),t}();!function(t){t[t.Portrait=0]="Portrait",t[t.Landscape=1]="Landscape"}(bs||(bs={}));var xs;!function(t){t[t.RotateAngle0=0]="RotateAngle0",t[t.RotateAngle90=1]="RotateAngle90",t[t.RotateAngle180=2]="RotateAngle180",t[t.RotateAngle270=3]="RotateAngle270"}(xs||(xs={}));var Os;!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"}(Os||(Os={}));var Bs;!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"}(Bs||(Bs={}));var Ls;!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"}(Ls||(Ls={}));var Ts;!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"}(Ts||(Ts={}));var Ms,Ds=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}(),ks=function(){function t(t){this.pageMargins=new Ds,this.pageSize=Cs.a4,this.rotateAngle=xs.RotateAngle0,this.pageOrientation=bs.Portrait,this.pageOrigin=new zo(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 bs.Portrait:this.pageSize=new Go(e,i);break;case bs.Landscape:this.pageSize=new Go(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 Go(t,e)},t.prototype.setSize=function(t){var e=Math.min(t.width,t.height),i=Math.max(t.width,t.height);this.orientation===bs.Portrait?this.pageSize=new Go(e,i):this.pageSize=new Go(i,e)},t}(),Es=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 Gn?(this.stream.write(t.toString()),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setGraphicsState)):(this.stream.write(_n.slash),this.stream.write(t),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setGraphicsState))},t.prototype.executeObject=function(t){this.stream.write(t.toString()),this.stream.write(_n.whiteSpace),this.writeOperator(_n.paintXObject),this.stream.write(_n.newLine)},t.prototype.closePath=function(){this.writeOperator(_n.closePath)},t.prototype.clipPath=function(t){this.stream.write(_n.clipPath),t&&this.stream.write(_n.evenOdd),this.stream.write(_n.whiteSpace),this.stream.write(_n.endPath),this.stream.write(_n.newLine)},t.prototype.closeFillStrokePath=function(t){this.stream.write(_n.closeFillStrokePath),t?(this.stream.write(_n.evenOdd),this.stream.write(_n.newLine)):this.stream.write(_n.newLine)},t.prototype.fillStrokePath=function(t){this.stream.write(_n.fillStroke),t?(this.stream.write(_n.evenOdd),this.stream.write(_n.newLine)):this.stream.write(_n.newLine)},t.prototype.fillPath=function(t){this.stream.write(_n.fill),t?(this.stream.write(_n.evenOdd),this.stream.write(_n.newLine)):this.stream.write(_n.newLine)},t.prototype.endPath=function(){this.writeOperator(_n.n)},t.prototype.closeFillPath=function(t){this.writeOperator(_n.closePath),this.stream.write(_n.fill),t?(this.stream.write(_n.evenOdd),this.stream.write(_n.newLine)):this.stream.write(_n.newLine)},t.prototype.closeStrokePath=function(){this.writeOperator(_n.closeStrokePath)},t.prototype.setTextScaling=function(t){this.stream.write(Qn.floatToString(t)),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setTextScaling)},t.prototype.strokePath=function(){this.writeOperator(_n.stroke)},t.prototype.restoreGraphicsState=function(){this.writeOperator(_n.restoreState)},t.prototype.saveGraphicsState=function(){this.writeOperator(_n.saveState)},t.prototype.startNextLine=function(t,e){void 0===t?this.writeOperator(_n.goToNextLine):t instanceof zo?(this.writePoint(t),this.writeOperator(_n.setCoords)):(this.writePoint(t,e),this.writeOperator(_n.setCoords))},t.prototype.showText=function(t){this.checkTextParam(t),this.writeText(t),this.writeOperator(_n.setText)},t.prototype.setLeading=function(t){this.stream.write(Qn.floatToString(t)),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setTextLeading)},t.prototype.beginPath=function(t,e){this.writePoint(t,e),this.writeOperator(_n.beginPath)},t.prototype.beginText=function(){this.writeOperator(_n.beginText)},t.prototype.endText=function(){this.writeOperator(_n.endText)},t.prototype.appendRectangle=function(t,e,i,r){t instanceof _o?this.appendRectangle(t.x,t.y,t.width,t.height):(this.writePoint(t,e),this.writePoint(i,r),this.writeOperator(_n.appendRectangle))},t.prototype.appendLineSegment=function(t,e){t instanceof zo?this.appendLineSegment(t.x,t.y):(this.writePoint(t,e),this.writeOperator(_n.appendLineSegment))},t.prototype.setTextRenderingMode=function(t){this.stream.write(t.toString()),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setRenderingMode)},t.prototype.setCharacterSpacing=function(t){this.stream.write(Qn.floatToString(t)),this.stream.write(_n.whiteSpace),this.stream.write(_n.setCharacterSpace),this.stream.write(_n.newLine)},t.prototype.setWordSpacing=function(t){this.stream.write(Qn.floatToString(t)),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setWordSpace)},t.prototype.showNextLineText=function(t,e){t instanceof wo?(this.checkTextParam(t),this.writeText(t),this.writeOperator(_n.setTextOnNewLine)):(this.checkTextParam(t),this.writeText(t,e),this.writeOperator(_n.setTextOnNewLine))},t.prototype.setColorSpace=function(t,e){if(t instanceof Gn&&"boolean"==typeof e){var i=t,r=(n=e)?_n.selectcolorspaceforstroking:_n.selectcolorspacefornonstroking;this.stream.write(i.toString()),this.stream.write(_n.whiteSpace),this.stream.write(r),this.stream.write(_n.newLine)}else{i=t;var n=e;this.setColorSpace(new Gn(i),n)}},t.prototype.modifyCtm=function(t){if(null==t)throw new Error("ArgumentNullException:matrix");this.stream.write(t.toString()),this.stream.write(_n.whiteSpace),this.writeOperator(_n.modifyCtm)},t.prototype.setFont=function(t,e,i){if("string"==typeof e)this.setFont(t,new Gn(e),i);else{if(null==t)throw new Error("ArgumentNullException:font");this.stream.write(e.toString()),this.stream.write(_n.whiteSpace),this.stream.write(Qn.floatToString(i)),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setFont)}},t.prototype.writeOperator=function(t){this.stream.write(t),this.stream.write(_n.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 wo&&void 0===e)this.stream.write(t.pdfEncode());else{var i=void 0,r=void 0;e?(i=wo.hexStringMark[0],r=wo.hexStringMark[1]):(i=wo.stringMark[0],r=wo.stringMark[1]),this.stream.write(i),this.stream.write(t),this.stream.write(r)}},t.prototype.writePoint=function(t,e){if(t instanceof zo&&void 0===e)this.writePoint(t.x,t.y);else{var i=t;this.stream.write(Qn.floatToString(i)),this.stream.write(_n.whiteSpace),e=this.updateY(e),this.stream.write(Qn.floatToString(e)),this.stream.write(_n.whiteSpace)}},t.prototype.updateY=function(t){return-t},t.prototype.write=function(t){var e="";e+=t,e+=_n.newLine,this.writeOperator(e)},t.prototype.writeComment=function(t){if(!(null!=t&&t.length>0))throw new Error("Invalid comment");var e="";e+=_n.comment,e+=_n.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(_n.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+=" "+_n.setDashPattern,this.stream.write(i),this.stream.write(_n.newLine)},t.prototype.setMiterLimit=function(t){this.stream.write(Qn.floatToString(t)),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setMiterLimit)},t.prototype.setLineWidth=function(t){this.stream.write(Qn.floatToString(t)),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setLineWidth)},t.prototype.setLineCap=function(t){this.stream.write(t.toString()),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setLineCapStyle)},t.prototype.setLineJoin=function(t){this.stream.write(t.toString()),this.stream.write(_n.whiteSpace),this.writeOperator(_n.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 zo&&e instanceof zo&&i instanceof zo?(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(_n.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(_n.whiteSpace)}null!=e&&(this.stream.write(e.toString()),this.stream.write(_n.whiteSpace)),i?this.writeOperator(_n.setColorAndPatternStroking):this.writeOperator(_n.setColorAndPattern)},t}(),js=function(){function t(t,e){this.pdfColor=new Vo(0,0,0),this.dashOffsetValue=0,this.penDashPattern=[0],this.pdfDashStyle=ko.Solid,this.pdfLineCap=0,this.pdfLineJoin=0,this.penWidth=1,this.internalMiterLimit=0,this.colorSpace=jo.Rgb,t instanceof Wo?this.setBrush(t):t instanceof Vo&&(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 ko.Custom:break;case ko.Dash:this.penDashPattern=[3,1];break;case ko.Dot:this.penDashPattern=[1,1];break;case ko.DashDot:this.penDashPattern=[3,1,1,1];break;case ko.DashDotDot:this.penDashPattern=[3,1,1,1,1,1];break;case ko.Solid:break;default:this.pdfDashStyle=ko.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 qo&&(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}(),Is=function(){function t(t){this.radDegFactor=180/Math.PI,this.transformationMatrix=new Rs(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+=Qn.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}(),Rs=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 zo(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}(),As=function(){return function(){this.pdf="PDF",this.text="Text",this.imageB="ImageB",this.imageC="ImageC",this.imageI="ImageI"}}(),Ns=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}(),Fs=function(){function t(t,e,i){this.dictionary=new Wn,this.dictionaryProperties=new Hn,this.dictionary.items.setValue(this.dictionaryProperties.CA,new Qn(t)),this.dictionary.items.setValue(this.dictionaryProperties.ca,new Qn(e)),this.dictionary.items.setValue(this.dictionaryProperties.BM,new Gn(i.toString()))}return Object.defineProperty(t.prototype,"element",{get:function(){return this.dictionary},enumerable:!0,configurable:!0}),t}(),Vs=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}(),zs=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}(),Gs=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)}}(),_s=function(t){function e(){var e=t.call(this)||this;return e.internalBounds=new _o(0,0,0,0),e.internalTemplateSize=new Go(0,0),e}return Gs(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 Go(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 zo(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 zo(0,0);this.draw(t,r)}else if(e instanceof zo)this.draw(t,e.x,e.y);else{this.drawHelper(t,e,i);var n=new Hs(this,new zo(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 qo(new Vo(0,0,0)):this.internalBrush},e.prototype.getFont=function(){return void 0===this.internalFont||null==this.internalFont?ah.defaultFont:this.internalFont},e.prototype.getPageFromGraphics=function(t){if(void 0!==t.page&&null!==t.page){return t.page}return t.currentPage},e}(zs),Hs=function(){function t(e,i,r,n){this.pageNumberFieldLocation=new zo,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 zo&&e instanceof _s?(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}(),Ws=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,h=0,l=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;t.charAt(t.length-1)===s.charAt(64)&&l--;for(var u=new Uint8Array(0|l);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[h++]=e,u[h++]=i,u[h++]=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}(),Us=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"}(Ms||(Ms={}));var qs,Ks=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=Ms.Unknown,this.mbitsPerComponent=8,this.dictionaryProperties=new Hn,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===Ms.Unknown&&this.checkIfJpeg()&&(this.mFormat=Ms.Jpeg,this.parseJpegImage()),this.reset(),this.mImageData=new Ws(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 Ws(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===Ms.Jpeg){this.imageData.internalBuffer.length;this.imageStream=new mo,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 Gn(this.dictionaryProperties.xObject)),this.imageStream.items.setValue(this.dictionaryProperties.subtype,new Gn(this.dictionaryProperties.image)),this.imageStream.items.setValue(this.dictionaryProperties.width,new Qn(this.width)),this.imageStream.items.setValue(this.dictionaryProperties.height,new Qn(this.height)),this.imageStream.items.setValue(this.dictionaryProperties.bitsPerComponent,new Qn(this.bitsPerComponent)),this.imageStream.items.setValue(this.dictionaryProperties.filter,new Gn(this.dictionaryProperties.dctdecode)),this.imageStream.items.setValue(this.dictionaryProperties.colorSpace,new Gn(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 Wn;return t.items.setValue(this.dictionaryProperties.columns,new Qn(this.width)),t.items.setValue(this.dictionaryProperties.blackIs1,new Us(!0)),t.items.setValue(this.dictionaryProperties.k,new Qn(-1)),t.items.setValue(this.dictionaryProperties.predictor,new Qn(15)),t.items.setValue(this.dictionaryProperties.bitsPerComponent,new Qn(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 Ws(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}(),Ys=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}(),Js=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 Go(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=Ys.horizontalResolution,o=Ys.verticalResolution;return this.getPointSize(t,e,n,o)}var s=new Ys(i),a=new Ys(r),h=s.convertUnits(t,Ro.Pixel,Ro.Point),l=a.convertUnits(e,Ro.Pixel,Ro.Point);return new Go(h,l)},t}(),Xs=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)}}(),Qs=function(t){function e(e){var i=t.call(this)||this;return i.imageStatus=!0,i.dictionaryProperties=new Hn,i.loadImage(e),i}return Xs(e,t),e.prototype.loadImage=function(t){this.initializeAsync(t)},e.prototype.initializeAsync=function(t){var e=new Ws(t.length);e.writeFromBase64String(t),this.decoder=new Ks(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}(Js),$s=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}(),Zs=function(){return function(){}}(),ta=function(){return function(){}}(),ea=function(){return function(){}}(),ia=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}(),ra=function(){return function(){}}(),na=function(){return function(){}}(),oa=function(){return function(){}}(),sa=function(){return function(){}}(),aa=function(){return function(){}}(),ha=function(){return function(){}}(),la=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}(),ua=function(){return function(){}}(),ca=function(){return function(){}}(),pa=function(){return function(){}}(),da=function(){return function(){}}(),fa=function(){return function(){}}(),ga=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}(),ma=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 zn),this.macintoshDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"microsoft",{get:function(){return null!==this.microsoftDictionary&&void 0!==this.microsoftDictionary||(this.microsoftDictionary=new zn),this.microsoftDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"macintoshGlyphs",{get:function(){return null!==this.internalMacintoshGlyphs&&void 0!==this.internalMacintoshGlyphs||(this.internalMacintoshGlyphs=new zn),this.internalMacintoshGlyphs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"microsoftGlyphs",{get:function(){return null!==this.internalMicrosoftGlyphs&&void 0!==this.internalMicrosoftGlyphs||(this.internalMicrosoftGlyphs=new zn),this.internalMicrosoftGlyphs},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){void 0===this.metrics&&(this.metrics=new ia),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 zn);for(var e=0;e<t;++e){var i=new $s,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 zn;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 Zs;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 ta;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 ea;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 ra;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 na;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 oa;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 sa;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 ha;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 aa;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===Zo.Macintosh?ts.Macintosh:ts.Microsoft;if(r!==Zo.Unknown)switch(i){case $o.Apple:this.readAppleCmapTable(t,r);break;case $o.Microsoft:this.readMicrosoftCmapTable(t,r);break;case $o.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 la;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===Zo.Unicode?this.microsoft:this.macintosh,n=new pa;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,h=0,l=0;l<o;l++)for(var u=n.startCount[l];u<=n.endCount[l]&&65535!==u;u++){if(0===n.idRangeOffset[l])a=u+n.idDelta[l]&65535;else{if((h=l+n.idRangeOffset[l]/2-o+u-n.startCount[l])>=n.glyphID.length)continue;a=n.glyphID[h]+n.idDelta[l]&65535}var c=new la;c.index=a,c.width=this.getWidth(c.index);var p=e===Zo.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 da;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 la;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 $s;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=Zo.Unknown;return t==ts.Microsoft&&e==es.Undefined?i=Zo.Symbol:t==ts.Microsoft&&e==es.Unicode?i=Zo.Unicode:t==ts.Macintosh&&e==is.Roman&&(i=Zo.Macintosh),i},t.prototype.addGlyph=function(t,e){var i=null;switch(e){case Zo.Unicode:i=this.microsoftGlyphs;break;case Zo.Macintosh:case Zo.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 h=o[a];if(this.getCmapEncoding(h.platformID,h.encodingID)===Zo.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 l=1e3/e.unitsPerEm;this.metrics.winAscent=r.sTypoAscender*l,this.metrics.macAscent=i.ascender*l,this.metrics.capHeight=0!==r.sCapHeight?r.sCapHeight:.7*e.unitsPerEm*l,this.metrics.winDescent=r.sTypoDescender*l,this.metrics.macDescent=i.descender*l,this.metrics.leading=(r.sTypoAscender-r.sTypoDescender+r.sTypoLineGap)*l,this.metrics.lineGap=Math.ceil(i.lineGap*l);var u=e.xMin*l,c=Math.ceil(this.metrics.macAscent+this.metrics.lineGap),p=e.xMax*l,d=this.metrics.macDescent;this.metrics.fontBox=new Ho(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(as.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 ua,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 zn,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 fa;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),h=this.readUInt16(this.offset);if(t.containsKey(h)||t.setValue(h,0),0==(a&ns.MoreComponents))break;s=0!=(a&ns.Arg1And2AreWords)?4:2,0!=(a&ns.WeHaveScale)?s+=2:0!=(a&ns.WeHaveAnXyScale)?s+=4:0!=(a&ns.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 h=this.align(o);r=[];for(s=0;s<h;s++)r.push(0);var l=0,u=0,c=this.getTable("glyf");for(s=0;s<e.offsets.length;s++)if(i.push(l),u<n.length&&n[u]===s){++u,i[s]=l;var p=e.offsets[s],d=e.offsets[s+1]-p;if(d>0){this.offset=c.offset+p;r=this.read(r,l,d).buffer,l+=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 ga(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 ga(o);a.writeInt(65536),a.writeShort(s);var h=this.entrySelectors[s];return a.writeShort(16*(1<<(31&h))),a.writeShort(h),a.writeShort(16*(s-(1<<(31&h)))),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,h=0,l=0;l<s.length;l++){var u=s[l],c=this.getTable(u);if(!c.empty){if(t.writeString(u),"glyf"===u){var p=this.calculateCheckSum(r);t.writeInt(p),h=n}else if("loca"===u){p=this.calculateCheckSum(i);t.writeInt(p),h=o}else t.writeInt(c.checksum),h=c.length;t.writeUInt(a),t.writeUInt(h),a+=this.align(h)}}},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),h=[],l=0;l<a;l++)h.push(0);this.offset=s.offset;var u=this.read(h,0,s.length);t.writeBytes(u.buffer)}}},t.prototype.setOffset=function(t){this.offset=t},t.prototype.createInternals=function(){this.metrics=new ia;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!==as.whiteSpace.charCodeAt(0)&&(this.isFontPresent=!0)):r!==as.whiteSpace.charCodeAt(0)&&(this.isFontPresent=!1),t===as.whiteSpace&&null===i&&(i=new la);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 zn,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 la,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),h=a.newLocaSize,l=a.newLocaUpdated;return this.getFontProgram(l,s,n,h)},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}(),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)}}(),ba=function(){function t(){this.lineGap=0}return t.prototype.getAscent=function(t){return this.ascent*ps.charSizeMultiplier*this.getSize(t)},t.prototype.getDescent=function(t){return this.descent*ps.charSizeMultiplier*this.getSize(t)},t.prototype.getLineGap=function(t){return this.lineGap*ps.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 Xo.SubScript:e/=this.subScriptSizeFactor;break;case Xo.SuperScript:e/=this.superscriptSizeFactor}return e},t.prototype.clone=function(){return this.widthTable=va.clone(),this},Object.defineProperty(t.prototype,"widthTable",{get:function(){return this.internalWidthTable},set:function(t){this.internalWidthTable=t},enumerable:!0,configurable:!0}),t}(),va=function(){function t(){}return t.clone=function(){return null},t}(),wa=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 ya(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 $n(this.widths)},e}(va),Sa=function(){function t(t,e){if(this.nameString="ABCDEFGHIJKLMNOPQRSTUVWXYZ",this.dictionaryProperties=new Hn,this.isCompress=!1,this.isEmbedFont=!1,this.cmapPrefix="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap"+_n.newLine+"/CIDSystemInfo << /Registry (Adobe)/Ordering (UCS)/Supplement 0>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange"+_n.newLine,this.cmapEndCodespaceRange="endcodespacerange"+_n.newLine,this.cmapBeginRange="beginbfrange"+_n.newLine,this.cmapEndRange="endbfrange"+_n.newLine,this.cmapSuffix="endbfrange\nendcmap\nCMapName currentdict /CMap defineresource pop\nend end"+_n.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 Ws(this.fontString.length);t.writeFromBase64String(this.fontString),this.fontData=t.internalBuffer,this.ttfReader=new ma(this.fontData),this.ttfMetrics=this.ttfReader.metrics},t.prototype.createInternals=function(){this.fontDictionary=new Wn,this.fontProgram=new mo,this.cmap=new mo,this.descendantFont=new Wn,this.metrics=new ba,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 wa(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 qn(this),this.descendantFont.items.setValue(this.dictionaryProperties.type,new Gn(this.dictionaryProperties.font)),this.descendantFont.items.setValue(this.dictionaryProperties.subtype,new Gn(this.dictionaryProperties.cIDFontType2)),this.descendantFont.items.setValue(this.dictionaryProperties.baseFont,new Gn(this.subsetName)),this.descendantFont.items.setValue(this.dictionaryProperties.cIDToGIDMap,new Gn(this.dictionaryProperties.identity)),this.descendantFont.items.setValue(this.dictionaryProperties.dw,new Qn(1e3)),this.fontDescriptor=this.createFontDescriptor(),this.descendantFont.items.setValue(this.dictionaryProperties.fontDescriptor,new Po(this.fontDescriptor));var t=this.createSystemInfo();this.descendantFont.items.setValue(this.dictionaryProperties.cIDSystemInfo,t)},t.prototype.createFontDescriptor=function(){var t=new Wn,e=this.ttfReader.metrics;return t.isFont=!0,t.items.setValue(this.dictionaryProperties.type,new Gn(this.dictionaryProperties.fontDescriptor)),t.items.setValue(this.dictionaryProperties.fontName,new Gn(this.subsetName)),t.items.setValue(this.dictionaryProperties.flags,new Qn(this.getDescriptorFlags())),t.items.setValue(this.dictionaryProperties.fontBBox,$n.fromRectangle(this.getBoundBox())),t.items.setValue(this.dictionaryProperties.missingWidth,new Qn(e.widthTable[32])),t.items.setValue(this.dictionaryProperties.stemV,new Qn(e.stemV)),t.items.setValue(this.dictionaryProperties.italicAngle,new Qn(e.italicAngle)),t.items.setValue(this.dictionaryProperties.capHeight,new Qn(e.capHeight)),t.items.setValue(this.dictionaryProperties.ascent,new Qn(e.winAscent)),t.items.setValue(this.dictionaryProperties.descent,new Qn(e.winDescent)),t.items.setValue(this.dictionaryProperties.leading,new Qn(e.leading)),t.items.setValue(this.dictionaryProperties.avgWidth,new Qn(e.widthTable[32])),t.items.setValue(this.dictionaryProperties.fontFile2,new Po(this.fontProgram)),t.items.setValue(this.dictionaryProperties.maxWidth,new Qn(e.widthTable[32])),t.items.setValue(this.dictionaryProperties.xHeight,new Qn(0)),t.items.setValue(this.dictionaryProperties.stemH,new Qn(0)),t},t.prototype.createCmap=function(){this.cmap.cmapBeginSave=new yo(this)},t.prototype.createFontDictionary=function(){this.fontDictionary.isFont=!0,this.fontDictionary.fontDictionaryBeginSave=new Kn(this),this.fontDictionary.items.setValue(this.dictionaryProperties.type,new Gn(this.dictionaryProperties.font)),this.fontDictionary.items.setValue(this.dictionaryProperties.baseFont,new Gn(this.subsetName)),this.fontDictionary.items.setValue(this.dictionaryProperties.subtype,new Gn(this.dictionaryProperties.type0)),this.fontDictionary.items.setValue(this.dictionaryProperties.encoding,new Gn(this.dictionaryProperties.identityH));var t=new $n,e=new Po(this.descendantFont);t.isFont=!0,t.add(e),this.fontDictionary.items.setValue(this.dictionaryProperties.descendantFonts,t)},t.prototype.createFontProgram=function(){this.fontProgram.fontProgramBeginSave=new bo(this)},t.prototype.createSystemInfo=function(){var t=new Wn;return t.items.setValue(this.dictionaryProperties.registry,new wo("Adobe")),t.items.setValue(this.dictionaryProperties.ordering,new wo(this.dictionaryProperties.identity)),t.items.setValue(this.dictionaryProperties.supplement,new Qn(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 Po(this.cmap))},t.prototype.fontProgramBeginSave=function(){this.isCompress=!0,this.generateFontProgram()},t.prototype.getDescendantWidth=function(){var t=new $n;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];(l=this.ttfReader.getGlyph(n)).empty||e.push(l)}e.sort(function(t,e){return t.index-e.index});var o=0,s=0,a=!1,h=new $n;for(r=0;r<e.length;r++){var l=e[r];a||(a=!0,o=l.index,s=l.index-1),(s+1!==l.index||r+1===e.length)&&e.length>1&&(t.add(new Qn(o)),0!==r&&t.add(h),o=l.index,h=new $n),h.add(new Qn(l.width)),r+1===e.length&&(t.add(new Qn(o)),t.add(h)),s=l.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)+_n.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+=_n.whiteSpace,o+=this.cmapBeginRange),s-=1;var h=e[a];o+=this.toHexString(h,!0)+this.toHexString(h,!0)+this.toHexString(t.getValue(h),!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 zn: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|=rs.FixedPitch),e.isSymbol?t|=rs.Symbolic:t|=rs.Nonsymbolic,e.isItalic&&(t|=rs.Italic),e.isBold&&(t|=rs.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 _o(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 zn);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}(),Pa=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 zn;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 Ca,a=new Ca;n<t.length;)if(o=t[n++],0===this.ligature(o,a)){var h=this.getShapeCount(o);r=1===h?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 Ca).Value=o,a.Shapes=h,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}(),Ca=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}(),xa=function(){function t(){this.indexes=[],this.indexLevels=[],this.mirroringShapeCharacters=new zn,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 Oa;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 h=t;;){for(;h<=e&&!(this.indexLevels[h]>=i);)h+=1;if(h>e)break;for(var l=h+1;l<=e&&!(this.indexLevels[l]<i);)l+=1;this.reArrange(h,l),h=l+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}(),Oa=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 h=this.getLength(s,e,a),l=s===t?r:this.result[s-1];if(l!==this.EN&&(l=h===e?n:this.result[h]),l===this.EN)for(var u=s;u<h;++u)this.result[u]=this.EN;o=h}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],h=this.getLength(s,e,a),l=0,u=0,c=0;s===t?l=r:(l=this.result[s-1])===this.AN?l=this.R:l===this.EN&&(l=this.R),h===e?u=n:(u=this.result[h])===this.AN?u=this.R:u===this.EN&&(u=this.R),c=l===u?l:0==(1&i)?this.L:this.R;for(var p=s;p<h;++p)this.result[p]=c;o=h}},t}(),Ba=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 Pa).shape(t,0),s=e.fontInternal.ttfReader;r=new Uint16Array(o.length);for(var a=0,h=0,l=o.length;h<l;h++){var u=o[h],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!==No.None){o=(new xa).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!==No.None){var a=(new Pa).shape(t,0);s=this.customLayout(a,e,i)}o=[];if(n){for(var h=s.split(""),l=h.length,u=0;u<l;u++)h[u]=this.addChars(r,h[u]);o=h}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=wo.toUnicodeArray(r,!1);return r=wo.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"}(qs||(qs={}));var La;!function(t){t[t.FitPage=0]="FitPage",t[t.FitElement=1]="FitElement",t[t.FitColumnsToPage=2]="FitColumnsToPage"}(La||(La={}));var Ta;!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"}(Ta||(Ta={}));var Ma,Da=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)}}(),ka=function(t){function e(e){var i=t.call(this)||this;return i.mbackground=new Vo(255,255,255),i.mbStroking=!1,i.mfunction=null,i.dictionaryProperties=new Hn,i.mpatternDictionary=new Wn,i.mpatternDictionary.items.setValue(i.dictionaryProperties.type,new Gn(i.dictionaryProperties.pattern)),i.mpatternDictionary.items.setValue(i.dictionaryProperties.patternType,new Qn(2)),i.shading=e,i.colorSpace=jo.Rgb,i}return Da(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 Us(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 Po(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 Gn(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 Wn),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 Po(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 $n(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 jo.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 Us(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}(Wo),Ea=function(){function t(t,e){if(this.dictionaryProperties=new Hn,this.writeTransformation=!0,void 0===t);else if(t instanceof Go&&void 0===e){this.content=new mo;var i=new Go(t.width,t.height);this.setSize(i),this.initialize()}else this.content=new mo,this.setSize(new Go(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 Va(this),e=new Fa(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 Ia,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 Gn(this.dictionaryProperties.xObject);this.content.items.setValue(this.dictionaryProperties.type,t)},t.prototype.addSubType=function(){var t=new Gn(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 _o(new zo(0,0),t),i=$n.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}(),ja=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)}}(),Ia=function(t){function e(e){var i=t.call(this,e)||this;return i.properties=new Wn,i}return ja(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 Gn(r),this.names.setValue(e,i),t instanceof ps?this.add(t,i):t instanceof Ea?this.add(t,i):t instanceof ka||t instanceof Na?this.add(t,i):t instanceof Fs?this.add(t,i):(t instanceof Js||t instanceof Qs)&&this.add(t,i)}return i},e.prototype.getNames=function(){null==this.pdfNames&&(this.pdfNames=new Ns);var t=this.items.getValue(this.dictionaryProperties.font);if(null!=t){Ss.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 $n,this.items.setValue(this.dictionaryProperties.procset,e));var i=new Gn(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 Gn(t)){e=i[r];break}null!=e&&this.pdfNames.remove(e)},e.prototype.generateName=function(){return Ra.getNewGuidString()},e.prototype.add=function(t,e){if(t instanceof ps){var i=null,r=this.items.getValue(this.dictionaryProperties.font);if(null!=r){var n=r;i=r,i=r}else i=new Wn,this.items.setValue(this.dictionaryProperties.font,i);i.items.setValue(e.value,new Po(t.element))}else if(t instanceof Ea){var o=void 0;null==(o=this.items.getValue(this.dictionaryProperties.xObject))&&(o=new Wn,this.items.setValue(this.dictionaryProperties.xObject,o)),o.items.setValue(e.value,new Po(t.element))}else if(t instanceof Wo){if(t instanceof ka||t instanceof Na){if(null!=(a=t.element)){var s=this.items.getValue(this.dictionaryProperties.pattern);null==s&&(s=new Wn,this.items.setValue(this.dictionaryProperties.pattern,s)),s.items.setValue(e.value,new Po(a))}}}else if(t instanceof Fs){var a=t.element,h=null;null==(h=this.items.getValue(this.dictionaryProperties.extGState))&&(h=new Wn,this.items.setValue(this.dictionaryProperties.extGState,h)),h.items.setValue(e.value,new Po(a))}else{o=this.Dictionary.items.getValue(this.dictionaryProperties.xObject);var l=void 0;void 0!==this.pdfDocument&&(l=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 l&&null!=l){if(void 0!==this.pdfDocument)for(var p=l.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 l=new Wn,this.pdfDocument.sections.element.items.getValue(this.dictionaryProperties.resources).items.setValue(this.dictionaryProperties.xObject,l);if(null==o&&(o=new Wn,this.Dictionary.items.setValue(this.dictionaryProperties.xObject,o)),u&&void 0!==c)o.items.setValue(e.value,c);else{n=new Po(t.element);o.items.setValue(e.value,n),void 0!==this.pdfDocument&&l.items.setValue(e.value,n)}}},e}(Wn),Ra=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}(),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)}}(),Na=function(t){function e(e,i){var r=t.call(this)||this;r.mStroking=!1,r.mLocation=new zo(0,0),r.mDictionaryProperties=new Hn;var n=null;return e instanceof Ho?n=e:e instanceof Go&&(n=new Ho(0,0,e.width,e.height)),null!==i&&i instanceof Ja&&(r.mPage=i),r.brushStream=new mo,r.mResources=new Ia,r.brushStream.items.setValue(r.mDictionaryProperties.resources,r.mResources),r.setBox(n),r.setObligatoryFields(),null!==i&&i instanceof Ja&&(r.mPage=i,r.graphics.colorSpace=i.document.colorSpace),r}return Aa(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 mo;var n=new Ia;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 Qn(1)),this.brushStream.items.setValue(this.mDictionaryProperties.paintType,new Qn(1)),this.brushStream.items.setValue(this.mDictionaryProperties.tilingType,new Qn(1)),this.brushStream.items.setValue(this.mDictionaryProperties.xStep,new Qn(this.mBox.right-this.mBox.left)),this.brushStream.items.setValue(this.mDictionaryProperties.yStep,new Qn(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 $n([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 $n([e[0],e[1],e[2],e[3],e[4],t]))}},e.prototype.setBox=function(t){this.mBox=t;var e=new _o(this.mBox.left,this.mBox.top,this.mBox.right,this.mBox.bottom);this.brushStream.items.setValue(this.mDictionaryProperties.bBox,$n.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 Va(this),e=new Fa(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 $n(this.mTransformationMatrix.matrix.elements)),t.brushStream.data=this.tempBrushStream.data,t.mResources=new Ia(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 h=r.getResources().getName(this);i.setColourWithPattern(null,h,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}(Wo),Fa=function(){function t(t,e,i){this.currentColorSpace=jo.Rgb,this.previousTextRenderingMode=To.Fill,this.previousCharacterSpacing=0,this.previousWordSpacing=0,this.previousTextScaling=100,this.procedureSets=new As,this.isNormalRender=!0,this.isUseFontSize=!1,this.isItalic=!1,this.isEmfTextScaled=!1,this.isEmf=!1,this.isEmfPlus=!1,this.isBaselineFormat=!0,this.emfScalingFactor=new Go(0,0),this.colorSpaceChanged=!1,this.dictionaryProperties=new Hn,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 Es?i:new Es(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 Go(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 Is),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 Vs),this.internalAutomaticFields},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){this.bStateSaved=!1,this.currentPen=null,this.currentBrush=null,this.currentFont=null,this.currentColorSpace=jo.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 _o(new zo(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 Is;null!=this.pageLayer&&this.getTranslateTransform(e.x,e.y+i.height,a),o&&this.getScaleTransform(r,n,a),this.pdfStreamWriter.modifyCtm(a);var h=this.getResources.getResources().getName(t);this.pdfStreamWriter.executeObject(h),this.restore(s);var l=t.graphics;if(null!=l)for(var u=0;u<l.automaticFields.automaticFields.length;u++){var c=l.automaticFields.automaticFields[u],p=new zo(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 Hs(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,h){if("string"==typeof t&&e instanceof ps&&(i instanceof js||null===i)&&(r instanceof Wo||null===r)&&"number"==typeof n&&"number"==typeof o&&(s instanceof ss||null===s)&&void 0===a)this.isOverloadWithPosition=!0,this.drawString(t,e,i,r,n,o,this.clientSize.width-n,0,s);else{var l=i,u=r,c=n,p=o,d=s,f=a,g=h,m=(new hs).layout(t,e,g,new Go(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,l,u,new _o(c,p,d,f),g),this.isEmfTextScaled=!1,this.emfScalingFactor=new Go(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 zo){var o=e,s=i;this.drawLine(t,o.x,o.y,s.x,s.y)}else{o=e,s=i;var a=r,h=n;this.stateControl(t,null,null);var l=this.streamWriter;l.beginPath(o,s),l.appendLineSegment(a,h),l.strokePath(),this.getResources.getResources().requireProcedureSet(this.procedureSets.pdf)}},t.prototype.drawRectangle=function(t,e,i,r,n,o){if(t instanceof js&&"number"==typeof e){var s=i;this.drawRectangle(t,null,e,s,r,n)}else if(t instanceof Wo&&"number"==typeof e){s=i;this.drawRectangle(null,t,e,s,r,n)}else{s=i;var a=r,h=n,l=o;if(e instanceof Na){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 zo(u,c),e.graphics.colorSpace=this.colorSpace}else e instanceof ka&&(e.colorSpace=this.colorSpace);e instanceof qo&&e.color.isEmpty&&(e=null);var p=t,d=e;this.stateControl(p,d,null),this.streamWriter.appendRectangle(s,a,h,l),this.drawPathHelper(p,d,!1)}},t.prototype.drawPathHelper=function(t,e,i,r){if("boolean"==typeof i){var n=i;this.drawPathHelper(t,e,Eo.Winding,n)}else{var o=null!=t,s=null!=e,a=(n=i)===Eo.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,h=n;t.save();var l=new Is;this.getTranslateTransform(s,a+h,l),this.getScaleTransform(r,n,l),this.pdfStreamWriter.write("q"),this.pdfStreamWriter.modifyCtm(l);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(_n.restoreState),this.pdfStreamWriter.write(_n.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,h=s.width,l=this.getHorizontalAlignShift(h,r.width,n),u=this.getLineIndent(s,n,r,0===t);l+=this.rightToLeft(n)?0:u;var c=r.x+l,p=this.shouldJustify(s,r.width,n)?r.width-u:h-u,d=e.lineHeight;o=new _o(c,a,p,d)}else o=new _o(0,0,0,0);return o},t.prototype.checkCorrectLayoutRectangle=function(t,e,i,r){var n=new _o(e,i,t.width,t.width);if(null!=r){switch(r.alignment){case Lo.Center:n.x-=n.width/2;break;case Lo.Right:n.x-=n.width}switch(r.lineAlignment){case Bo.Middle:n.y-=n.height/2;break;case Bo.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,h=0;h=null!=o&&o.subSuperScript===Xo.SubScript?a-(e.height+e.metrics.getDescent(o)):a-e.metrics.getAscent(o),this.shift=h,this.pdfStreamWriter.startNextLine(n.x,n.y-h),this.pdfStreamWriter.setLeading(+a);for(var l=0,u="",c=0;c<t.lines.length;c++)if(l+=t.lineHeight,n.y+l>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 _o(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,Eo.Winding):(this.pdfStreamWriter.appendRectangle(t),this.pdfStreamWriter.clipPath(e===Eo.Alternate))},t.prototype.applyStringSettings=function(t,e,i,r,n){i instanceof Na?(this.bCSInitialized=!1,i.graphics.colorSpace=this.colorSpace):i instanceof ka&&(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!==Bo.Top)switch(i.lineAlignment){case Bo.Middle:r=(e-t)/2;break;case Bo.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),h=0,l=a.length;h<l&&h!==this.startCutIndex;h++){var u=a[h],c=(u.text,u.width),p=this.getHorizontalAlignShift(c,r.width,i),d=this.getLineIndent(u,i,r,0===h);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 wo(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===Lo.Justify),a=i,h=this.justifyLine(t,e.width,r),l=new Ba;if(o||null!==r&&void 0!==r&&r.textDirection!==No.None){var u=null,c=null!==r&&void 0!==r&&r.alignment===Lo.Right,p=null;p=(u=null!==r&&void 0!==r&&r.textDirection!==No.None?l.layout(n,a,r.textDirection===No.RightToLeft,s,r):l.layout(n,a,c,s,r)).length>1?null!==r&&void 0!==r&&r.textDirection!==No.None?l.splitLayout(n,a,r.textDirection===No.RightToLeft,s,r):l.splitLayout(n,a,c,s,r):[n],this.drawUnicodeBlocks(u,p,a,r,h)}else if(s){var d=this.breakUnicodeLine(n,a,null);u=d.tokens,p=d.words;this.drawUnicodeBlocks(u,p,a,r,h)}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,h=0;try{null!==r&&void 0!==r&&(a=r.firstLineIndent,h=r.paragraphIndent,r.firstLineIndent=0,r.paragraphIndent=0);var l=i.getCharWidth(as.whiteSpace,r)+n,u=null!=r?r.characterSpacing:0;l+=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+l)}s>0&&this.streamWriter.startNextLine(-s,0)}finally{null!==r&&void 0!==r&&(r.firstLineIndent=a,r.paragraphIndent=h)}},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 wo(t);return e.converted=!0,e.encode=Nn.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 Sa){var r=e.fontInternal.ttfReader;e.setSymbols(t),i=r.convertString(t);var n=wo.toUnicodeArray(i,!1);i=wo.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=as.spaces,h=as.getCharsCount(r,a),l=0;if(o){s&&(n-=h*i.wordSpacing);l=(e-n)/h,this.pdfStreamWriter.setWordSpacing(l)}else s?this.pdfStreamWriter.setWordSpacing(i.wordSpacing):this.pdfStreamWriter.setWordSpacing(0);return l},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===Lo.Justify,s=e>=0&&n<e,a=as.spaces,h=as.getCharsCount(r,a)>0&&r[0]!==as.whiteSpace,l=(t.lineType&os.LayoutBreak)>0;return o&&s&&h&&(l||i.alignment===Lo.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),h=0;h=n.y+a+r.metrics.getAscent(o)+1.5*s.width;for(var l=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=h;this.drawLine(s,y,v,b,v),h+=i.lineHeight}if(r.strikeout){v=l;this.drawLine(s,y,v,b,v),l+=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 js(t.color,n):null!=e&&(o=new js(e,n)),o},t.prototype.getTextRenderingMode=function(t,e,i){var r=To.None;return r=null!=t&&null!=e?To.FillStroke:null!=t?To.Stroke:To.Fill,null!=i&&i.clipPath&&(r|=To.ClipFlag),r},t.prototype.getLineIndent=function(t,e,i,r){var n=0,o=(t.lineType&os.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!==Lo.Left)switch(i.alignment){case Lo.Center:r=(e-t)/2;break;case Lo.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!==No.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 ka&&(this.bCSInitialized=!1,e.colorSpace=this.colorSpace),e instanceof Na&&(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!=jo.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 qo||t instanceof Na)){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:Xo.None,n=null!=this.currentStringFormat?this.currentStringFormat.subSuperScript:Xo.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,Io.Normal);else if("number"==typeof e&&void 0===i)this.setTransparency(t,e,Io.Normal);else{null==this.trasparencies&&(this.trasparencies=new Ns);var r=null,n=new Ga(t,e,i);this.trasparencies.containsKey(n)&&(r=this.trasparencies.getValue(n)),null==r&&(r=new Fs(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 _o&&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 _o(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 Is;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 Is;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 Is),i.scale(t,e),i},t.prototype.rotateTransform=function(t){var e=new Is;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 Is),e.rotate(this.updateY(t)),e},t.prototype.save=function(){var t=new za(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 Na?(this.bCSInitialized=!1,e.graphics.colorSpace=this.colorSpace):e instanceof ka&&(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 _o?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 Ta.Start:this.pdfStreamWriter.beginPath(s.x,s.y);break;case Ta.Bezier3:var a=new zo(0,0),h=new zo(0,0),l=this.getBezierPoints(e,i,n,a,h);this.pdfStreamWriter.appendBezierSegment(s,l.p2,l.p3),n=l.i;break;case Ta.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)!==Ta.Bezier3)throw new Error("ArgumentException : errorMsg");if(n=e[r],++r,(i[r]&t.pathTypesValuesMask)!==Ta.Bezier3)throw new Error("ArgumentException : errorMsg");return o=e[r],{i:r,p2:n,p3:o}},t.prototype.checkFlags=function(t){(t&Ta.CloseSubpath)===Ta.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 h=0;for(h=0;h<s.length;h+=8)a=[s[h],s[h+1],s[h+2],s[h+3],s[h+4],s[h+5],s[h+6],s[h+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,h;Math.abs(o)<=90?(a=o,h=1):a=o/(h=Math.ceil(Math.abs(o)/90));for(var l=(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<h;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(l+c*v,u-p*S,l+c*(v-f*S),u-p*(S+f*v),l+c*(w+f*P),u-p*(P-f*w),l+c*w,u-p*P):g.push(l+c*v,u-p*S,l+c*(v+f*S),u-p*(S-f*v),l+c*(w-f*P),u-p*(P+f*w),l+c*w,u-p*P)}return g},t.pathTypesValuesMask=15,t.transparencyObject=!1,t}(),Va=function(){function t(t){this.sender=t}return t.prototype.getResources=function(){return this.sender.getResources()},t}(),za=function(){function t(t,e){this.internalTextRenderingMode=To.Fill,this.internalCharacterSpacing=0,this.internalWordSpacing=0,this.internalTextScaling=100,this.pdfColorSpace=jo.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}(),Ga=function(){return function(t,e,i){this.alphaPen=t,this.alphaBrush=e,this.blendMode=i}}(),_a=function(){function t(t,e){if(this.pdfColorSpace=jo.Rgb,this.isVisible=!0,this.sublayer=!1,this.contentLength=0,this.dictionaryProperties=new Hn,null===t)throw new Error("ArgumentNullException:page");if(this.pdfPage=t,this.clipPageTemplates=!0,void 0===e)this.content=new mo;else if(e instanceof mo||null===e){if(null===e)throw new Error("ArgumentNullException:stream");this.content=e}else this.content=new mo,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 Ua(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 Va(this.page);if(this.pdfGraphics=new Fa(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}(),Ha=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}(),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)||this;if(i.parentLayerCount=0,i.sublayer=!1,i.optionalContent=new Wn,e instanceof qa){i.page=e;var r=e;i.parseLayers(r)}return i}return Wa(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 _a(this.page);return i.name="",this.add(i),i}if(t instanceof _a){var r=this.list.push(t);return this.addLayer(r,t),r}return 0},e.prototype.addLayer=function(t,e){var i=new Po(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 Po(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 mo,r=new mo,n=[];n.push("q"),i.data=n,e.insert(0,new Po(i)),(n=[]).push("Q"),r.data=n,e.insert(e.count,new Po(r))},e.prototype.indexOf=function(t){if(null==t)throw new Error("ArgumentNullException: layer");return this.list.indexOf(t)},e}(Ha),qa=function(){function t(t){this.defLayerIndex=-1,this.modified=!1,this.dictionaryProperties=new Hn,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 Ua(this)),this.layerCollection},enumerable:!0,configurable:!0}),t.prototype.getResources=function(){return null==this.resources&&(this.resources=new Ia,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 $n,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}(),Ka=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 Hn,this.internalAnnotations=new $n,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 Po(t)),this.lists.push(t);var e=(new hs).layout(t.text,t.font,t.stringFormat,new Go(t.bounds.width,0),!1,new Go(0,0)),i=t.bounds.y;if(1===e.lines.length){var r=t.font.measureString(e.lines[0].text);t.bounds=new _o(new zo(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 Po(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 _o(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 Po(t)),this.lists.push(t),i+=t.bounds.height;else{var o=t.clone();o.bounds=new _o(new zo(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 Po(o)),this.lists.push(o),i+=o.bounds.height}}},t.prototype.setColor=function(t){var e=jo.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}(),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)}}(),Ja=function(t){function e(){var e=t.call(this,new Wn)||this;return e.annotationCollection=null,e.beginSave=null,e.initialize(),e}return Ya(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 Ka(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 Gn("Page")),this.dictionary.pageBeginDrawTemplate=new Xn(this)},e.prototype.setSection=function(t){this.section=t,this.dictionary.items.setValue(this.dictionaryProperties.parent,new Po(t))},e.prototype.resetProgress=function(){this.isProgressOn=!1},e.prototype.getClientSize=function(){var t=this.section.getActualBounds(this,!0);return new Go(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 _a(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 _a(this,!1);this.layers.add(n),this.section.drawTemplates(this,n,t,!0)}},e}(qa),Xa=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}(),Qa=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}(),$a=function(){function t(){}return Object.defineProperty(t.prototype,"left",{get:function(){return this.leftTemplate},set:function(t){this.leftTemplate=this.checkElement(t,Ts.Left)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.topTemplate},set:function(t){this.topTemplate=this.checkElement(t,Ts.Top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.rightTemplate},set:function(t){this.rightTemplate=this.checkElement(t,Ts.Right)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.bottomTemplate},set:function(t){this.bottomTemplate=this.checkElement(t,Ts.Bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"EvenLeft",{get:function(){return this.evenLeft},set:function(t){this.evenLeft=this.checkElement(t,Ts.Left)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"EvenTop",{get:function(){return this.evenTop},set:function(t){this.evenTop=this.checkElement(t,Ts.Top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"EvenRight",{get:function(){return this.evenRight},set:function(t){this.evenRight=this.checkElement(t,Ts.Right)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"EvenBottom",{get:function(){return this.evenBottom},set:function(t){this.evenBottom=this.checkElement(t,Ts.Bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OddLeft",{get:function(){return this.oddLeft},set:function(t){this.oddLeft=this.checkElement(t,Ts.Left)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OddTop",{get:function(){return this.oddTop},set:function(t){this.oddTop=this.checkElement(t,Ts.Top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OddRight",{get:function(){return this.oddRight},set:function(t){this.oddRight=this.checkElement(t,Ts.Right)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OddBottom",{get:function(){return this.oddBottom},set:function(t){this.oddBottom=this.checkElement(t,Ts.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!==Ts.None)throw new Error("NotSupportedException:Can not reassign the template element. Please, create new one.");t.type=e}return t},t}(),Za=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.leftValue=e.topValue=e.rightValue=e.bottomValue=e.stampValue=!0,e}return Za(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}($a),eh=function(){function t(t,e){this.pageAdded=new Xa,this.pdfPages=[],this.dictionaryProperties=new Hn,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 Po(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 th),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 Qa(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 $n,this.section=new Wn,this.state=new ih(this.pdfDocument),this.section.sectionBeginSave=new Jn(this,this.state),this.pageCount=new Qn(0),this.section.items.setValue(this.dictionaryProperties.count,this.pageCount),this.section.items.setValue(this.dictionaryProperties.type,new Gn(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 Ja;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 Po(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 Po(t);return this.pagesReferences.indexOf(i)},t.prototype.pageAddedMethod=function(t){var e=new Xa(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 Ja&&"boolean"==typeof e){var r=this.parent.document;return this.getActualBounds(r,t,e)}t=t,e=e,i=i;var n=new _o(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),h=this.getBottomIndentHeight(t,e,i);return n.x+=o,n.y+=s,n.width-=o+a,n.height-=s+h,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 _o(i.origin,i.size);t.items.setValue(this.dictionaryProperties.mediaBox,$n.fromRectangle(r));var n=0;n=rh.rotateFactor*i.rotate;var o=new Qn(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}(),ih=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}(),rh=function(){function t(t){this.sections=[],this.dictionaryProperties=new Hn,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 Qn(0),this.sectionCollection=new $n,this.pages=new Wn,this.pages.beginSave=new Un(this),this.pages.items.setValue(this.dictionaryProperties.type,new Gn("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 Wn),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 _o(new zo,e.size);t.items.setValue(this.dictionaryProperties.mediaBox,$n.fromRectangle(i))},t.prototype.add=function(t){if(void 0===t){var e=new eh(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 Po(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}(),nh=function(){function t(t){this.pdfPageCollectionIndex=new zn,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 Ja;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}(),oh=function(){function t(){this.referenceObjects=[],this.pdfFontCollection=new zn}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}(),sh=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)}}(),ah=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 oh,n=!1):n=i;var o=new gs;r.setMainObjectCollection(o);var s=new Ss;s.isMerging=n,s.document=r,r.setCrossTable(s);var a=new ws;return r.setCatalog(a),o.add(a),a.position=-1,r.sectionCollection=new rh(r),r.documentPageCollection=new nh(r),a.pages=r.sectionCollection,r}return sh(e,t),Object.defineProperty(e,"defaultFont",{get:function(){return null==this.defaultStandardFont&&(this.defaultStandardFont=new uh(Ko.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 ks(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 oh: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===jo.Rgb||this.pdfColorSpace===jo.Cmyk||this.pdfColorSpace===jo.GrayScale?this.pdfColorSpace:jo.Rgb},set:function(t){t===jo.Rgb||t===jo.Cmyk||t===jo.GrayScale?this.pdfColorSpace=t:this.pdfColorSpace=jo.Rgb},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"template",{get:function(){return null==this.pageTemplate&&(this.pageTemplate=new $a),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 ds(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}(ys),hh=function(){function t(){}return t.getMetrics=function(t,e,i){var r=null;switch(t){case Ko.Helvetica:r=this.getHelveticaMetrics(t,e,i);break;case Ko.Courier:r=this.getCourierMetrics(t,e,i);break;case Ko.TimesRoman:r=this.getTimesMetrics(t,e,i);break;case Ko.Symbol:r=this.getSymbolMetrics(t,e,i);break;case Ko.ZapfDingbats:r=this.getZapfDingbatsMetrics(t,e,i);break;default:r=this.getHelveticaMetrics(Ko.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 ba;return(e&Fo.Bold)>0&&(e&Fo.Italic)>0?(r.ascent=this.helveticaBoldItalicAscent,r.descent=this.helveticaBoldItalicDescent,r.postScriptName=this.helveticaBoldItalicName,r.size=i,r.widthTable=new wa(this.arialBoldWidth),r.height=r.ascent-r.descent):(e&Fo.Bold)>0?(r.ascent=this.helveticaBoldAscent,r.descent=this.helveticaBoldDescent,r.postScriptName=this.helveticaBoldName,r.size=i,r.widthTable=new wa(this.arialBoldWidth),r.height=r.ascent-r.descent):(e&Fo.Italic)>0?(r.ascent=this.helveticaItalicAscent,r.descent=this.helveticaItalicDescent,r.postScriptName=this.helveticaItalicName,r.size=i,r.widthTable=new wa(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 wa(this.arialWidth),r.height=r.ascent-r.descent),r},t.getCourierMetrics=function(t,e,i){var r=new ba;return(e&Fo.Bold)>0&&(e&Fo.Italic)>0?(r.ascent=this.courierBoldItalicAscent,r.descent=this.courierBoldItalicDescent,r.postScriptName=this.courierBoldItalicName,r.size=i,r.widthTable=new wa(this.fixedWidth),r.height=r.ascent-r.descent):(e&Fo.Bold)>0?(r.ascent=this.courierBoldAscent,r.descent=this.courierBoldDescent,r.postScriptName=this.courierBoldName,r.size=i,r.widthTable=new wa(this.fixedWidth),r.height=r.ascent-r.descent):(e&Fo.Italic)>0?(r.ascent=this.courierItalicAscent,r.descent=this.courierItalicDescent,r.postScriptName=this.courierItalicName,r.size=i,r.widthTable=new wa(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 wa(this.fixedWidth),r.height=r.ascent-r.descent),r},t.getTimesMetrics=function(t,e,i){var r=new ba;return(e&Fo.Bold)>0&&(e&Fo.Italic)>0?(r.ascent=this.timesBoldItalicAscent,r.descent=this.timesBoldItalicDescent,r.postScriptName=this.timesBoldItalicName,r.size=i,r.widthTable=new wa(this.timesRomanBoldItalicWidths),r.height=r.ascent-r.descent):(e&Fo.Bold)>0?(r.ascent=this.timesBoldAscent,r.descent=this.timesBoldDescent,r.postScriptName=this.timesBoldName,r.size=i,r.widthTable=new wa(this.timesRomanBoldWidth),r.height=r.ascent-r.descent):(e&Fo.Italic)>0?(r.ascent=this.timesItalicAscent,r.descent=this.timesItalicDescent,r.postScriptName=this.timesItalicName,r.size=i,r.widthTable=new wa(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 wa(this.timesRomanWidth),r.height=r.ascent-r.descent),r},t.getSymbolMetrics=function(t,e,i){var r=new ba;return r.ascent=this.symbolAscent,r.descent=this.symbolDescent,r.postScriptName=this.symbolName,r.size=i,r.widthTable=new wa(this.symbolWidth),r.height=r.ascent-r.descent,r},t.getZapfDingbatsMetrics=function(t,e,i){var r=new ba;return r.ascent=this.zapfDingbatsAscent,r.descent=this.zapfDingbatsDescent,r.postScriptName=this.zapfDingbatsName,r.size=i,r.widthTable=new wa(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}(),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)}}(),uh=function(t){function e(i,r,n){var o=t.call(this,r,void 0===n?i instanceof e?i.style:Fo.Regular:n)||this;return o.dictionaryProperties=new Hn,o.encodings=["Unknown","StandardEncoding","MacRomanEncoding","MacExpertEncoding","WinAnsiEncoding","PDFDocEncoding","IdentityH"],o.pdfFontFamily=void 0===i?Ko.Helvetica:i instanceof e?i.fontFamily:i,o.checkStyle(),o.initializeInternals(),o}return lh(e,t),Object.defineProperty(e.prototype,"fontFamily",{get:function(){return this.pdfFontFamily},enumerable:!0,configurable:!0}),e.prototype.checkStyle=function(){if(this.fontFamily===Ko.Symbol||this.fontFamily===Ko.ZapfDingbats){var t=this.style;t&=~(Fo.Bold|Fo.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*=ps.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=~(Fo.Underline|Fo.Strikeout),o=(this.style&n)==(i.style&n);e=r&&o}return e},e.prototype.initializeInternals=function(){ah.cache.search(this);var t=null,e=hh.getMetrics(this.pdfFontFamily,this.style,this.size);this.metrics=e,t=this.createInternals(),this.setInternals(t)},e.prototype.createInternals=function(){var t=new Wn;if(t.items.setValue(this.dictionaryProperties.type,new Gn(this.dictionaryProperties.font)),t.items.setValue(this.dictionaryProperties.subtype,new Gn(this.dictionaryProperties.type1)),t.items.setValue(this.dictionaryProperties.baseFont,new Gn(this.metrics.postScriptName)),this.fontFamily!==Ko.Symbol&&this.fontFamily!==Ko.ZapfDingbats){var e=this.encodings[Qo.WinAnsiEncoding];t.items.setValue(this.dictionaryProperties.encoding,new Gn(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}(ps),ch=function(){function t(t){this.dictionaryProperties=new Hn,this.pdfColor=new Vo(255,255,255),this.rectangle=new _o(0,0,0,0),this.pdfPage=null,this.textBrush=new qo(new Vo(0,0,0)),this.textFont=new uh(Ko.TimesRoman,10),this.format=new ss(Lo.Left),this.content="",this.pdfDictionary=new Wn,this.internalColor=new Vo,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 wo(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 Yn(this),this.pdfDictionary.items.setValue(this.dictionaryProperties.type,new Gn(this.dictionaryProperties.annot))},t.prototype.setPage=function(t){this.pdfPage=t,this.pdfDictionary.items.setValue(this.dictionaryProperties.p,new Po(this.pdfPage))},t.prototype.beginSave=function(){this.save()},t.prototype.save=function(){var t=new _o(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 zo(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,$n.fromRectangle(t)),this.dictionary.items.setValue(this.dictionaryProperties.ca,new Qn(this.darkness))},Object.defineProperty(t.prototype,"element",{get:function(){return this.pdfDictionary},enumerable:!0,configurable:!0}),t}(),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){return t.call(this,e)||this}return ph(e,t),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.dictionary.items.setValue(this.dictionaryProperties.subtype,new Gn(this.dictionaryProperties.link))},e}(ch),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(t){function e(e){var i=t.call(this,e)||this;return i.pdfAction=null,i}return fh(e,t),e.prototype.getSetAction=function(t){if(void 0===t)return this.pdfAction;this.pdfAction=t},e}(dh),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)}}(),yh=(function(t){function e(e,i){var r=t.call(this,e)||this;return r.pdfDestination=null,void 0!==i&&(r.destination=i),r}mh(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}}(dh),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 _o(t.bounds.x,0,t.bounds.width,t.bounds.height)},t}()),bh=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 _o(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}(),vh=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 _o(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}(),wh=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}(),Sh=function(){function t(){var t=new js(new Vo(0,0,0));t.dashStyle=ko.Solid;var e=new js(new Vo(0,0,0));e.dashStyle=ko.Solid;var i=new js(new Vo(0,0,0));i.dashStyle=ko.Solid;var r=new js(new Vo(0,0,0));r.dashStyle=ko.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}(),Ph=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}(),Ch=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 zo&&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 _o&&void 0!==e.width&&void 0===i)return this.drawHelper(t,e,null);if(e instanceof zo&&void 0===e.width&&i instanceof bh)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&"number"==typeof i&&(r instanceof bh||null==r)){var n=t.graphics.clientSize.width-e,o=new _o(e,i,n,0);return this.drawHelper(t,o,r)}if(e instanceof _o&&void 0!==e.width&&"boolean"==typeof i)return this.bEmbedFonts=i,this.drawHelper(t,e,null);var s=new vh,a=e,h=i;if(s.page=t,s.bounds=a,null!=s){var l=s.bounds.x,u=s.bounds.y;0===s.bounds.x&&(l=Sh.default.right.width/2),0===s.bounds.y&&(u=Sh.default.top.width/2);var c=new _o(l,u,s.bounds.width,s.bounds.height);s.bounds=c}s.format=null!=h?h:new bh;return this.layout(s)},t}(),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)}}(),Oh=function(t){function e(e){return t.call(this,e)||this}return xh(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 Bh;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 Lh(t.page,t.bounds,t.remainder,t.lastLineBounds)},e.prototype.layoutOnPage=function(t,e,i,r){var n=new Bh;n.remainder=t,n.page=e,i=this.checkCorrectBounds(e,i);var o=(new hs).layout(t,this.element.font,this.format,i,e.getClientSize().height,!1,new Go(0,0)),s=null==o.remainder,a=(r.format.break===La.FitElement||o.empty,e.graphics),h=this.element.getBrush();this.element instanceof jh&&(h.color=new Vo(0,0,255)),a.drawStringLayoutResult(o,this.element.font,this.element.pen,h,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 h=t.graphics.getTextVerticalAlignShift(r.height,e.height,this.format);return new _o(n,o+=h,s,a)},e}(yh),Bh=function(){return function(){}}(),Lh=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 xh(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}(wh),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,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 ps&&void 0===r?(s.content=e,s.elementValue=e,s.pdfFont=i):"string"==typeof e&&i instanceof ps&&r instanceof js&&void 0===n?(s.content=e,s.elementValue=e,s.pdfFont=i,s.pdfPen=r):"string"==typeof e&&i instanceof ps&&r instanceof Wo&&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 Th(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 uh&&null!=this.content?this.elementValue=uh.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 qo(new Vo(0,0,0)):this.pdfBrush},e.prototype.layout=function(t){return new Oh(this).layout(t)},e.prototype.drawText=function(t,e,i,r){if(e instanceof zo&&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 _o&&void 0!==e.width&&void 0===i)return this.drawText(t,e,null);if(e instanceof zo&&void 0===e.width&&i instanceof bh)return this.hasPointOverload=!0,this.drawText(t,e.x,e.y,i);if("number"==typeof e&&"number"==typeof i&&(r instanceof bh||null==r)){this.hasPointOverload=!0;var n=t.graphics.clientSize.width-e,o=new _o(e,i,n,0);return this.drawText(t,o,r)}if(e instanceof _o&&void 0!==e.width&&"boolean"==typeof i)return this.drawText(t,e,null);var s=new hs;if(this.hasPointOverload){var a=s.layout(this.value,this.font,this.stringFormat,new Go(t.graphics.clientSize.width-e.x,0),!0,t.graphics.clientSize),h=void 0,l=e,u=i;if((m=new vh).page=t,m.bounds=l,m.format=null!=u?u:new bh,a.lines.length>1){if(this.text=a.layoutLines[0].text,m.bounds.y<=m.page.graphics.clientSize.height){var c=new zo(m.bounds.x,m.bounds.y);h=this.layout(m);for(var p=new _o(0,h.bounds.y+a.lineHeight,t.graphics.clientSize.width,a.lineHeight),d=1;d<a.lines.length;d++)if(m.page=h.page,m.bounds=new _o(new zo(p.x,p.y),new Go(p.width,p.height)),this.text=a.layoutLines[d].text,p.y+a.lineHeight>h.page.graphics.clientSize.height&&(m.page=m.page.graphics.getNextPage(),p=c.y>h.page.graphics.clientSize.height-h.bounds.height?new _o(0,h.bounds.height,h.page.graphics.clientSize.width,a.lineHeight):new _o(0,0,h.page.graphics.clientSize.width,a.lineHeight),m.bounds=p),h=this.layout(m),d!==a.lines.length-1)p=new _o(0,h.bounds.y+a.lineHeight,h.page.graphics.clientSize.width,a.lineHeight);else{var f=this.font.measureString(this.text,this.format).width;h=this.calculateResultBounds(h,f,h.page.graphics.clientSize.width,0)}}return h}var g=this.font.measureString(this.text,this.format);return m.bounds.y<=m.page.graphics.clientSize.height&&(h=this.layout(m),h=this.calculateResultBounds(h,g.width,h.page.graphics.clientSize.width,0)),h}h=s.layout(this.value,this.font,this.stringFormat,new Go(e.width,0),!1,t.graphics.clientSize);var m,y=void 0;l=e,u=i;if((m=new vh).page=t,m.bounds=l,m.format=null!=u?u:new bh,h.lines.length>1){if(this.text=h.layoutLines[0].text,m.bounds.y<=m.page.graphics.clientSize.height){c=new zo(m.bounds.x,m.bounds.y);y=this.layout(m);for(p=new _o(l.x,y.bounds.y+h.lineHeight,l.width,h.lineHeight),d=1;d<h.lines.length;d++)if(m.page=y.page,m.bounds=new _o(p.x,p.y,p.width,p.height),this.text=h.layoutLines[d].text,p.y+h.lineHeight>y.page.graphics.clientSize.height&&(m.page=m.page.graphics.getNextPage(),p=c.y>y.page.graphics.clientSize.height-y.bounds.height?new _o(l.x,h.lineHeight,l.width,h.lineHeight):new _o(l.x,0,l.width,h.lineHeight),m.bounds=p),y=this.layout(m),d!==h.lines.length-1)p=new _o(l.x,y.bounds.y+h.lineHeight,l.width,h.lineHeight);else{f=this.font.measureString(this.text,this.format).width;y=this.calculateResultBounds(y,f,l.width,l.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,l.width,l.x)),y},e.prototype.calculateResultBounds=function(t,e,i,r){return null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Lo.Center?(t.bounds.x=r+(i-e)/2,t.bounds.width=e):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Lo.Right?(t.bounds.x=r+(i-e),t.bounds.width=e):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Lo.Justify?(t.bounds.x=r,t.bounds.width=i):(t.bounds.width=r,t.bounds.width=e),t},e}(Ch),Dh=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,i){var r=t.call(this,e)||this;return void 0!==i&&(r.uri=i),r}return Dh(e,t),Object.defineProperty(e.prototype,"uriAction",{get:function(){return void 0===this.pdfUriAction&&(this.pdfUriAction=new Oo),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 Gn(this.dictionaryProperties.link));this.uriAction.element;this.dictionary.items.setValue(this.dictionaryProperties.a,this.uriAction.element)},e}(gh),Eh=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(){var e=t.call(this)||this;e.uniformResourceLocator="",e.uriAnnotation=null,e.recalculateBounds=!1,e.defaultBorder=new $n;for(var i=0;i<3;i++)e.defaultBorder.add(new Qn(0));return e}return Eh(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 Ja){var i=new hs,r=this.font.style;if(e instanceof zo){this.recalculateBounds=!0,this.font.style=Fo.Underline;if(1===(a=i.layout(this.value,this.font,this.stringFormat,new Go(t.graphics.clientSize.width-e.x,0),!0,t.graphics.clientSize)).lines.length){var n=this.font.measureString(this.value),o=new _o(e,n);o=this.calculateBounds(o,n.width,t.graphics.clientSize.width,e.x),this.uriAnnotation=new kh(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 Go(e.width,0),!1,new Go(0,0));if(this.font.style=Fo.Underline,1===a.lines.length){n=this.font.measureString(this.value),o=new _o(new zo(e.x,e.y),n);o=this.calculateBounds(o,n.width,e.width,e.x),this.uriAnnotation=new kh(o,this.url),this.uriAnnotation.dictionary.items.setValue("Border",this.defaultBorder),t.annotations.add(this.uriAnnotation);var h=this.drawText(t,e);return this.font.style=r,h}h=this.drawMultipleLineWithBounds(a,t,e);return this.font.style=r,h}var l=new Ja;return l=t.page,this.draw(l,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 _o(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 _o(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 kh(s,this.url),this.uriAnnotation.dictionary.items.setValue("Border",this.defaultBorder),e.annotations.add(this.uriAnnotation),r=0!==n?this.drawText(e,new zo(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 _o(new zo(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 _o(i.x,0,i.width,o.height),s.y=0}this.uriAnnotation=new kh(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===Lo.Center?(t.x=r+(i-e)/2,t.width=e):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Lo.Right?(t.x=r+(i-e),t.width=e):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Lo.Justify?(t.x=r,t.width=i):(t.width=r,t.width=e),t},e}(Mh),Ih=function(){function t(){}return t.convert=function(t,e){var i="";switch(e){case Os.None:i="";break;case Os.Numeric:i=t.toString();break;case Os.LowerLatin:i=this.arabicToLetter(t).toLowerCase();break;case Os.LowerRoman:i=this.arabicToRoman(t).toLowerCase();break;case Os.UpperLatin:i=this.arabicToLetter(t);break;case Os.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 h=this.generateNumber(t,50,"L");e+=h.returnValue,t=h.intArabic;var l=this.generateNumber(t,40,"XL");e+=l.returnValue,t=l.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}(),Rh=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}(),Ah=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(){var e=t.call(this)||this;return e.list=new Ns,e}return Ah(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 Ea(this.getSize());this.list.setValue(e,new Rh(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 h=new zo(i.x+this.location.x,i.y+this.location.y);e.drawPdfTemplate(s,h,new Go(s.width*r,s.height*n))},e}(_s),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)}}(),Vh=(function(t){function e(e,i){var r=t.call(this)||this;return r.internalNumberStyle=Os.Numeric,void 0===i?r.font=e:i instanceof Wo?(r.font=e,r.brush=i):(r.font=e,r.bounds=i),r}Fh(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 Ih.convert(e,this.numberStyle)}}(Nh),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){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}Vh(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}}(Nh),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(t){function e(){var e=t.call(this)||this;return e.list=new Ns,e.painterGraphics=[],e}return zh(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),h=new zo(i.x+this.location.x,i.y+this.location.y);e.drawPdfTemplate(a.template,h,new Go(a.template.width*r,a.template.height*n)),this.painterGraphics.push(e)}else{var l=this.getSize(),u=new Ea(l);this.list.setValue(o,new Rh(u,s)),u.graphics.drawString(s,this.getFont(),this.pen,this.getBrush(),0,0,l.width,l.height,this.stringFormat);h=new zo(i.x+this.location.x,i.y+this.location.y);e.drawPdfTemplate(u,h,new Go(u.width*r,u.height*n)),this.painterGraphics.push(e)}},e}(_s),_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)}}();!function(t){function e(e,i){var r=t.call(this)||this;return r.internalNumberStyle=Os.Numeric,void 0===i?r.font=e:i instanceof Wo?(r.font=e,r.brush=i):(r.font=e,r.bounds=i),r}_h(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 Ih.convert(e,this.numberStyle)}}(Gh);!function(t){t[t.Location=0]="Location",t[t.FitToPage=1]="FitToPage",t[t.FitR=2]="FitR"}(Ma||(Ma={}));!function(){function t(t,e){this.dictionaryProperties=new Hn,this.destinationMode=Ma.Location,this.zoomFactor=0,this.destinationLocation=new zo(0,0),this.bounds=new _o,this.array=new $n;xs.RotateAngle0;this.destinationLocation=new zo(0,this.destinationLocation.y),this.pdfPage=t,e instanceof zo?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 Po(this.pdfPage)),this.destinationMode){case Ma.Location:var t=this.pdfPage,e=new zo;e=this.pointToNativePdf(t,this.destinationLocation),this.array.add(new Gn(this.dictionaryProperties.xyz)),this.array.add(new Qn(e.x)),this.array.add(new Qn(e.y)),this.array.add(new Qn(this.zoomFactor));break;case Ma.FitToPage:this.array.add(new Gn(this.dictionaryProperties.fit))}},Object.defineProperty(t.prototype,"element",{get:function(){return this.initializePrimitive(),this.array},enumerable:!0,configurable:!0})}();var Hh,Wh=function(){function t(t){this.mDictionary=null,this.mDictionaryProperties=new Hn,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}(),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(e,i,r,n){var o=t.call(this,new mo)||this;return void 0===e?o.dictionary.items.setValue(o.mDictionaryProperties.functionType,new Qn(0)):(o.dictionary.items.setValue(o.mDictionaryProperties.functionType,new Qn(0)),o.checkParams(e,i,r,n),o.setDomainAndRange(e,i),o.setSizeAndValues(r,n)),o}return Uh(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 $n(t),this.range=new $n(e)},e.prototype.setSizeAndValues=function(t,e){var i=this.dictionary;this.dictionary.items.setValue(this.mDictionaryProperties.size,new $n(t)),this.dictionary.items.setValue(this.mDictionaryProperties.bitsPerSample,new Qn(8)),i.writeBytes(e)},e}(Wh);!function(t){t[t.None=0]="None",t[t.Start=1]="Start",t[t.End=2]="End",t[t.Both=3]="Both"}(Hh||(Hh={}));var Kh;!function(t){t[t.BackwardDiagonal=0]="BackwardDiagonal",t[t.ForwardDiagonal=1]="ForwardDiagonal",t[t.Horizontal=2]="Horizontal",t[t.Vertical=3]="Vertical"}(Kh||(Kh={}));var Yh;!function(t){t[t.Function=1]="Function",t[t.Axial=2]="Axial",t[t.Radial=3]="Radial"}(Yh||(Yh={}));var Jh;!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"}(Jh||(Jh={}));!function(){function t(){}Object.defineProperty(t,"AliceBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.AliceBlue)&&(t=this.sBrushes.getValue(Jh.AliceBlue)),null==t&&(t=this.getBrush(Jh.AliceBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"AntiqueWhite",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.AntiqueWhite)&&(t=this.sBrushes.getValue(Jh.AntiqueWhite)),null==t&&(t=this.getBrush(Jh.AntiqueWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Aqua",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Aqua)&&(t=this.sBrushes.getValue(Jh.Aqua)),null==t&&(t=this.getBrush(Jh.Aqua)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Aquamarine",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Aquamarine)&&(t=this.sBrushes.getValue(Jh.Aquamarine)),null==t&&(t=this.getBrush(Jh.Aquamarine)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Azure",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Azure)&&(t=this.sBrushes.getValue(Jh.Azure)),null==t&&(t=this.getBrush(Jh.Azure)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Beige",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Beige)&&(t=this.sBrushes.getValue(Jh.Beige)),null==t&&(t=this.getBrush(Jh.Beige)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Bisque",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Bisque)&&(t=this.sBrushes.getValue(Jh.Bisque)),null==t&&(t=this.getBrush(Jh.Bisque)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Black",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Black)&&(t=this.sBrushes.getValue(Jh.Black)),null==t&&(t=this.getBrush(Jh.Black)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BlanchedAlmond",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.BlanchedAlmond)&&(t=this.sBrushes.getValue(Jh.BlanchedAlmond)),null==t&&(t=this.getBrush(Jh.BlanchedAlmond)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Blue",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Blue)&&(t=this.sBrushes.getValue(Jh.Blue)),null==t&&(t=this.getBrush(Jh.Blue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BlueViolet",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.BlueViolet)&&(t=this.sBrushes.getValue(Jh.BlueViolet)),null==t&&(t=this.getBrush(Jh.BlueViolet)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Brown",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Brown)&&(t=this.sBrushes.getValue(Jh.Brown)),null==t&&(t=this.getBrush(Jh.Brown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BurlyWood",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.BurlyWood)&&(t=this.sBrushes.getValue(Jh.BurlyWood)),null==t&&(t=this.getBrush(Jh.BurlyWood)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"CadetBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.CadetBlue)&&(t=this.sBrushes.getValue(Jh.CadetBlue)),null==t&&(t=this.getBrush(Jh.CadetBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Chartreuse",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Chartreuse)&&(t=this.sBrushes.getValue(Jh.Chartreuse)),null==t&&(t=this.getBrush(Jh.Chartreuse)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Chocolate",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Chocolate)&&(t=this.sBrushes.getValue(Jh.Chocolate)),null==t&&(t=this.getBrush(Jh.Chocolate)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Coral",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Coral)&&(t=this.sBrushes.getValue(Jh.Coral)),null==t&&(t=this.getBrush(Jh.Coral)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"CornflowerBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.CornflowerBlue)&&(t=this.sBrushes.getValue(Jh.CornflowerBlue)),null==t&&(t=this.getBrush(Jh.CornflowerBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Cornsilk",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Cornsilk)&&(t=this.sBrushes.getValue(Jh.Cornsilk)),null==t&&(t=this.getBrush(Jh.Cornsilk)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Crimson",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Crimson)&&(t=this.sBrushes.getValue(Jh.Crimson)),null==t&&(t=this.getBrush(Jh.Crimson)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Cyan",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Cyan)&&(t=this.sBrushes.getValue(Jh.Cyan)),null==t&&(t=this.getBrush(Jh.Cyan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DarkBlue)&&(t=this.sBrushes.getValue(Jh.DarkBlue)),null==t&&(t=this.getBrush(Jh.DarkBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkCyan",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DarkCyan)&&(t=this.sBrushes.getValue(Jh.DarkCyan)),null==t&&(t=this.getBrush(Jh.DarkCyan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkGoldenrod",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DarkGoldenrod)&&(t=this.sBrushes.getValue(Jh.DarkGoldenrod)),null==t&&(t=this.getBrush(Jh.DarkGoldenrod)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkGray",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DarkGray)&&(t=this.sBrushes.getValue(Jh.DarkGray)),null==t&&(t=this.getBrush(Jh.DarkGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DarkGreen)&&(t=this.sBrushes.getValue(Jh.DarkGreen)),null==t&&(t=this.getBrush(Jh.DarkGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkKhaki",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DarkKhaki)&&(t=this.sBrushes.getValue(Jh.DarkKhaki)),null==t&&(t=this.getBrush(Jh.DarkKhaki)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkMagenta",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DarkMagenta)&&(t=this.sBrushes.getValue(Jh.DarkMagenta)),null==t&&(t=this.getBrush(Jh.DarkMagenta)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkOliveGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DarkOliveGreen)&&(t=this.sBrushes.getValue(Jh.DarkOliveGreen)),null==t&&(t=this.getBrush(Jh.DarkOliveGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkOrange",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DarkOrange)&&(t=this.sBrushes.getValue(Jh.DarkOrange)),null==t&&(t=this.getBrush(Jh.DarkOrange)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkOrchid",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DarkOrchid)&&(t=this.sBrushes.getValue(Jh.DarkOrchid)),null==t&&(t=this.getBrush(Jh.DarkOrchid)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkRed",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DarkRed)&&(t=this.sBrushes.getValue(Jh.DarkRed)),null==t&&(t=this.getBrush(Jh.DarkRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSalmon",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DarkSalmon)&&(t=this.sBrushes.getValue(Jh.DarkSalmon)),null==t&&(t=this.getBrush(Jh.DarkSalmon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DarkSeaGreen)&&(t=this.sBrushes.getValue(Jh.DarkSeaGreen)),null==t&&(t=this.getBrush(Jh.DarkSeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSlateBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DarkSlateBlue)&&(t=this.sBrushes.getValue(Jh.DarkSlateBlue)),null==t&&(t=this.getBrush(Jh.DarkSlateBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSlateGray",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DarkSlateGray)&&(t=this.sBrushes.getValue(Jh.DarkSlateGray)),null==t&&(t=this.getBrush(Jh.DarkSlateGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkTurquoise",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DarkTurquoise)&&(t=this.sBrushes.getValue(Jh.DarkTurquoise)),null==t&&(t=this.getBrush(Jh.DarkTurquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkViolet",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DarkViolet)&&(t=this.sBrushes.getValue(Jh.DarkViolet)),null==t&&(t=this.getBrush(Jh.DarkViolet)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DeepPink",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DeepPink)&&(t=this.sBrushes.getValue(Jh.DeepPink)),null==t&&(t=this.getBrush(Jh.DeepPink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DeepSkyBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DeepSkyBlue)&&(t=this.sBrushes.getValue(Jh.DeepSkyBlue)),null==t&&(t=this.getBrush(Jh.DeepSkyBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DimGray",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DimGray)&&(t=this.sBrushes.getValue(Jh.DimGray)),null==t&&(t=this.getBrush(Jh.DimGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DodgerBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.DodgerBlue)&&(t=this.sBrushes.getValue(Jh.DodgerBlue)),null==t&&(t=this.getBrush(Jh.DodgerBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Firebrick",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Firebrick)&&(t=this.sBrushes.getValue(Jh.Firebrick)),null==t&&(t=this.getBrush(Jh.Firebrick)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"FloralWhite",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.FloralWhite)&&(t=this.sBrushes.getValue(Jh.FloralWhite)),null==t&&(t=this.getBrush(Jh.FloralWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"ForestGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.ForestGreen)&&(t=this.sBrushes.getValue(Jh.ForestGreen)),null==t&&(t=this.getBrush(Jh.ForestGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Fuchsia",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Fuchsia)&&(t=this.sBrushes.getValue(Jh.Fuchsia)),null==t&&(t=this.getBrush(Jh.Fuchsia)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Gainsboro",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Gainsboro)&&(t=this.sBrushes.getValue(Jh.Gainsboro)),null==t&&(t=this.getBrush(Jh.Gainsboro)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"GhostWhite",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.GhostWhite)&&(t=this.sBrushes.getValue(Jh.GhostWhite)),null==t&&(t=this.getBrush(Jh.GhostWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Gold",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Gold)&&(t=this.sBrushes.getValue(Jh.Gold)),null==t&&(t=this.getBrush(Jh.Gold)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Goldenrod",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Goldenrod)&&(t=this.sBrushes.getValue(Jh.Goldenrod)),null==t&&(t=this.getBrush(Jh.Goldenrod)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Gray",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Gray)&&(t=this.sBrushes.getValue(Jh.Gray)),null==t&&(t=this.getBrush(Jh.Gray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Green",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Green)&&(t=this.sBrushes.getValue(Jh.Green)),null==t&&(t=this.getBrush(Jh.Green)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"GreenYellow",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.GreenYellow)&&(t=this.sBrushes.getValue(Jh.GreenYellow)),null==t&&(t=this.getBrush(Jh.GreenYellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Honeydew",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Honeydew)&&(t=this.sBrushes.getValue(Jh.Honeydew)),null==t&&(t=this.getBrush(Jh.Honeydew)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"HotPink",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.HotPink)&&(t=this.sBrushes.getValue(Jh.HotPink)),null==t&&(t=this.getBrush(Jh.HotPink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"IndianRed",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.IndianRed)&&(t=this.sBrushes.getValue(Jh.IndianRed)),null==t&&(t=this.getBrush(Jh.IndianRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Indigo",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Indigo)&&(t=this.sBrushes.getValue(Jh.Indigo)),null==t&&(t=this.getBrush(Jh.Indigo)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Ivory",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Ivory)&&(t=this.sBrushes.getValue(Jh.Ivory)),null==t&&(t=this.getBrush(Jh.Ivory)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Khaki",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Khaki)&&(t=this.sBrushes.getValue(Jh.Khaki)),null==t&&(t=this.getBrush(Jh.Khaki)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Lavender",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Lavender)&&(t=this.sBrushes.getValue(Jh.Lavender)),null==t&&(t=this.getBrush(Jh.Lavender)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LavenderBlush",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.LavenderBlush)&&(t=this.sBrushes.getValue(Jh.LavenderBlush)),null==t&&(t=this.getBrush(Jh.LavenderBlush)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LawnGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.LawnGreen)&&(t=this.sBrushes.getValue(Jh.LawnGreen)),null==t&&(t=this.getBrush(Jh.LawnGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LemonChiffon",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.LemonChiffon)&&(t=this.sBrushes.getValue(Jh.LemonChiffon)),null==t&&(t=this.getBrush(Jh.LemonChiffon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.LightBlue)&&(t=this.sBrushes.getValue(Jh.LightBlue)),null==t&&(t=this.getBrush(Jh.LightBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightCoral",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.LightCoral)&&(t=this.sBrushes.getValue(Jh.LightCoral)),null==t&&(t=this.getBrush(Jh.LightCoral)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightCyan",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.LightCyan)&&(t=this.sBrushes.getValue(Jh.LightCyan)),null==t&&(t=this.getBrush(Jh.LightCyan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightGoldenrodYellow",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.LightGoldenrodYellow)&&(t=this.sBrushes.getValue(Jh.LightGoldenrodYellow)),null==t&&(t=this.getBrush(Jh.LightGoldenrodYellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightGray",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.LightGray)&&(t=this.sBrushes.getValue(Jh.LightGray)),null==t&&(t=this.getBrush(Jh.LightGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.LightGreen)&&(t=this.sBrushes.getValue(Jh.LightGreen)),null==t&&(t=this.getBrush(Jh.LightGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightPink",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.LightPink)&&(t=this.sBrushes.getValue(Jh.LightPink)),null==t&&(t=this.getBrush(Jh.LightPink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSalmon",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.LightSalmon)&&(t=this.sBrushes.getValue(Jh.LightSalmon)),null==t&&(t=this.getBrush(Jh.LightSalmon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.LightSeaGreen)&&(t=this.sBrushes.getValue(Jh.LightSeaGreen)),null==t&&(t=this.getBrush(Jh.LightSeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSkyBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.LightSkyBlue)&&(t=this.sBrushes.getValue(Jh.LightSkyBlue)),null==t&&(t=this.getBrush(Jh.LightSkyBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSlateGray",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.LightSlateGray)&&(t=this.sBrushes.getValue(Jh.LightSlateGray)),null==t&&(t=this.getBrush(Jh.LightSlateGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSteelBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.LightSteelBlue)&&(t=this.sBrushes.getValue(Jh.LightSteelBlue)),null==t&&(t=this.getBrush(Jh.LightSteelBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightYellow",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.LightYellow)&&(t=this.sBrushes.getValue(Jh.LightYellow)),null==t&&(t=this.getBrush(Jh.LightYellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Lime",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Lime)&&(t=this.sBrushes.getValue(Jh.Lime)),null==t&&(t=this.getBrush(Jh.Lime)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LimeGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.LimeGreen)&&(t=this.sBrushes.getValue(Jh.LimeGreen)),null==t&&(t=this.getBrush(Jh.LimeGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Linen",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Linen)&&(t=this.sBrushes.getValue(Jh.Linen)),null==t&&(t=this.getBrush(Jh.Linen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Magenta",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Magenta)&&(t=this.sBrushes.getValue(Jh.Magenta)),null==t&&(t=this.getBrush(Jh.Magenta)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Maroon",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Maroon)&&(t=this.sBrushes.getValue(Jh.Maroon)),null==t&&(t=this.getBrush(Jh.Maroon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumAquamarine",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.MediumAquamarine)&&(t=this.sBrushes.getValue(Jh.MediumAquamarine)),null==t&&(t=this.getBrush(Jh.MediumAquamarine)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.MediumBlue)&&(t=this.sBrushes.getValue(Jh.MediumBlue)),null==t&&(t=this.getBrush(Jh.MediumBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumOrchid",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.MediumOrchid)&&(t=this.sBrushes.getValue(Jh.MediumOrchid)),null==t&&(t=this.getBrush(Jh.MediumOrchid)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumPurple",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.MediumPurple)&&(t=this.sBrushes.getValue(Jh.MediumPurple)),null==t&&(t=this.getBrush(Jh.MediumPurple)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumSeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.MediumSeaGreen)&&(t=this.sBrushes.getValue(Jh.MediumSeaGreen)),null==t&&(t=this.getBrush(Jh.MediumSeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumSlateBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.MediumSlateBlue)&&(t=this.sBrushes.getValue(Jh.MediumSlateBlue)),null==t&&(t=this.getBrush(Jh.MediumSlateBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumSpringGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.MediumSpringGreen)&&(t=this.sBrushes.getValue(Jh.MediumSpringGreen)),null==t&&(t=this.getBrush(Jh.MediumSpringGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumTurquoise",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.MediumTurquoise)&&(t=this.sBrushes.getValue(Jh.MediumTurquoise)),null==t&&(t=this.getBrush(Jh.MediumTurquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumVioletRed",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.MediumVioletRed)&&(t=this.sBrushes.getValue(Jh.MediumVioletRed)),null==t&&(t=this.getBrush(Jh.MediumVioletRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MidnightBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.MidnightBlue)&&(t=this.sBrushes.getValue(Jh.MidnightBlue)),null==t&&(t=this.getBrush(Jh.MidnightBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MintCream",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.MintCream)&&(t=this.sBrushes.getValue(Jh.MintCream)),null==t&&(t=this.getBrush(Jh.MintCream)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MistyRose",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.MistyRose)&&(t=this.sBrushes.getValue(Jh.MistyRose)),null==t&&(t=this.getBrush(Jh.MistyRose)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Moccasin",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Moccasin)&&(t=this.sBrushes.getValue(Jh.Moccasin)),null==t&&(t=this.getBrush(Jh.Moccasin)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"NavajoWhite",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.NavajoWhite)&&(t=this.sBrushes.getValue(Jh.NavajoWhite)),null==t&&(t=this.getBrush(Jh.NavajoWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Navy",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Navy)&&(t=this.sBrushes.getValue(Jh.Navy)),null==t&&(t=this.getBrush(Jh.Navy)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OldLace",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.OldLace)&&(t=this.sBrushes.getValue(Jh.OldLace)),null==t&&(t=this.getBrush(Jh.OldLace)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Olive",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Olive)&&(t=this.sBrushes.getValue(Jh.Olive)),null==t&&(t=this.getBrush(Jh.Olive)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OliveDrab",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.OliveDrab)&&(t=this.sBrushes.getValue(Jh.OliveDrab)),null==t&&(t=this.getBrush(Jh.OliveDrab)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Orange",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Orange)&&(t=this.sBrushes.getValue(Jh.Orange)),null==t&&(t=this.getBrush(Jh.Orange)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OrangeRed",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.OrangeRed)&&(t=this.sBrushes.getValue(Jh.OrangeRed)),null==t&&(t=this.getBrush(Jh.OrangeRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Orchid",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Orchid)&&(t=this.sBrushes.getValue(Jh.Orchid)),null==t&&(t=this.getBrush(Jh.Orchid)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleGoldenrod",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.PaleGoldenrod)&&(t=this.sBrushes.getValue(Jh.PaleGoldenrod)),null==t&&(t=this.getBrush(Jh.PaleGoldenrod)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.PaleGreen)&&(t=this.sBrushes.getValue(Jh.PaleGreen)),null==t&&(t=this.getBrush(Jh.PaleGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleTurquoise",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.PaleTurquoise)&&(t=this.sBrushes.getValue(Jh.PaleTurquoise)),null==t&&(t=this.getBrush(Jh.PaleTurquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleVioletRed",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.PaleVioletRed)&&(t=this.sBrushes.getValue(Jh.PaleVioletRed)),null==t&&(t=this.getBrush(Jh.PaleVioletRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PapayaWhip",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.PapayaWhip)&&(t=this.sBrushes.getValue(Jh.PapayaWhip)),null==t&&(t=this.getBrush(Jh.PapayaWhip)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PeachPuff",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.PeachPuff)&&(t=this.sBrushes.getValue(Jh.PeachPuff)),null==t&&(t=this.getBrush(Jh.PeachPuff)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Peru",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Peru)&&(t=this.sBrushes.getValue(Jh.Peru)),null==t&&(t=this.getBrush(Jh.Peru)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Pink",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Pink)&&(t=this.sBrushes.getValue(Jh.Pink)),null==t&&(t=this.getBrush(Jh.Pink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Plum",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Plum)&&(t=this.sBrushes.getValue(Jh.Plum)),null==t&&(t=this.getBrush(Jh.Plum)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PowderBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.PowderBlue)&&(t=this.sBrushes.getValue(Jh.PowderBlue)),null==t&&(t=this.getBrush(Jh.PowderBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Purple",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Purple)&&(t=this.sBrushes.getValue(Jh.Purple)),null==t&&(t=this.getBrush(Jh.Purple)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Red",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Red)&&(t=this.sBrushes.getValue(Jh.Red)),null==t&&(t=this.getBrush(Jh.Red)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"RosyBrown",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.RosyBrown)&&(t=this.sBrushes.getValue(Jh.RosyBrown)),null==t&&(t=this.getBrush(Jh.RosyBrown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"RoyalBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.RoyalBlue)&&(t=this.sBrushes.getValue(Jh.RoyalBlue)),null==t&&(t=this.getBrush(Jh.RoyalBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SaddleBrown",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.SaddleBrown)&&(t=this.sBrushes.getValue(Jh.SaddleBrown)),null==t&&(t=this.getBrush(Jh.SaddleBrown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Salmon",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Salmon)&&(t=this.sBrushes.getValue(Jh.Salmon)),null==t&&(t=this.getBrush(Jh.Salmon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SandyBrown",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.SandyBrown)&&(t=this.sBrushes.getValue(Jh.SandyBrown)),null==t&&(t=this.getBrush(Jh.SandyBrown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.SeaGreen)&&(t=this.sBrushes.getValue(Jh.SeaGreen)),null==t&&(t=this.getBrush(Jh.SeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SeaShell",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.SeaShell)&&(t=this.sBrushes.getValue(Jh.SeaShell)),null==t&&(t=this.getBrush(Jh.SeaShell)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Sienna",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Sienna)&&(t=this.sBrushes.getValue(Jh.Sienna)),null==t&&(t=this.getBrush(Jh.Sienna)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Silver",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Silver)&&(t=this.sBrushes.getValue(Jh.Silver)),null==t&&(t=this.getBrush(Jh.Silver)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SkyBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.SkyBlue)&&(t=this.sBrushes.getValue(Jh.SkyBlue)),null==t&&(t=this.getBrush(Jh.SkyBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SlateBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.SlateBlue)&&(t=this.sBrushes.getValue(Jh.SlateBlue)),null==t&&(t=this.getBrush(Jh.SlateBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SlateGray",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.SlateGray)&&(t=this.sBrushes.getValue(Jh.SlateGray)),null==t&&(t=this.getBrush(Jh.SlateGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Snow",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Snow)&&(t=this.sBrushes.getValue(Jh.Snow)),null==t&&(t=this.getBrush(Jh.Snow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SpringGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.SpringGreen)&&(t=this.sBrushes.getValue(Jh.SpringGreen)),null==t&&(t=this.getBrush(Jh.SpringGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SteelBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.SteelBlue)&&(t=this.sBrushes.getValue(Jh.SteelBlue)),null==t&&(t=this.getBrush(Jh.SteelBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Tan",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Tan)&&(t=this.sBrushes.getValue(Jh.Tan)),null==t&&(t=this.getBrush(Jh.Tan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Teal",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Teal)&&(t=this.sBrushes.getValue(Jh.Teal)),null==t&&(t=this.getBrush(Jh.Teal)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Thistle",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Thistle)&&(t=this.sBrushes.getValue(Jh.Thistle)),null==t&&(t=this.getBrush(Jh.Thistle)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Tomato",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Tomato)&&(t=this.sBrushes.getValue(Jh.Tomato)),null==t&&(t=this.getBrush(Jh.Tomato)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Transparent",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Transparent)&&(t=this.sBrushes.getValue(Jh.Transparent)),null==t&&(t=this.getBrush(Jh.Transparent)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Turquoise",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Turquoise)&&(t=this.sBrushes.getValue(Jh.Turquoise)),null==t&&(t=this.getBrush(Jh.Turquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Violet",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Violet)&&(t=this.sBrushes.getValue(Jh.Violet)),null==t&&(t=this.getBrush(Jh.Violet)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Wheat",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Wheat)&&(t=this.sBrushes.getValue(Jh.Wheat)),null==t&&(t=this.getBrush(Jh.Wheat)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"White",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.White)&&(t=this.sBrushes.getValue(Jh.White)),null==t&&(t=this.getBrush(Jh.White)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WhiteSmoke",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.WhiteSmoke)&&(t=this.sBrushes.getValue(Jh.WhiteSmoke)),null==t&&(t=this.getBrush(Jh.WhiteSmoke)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Yellow",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.Yellow)&&(t=this.sBrushes.getValue(Jh.Yellow)),null==t&&(t=this.getBrush(Jh.Yellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"YellowGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jh.YellowGreen)&&(t=this.sBrushes.getValue(Jh.YellowGreen)),null==t&&(t=this.getBrush(Jh.YellowGreen)),t},enumerable:!0,configurable:!0}),t.getBrush=function(t){var e=this.getColorValue(t),i=new qo(e);return this.sBrushes.setValue(t,i),i},t.getColorValue=function(t){var e=new Vo;switch(t){case Jh.Transparent:e=new Vo(0,255,255,255);break;case Jh.AliceBlue:e=new Vo(255,240,248,255);break;case Jh.AntiqueWhite:e=new Vo(255,250,235,215);break;case Jh.Aqua:e=new Vo(255,0,255,255);break;case Jh.Aquamarine:e=new Vo(255,127,255,212);break;case Jh.Azure:e=new Vo(255,240,255,255);break;case Jh.Beige:e=new Vo(255,245,245,220);break;case Jh.Bisque:e=new Vo(255,255,228,196);break;case Jh.Black:e=new Vo(255,0,0,0);break;case Jh.BlanchedAlmond:e=new Vo(255,255,235,205);break;case Jh.Blue:e=new Vo(255,0,0,255);break;case Jh.BlueViolet:e=new Vo(255,138,43,226);break;case Jh.Brown:e=new Vo(255,165,42,42);break;case Jh.BurlyWood:e=new Vo(255,222,184,135);break;case Jh.CadetBlue:e=new Vo(255,95,158,160);break;case Jh.Chartreuse:e=new Vo(255,127,255,0);break;case Jh.Chocolate:e=new Vo(255,210,105,30);break;case Jh.Coral:e=new Vo(255,255,127,80);break;case Jh.CornflowerBlue:e=new Vo(255,100,149,237);break;case Jh.Cornsilk:e=new Vo(255,255,248,220);break;case Jh.Crimson:e=new Vo(255,220,20,60);break;case Jh.Cyan:e=new Vo(255,0,255,255);break;case Jh.DarkBlue:e=new Vo(255,0,0,139);break;case Jh.DarkCyan:e=new Vo(255,0,139,139);break;case Jh.DarkGoldenrod:e=new Vo(255,184,134,11);break;case Jh.DarkGray:e=new Vo(255,169,169,169);break;case Jh.DarkGreen:e=new Vo(255,0,100,0);break;case Jh.DarkKhaki:e=new Vo(255,189,183,107);break;case Jh.DarkMagenta:e=new Vo(255,139,0,139);break;case Jh.DarkOliveGreen:e=new Vo(255,85,107,47);break;case Jh.DarkOrange:e=new Vo(255,255,140,0);break;case Jh.DarkOrchid:e=new Vo(255,153,50,204);break;case Jh.DarkRed:e=new Vo(255,139,0,0);break;case Jh.DarkSalmon:e=new Vo(255,233,150,122);break;case Jh.DarkSeaGreen:e=new Vo(255,143,188,139);break;case Jh.DarkSlateBlue:e=new Vo(255,72,61,139);break;case Jh.DarkSlateGray:e=new Vo(255,47,79,79);break;case Jh.DarkTurquoise:e=new Vo(255,0,206,209);break;case Jh.DarkViolet:e=new Vo(255,148,0,211);break;case Jh.DeepPink:e=new Vo(255,255,20,147);break;case Jh.DeepSkyBlue:e=new Vo(255,0,191,255);break;case Jh.DimGray:e=new Vo(255,105,105,105);break;case Jh.DodgerBlue:e=new Vo(255,30,144,255);break;case Jh.Firebrick:e=new Vo(255,178,34,34);break;case Jh.FloralWhite:e=new Vo(255,255,250,240);break;case Jh.ForestGreen:e=new Vo(255,34,139,34);break;case Jh.Fuchsia:e=new Vo(255,255,0,255);break;case Jh.Gainsboro:e=new Vo(255,220,220,220);break;case Jh.GhostWhite:e=new Vo(255,248,248,255);break;case Jh.Gold:e=new Vo(255,255,215,0);break;case Jh.Goldenrod:e=new Vo(255,218,165,32);break;case Jh.Gray:e=new Vo(255,128,128,128);break;case Jh.Green:e=new Vo(255,0,128,0);break;case Jh.GreenYellow:e=new Vo(255,173,255,47);break;case Jh.Honeydew:e=new Vo(255,240,255,240);break;case Jh.HotPink:e=new Vo(255,255,105,180);break;case Jh.IndianRed:e=new Vo(255,205,92,92);break;case Jh.Indigo:e=new Vo(255,75,0,130);break;case Jh.Ivory:e=new Vo(255,255,255,240);break;case Jh.Khaki:e=new Vo(255,240,230,140);break;case Jh.Lavender:e=new Vo(255,230,230,250);break;case Jh.LavenderBlush:e=new Vo(255,255,240,245);break;case Jh.LawnGreen:e=new Vo(255,124,252,0);break;case Jh.LemonChiffon:e=new Vo(255,255,250,205);break;case Jh.LightBlue:e=new Vo(255,173,216,230);break;case Jh.LightCoral:e=new Vo(255,240,128,128);break;case Jh.LightCyan:e=new Vo(255,224,255,255);break;case Jh.LightGoldenrodYellow:e=new Vo(255,250,250,210);break;case Jh.LightGreen:e=new Vo(255,144,238,144);break;case Jh.LightGray:e=new Vo(255,211,211,211);break;case Jh.LightPink:e=new Vo(255,255,182,193);break;case Jh.LightSalmon:e=new Vo(255,255,160,122);break;case Jh.LightSeaGreen:e=new Vo(255,32,178,170);break;case Jh.LightSkyBlue:e=new Vo(255,135,206,250);break;case Jh.LightSlateGray:e=new Vo(255,119,136,153);break;case Jh.LightSteelBlue:e=new Vo(255,176,196,222);break;case Jh.LightYellow:e=new Vo(255,255,255,224);break;case Jh.Lime:e=new Vo(255,0,255,0);break;case Jh.LimeGreen:e=new Vo(255,50,205,50);break;case Jh.Linen:e=new Vo(255,250,240,230);break;case Jh.Magenta:e=new Vo(255,255,0,255);break;case Jh.Maroon:e=new Vo(255,128,0,0);break;case Jh.MediumAquamarine:e=new Vo(255,102,205,170);break;case Jh.MediumBlue:e=new Vo(255,0,0,205);break;case Jh.MediumOrchid:e=new Vo(255,186,85,211);break;case Jh.MediumPurple:e=new Vo(255,147,112,219);break;case Jh.MediumSeaGreen:e=new Vo(255,60,179,113);break;case Jh.MediumSlateBlue:e=new Vo(255,123,104,238);break;case Jh.MediumSpringGreen:e=new Vo(255,0,250,154);break;case Jh.MediumTurquoise:e=new Vo(255,72,209,204);break;case Jh.MediumVioletRed:e=new Vo(255,199,21,133);break;case Jh.MidnightBlue:e=new Vo(255,25,25,112);break;case Jh.MintCream:e=new Vo(255,245,255,250);break;case Jh.MistyRose:e=new Vo(255,255,228,225);break;case Jh.Moccasin:e=new Vo(255,255,228,181);break;case Jh.NavajoWhite:e=new Vo(255,255,222,173);break;case Jh.Navy:e=new Vo(255,0,0,128);break;case Jh.OldLace:e=new Vo(255,253,245,230);break;case Jh.Olive:e=new Vo(255,128,128,0);break;case Jh.OliveDrab:e=new Vo(255,107,142,35);break;case Jh.Orange:e=new Vo(255,255,165,0);break;case Jh.OrangeRed:e=new Vo(255,255,69,0);break;case Jh.Orchid:e=new Vo(255,218,112,214);break;case Jh.PaleGoldenrod:e=new Vo(255,238,232,170);break;case Jh.PaleGreen:e=new Vo(255,152,251,152);break;case Jh.PaleTurquoise:e=new Vo(255,175,238,238);break;case Jh.PaleVioletRed:e=new Vo(255,219,112,147);break;case Jh.PapayaWhip:e=new Vo(255,255,239,213);break;case Jh.PeachPuff:e=new Vo(255,255,218,185);break;case Jh.Peru:e=new Vo(255,205,133,63);break;case Jh.Pink:e=new Vo(255,255,192,203);break;case Jh.Plum:e=new Vo(255,221,160,221);break;case Jh.PowderBlue:e=new Vo(255,176,224,230);break;case Jh.Purple:e=new Vo(255,128,0,128);break;case Jh.Red:e=new Vo(255,255,0,0);break;case Jh.RosyBrown:e=new Vo(255,188,143,143);break;case Jh.RoyalBlue:e=new Vo(255,65,105,225);break;case Jh.SaddleBrown:e=new Vo(255,139,69,19);break;case Jh.Salmon:e=new Vo(255,250,128,114);break;case Jh.SandyBrown:e=new Vo(255,244,164,96);break;case Jh.SeaGreen:e=new Vo(255,46,139,87);break;case Jh.SeaShell:e=new Vo(255,255,245,238);break;case Jh.Sienna:e=new Vo(255,160,82,45);break;case Jh.Silver:e=new Vo(255,192,192,192);break;case Jh.SkyBlue:e=new Vo(255,135,206,235);break;case Jh.SlateBlue:e=new Vo(255,106,90,205);break;case Jh.SlateGray:e=new Vo(255,112,128,144);break;case Jh.Snow:e=new Vo(255,255,250,250);break;case Jh.SpringGreen:e=new Vo(255,0,255,127);break;case Jh.SteelBlue:e=new Vo(255,70,130,180);break;case Jh.Tan:e=new Vo(255,210,180,140);break;case Jh.Teal:e=new Vo(255,0,128,128);break;case Jh.Thistle:e=new Vo(255,216,191,216);break;case Jh.Tomato:e=new Vo(255,255,99,71);break;case Jh.Turquoise:e=new Vo(255,64,224,208);break;case Jh.Violet:e=new Vo(255,238,130,238);break;case Jh.Wheat:e=new Vo(255,245,222,179);break;case Jh.White:e=new Vo(255,255,255,255);break;case Jh.WhiteSmoke:e=new Vo(255,245,245,245);break;case Jh.Yellow:e=new Vo(255,255,255,0);break;case Jh.YellowGreen:e=new Vo(255,154,205,50)}return e},t.sBrushes=new zn}();var Xh,Qh=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 Zh(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,h=this.count;for(a=0;a<h;++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 Vo){var n=new Vo;switch(r){case jo.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 Vo(o,s,a);break;case jo.GrayScale:var h=this.interpolate(t,e.gray,i.gray);n=new Vo(h);break;case jo.Cmyk:var l=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 Vo(l,u,c,p)}return n}return 0===t?e:1===t?i:e+(i-e)/1*(t-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)}}(),Zh=function(t){function e(e){var i=t.call(this)||this;return"number"==typeof e&&(i=t.call(this,e)||this),i}return $h(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 h=this.positions,l=this.getIntervals(h),u=this.gcd(l);a=u,s=1/u+1}o[0]=s;var c=this.getSamplesValues(t,s,i,a);return n=new qh([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 jo.Rgb:e=3;break;case jo.Cmyk:e=4;break;case jo.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 jo.GrayScale:n=this.getGrayscaleSamples(e,i,r);break;case jo.Cmyk:n=this.getCmykSamples(e,i,r);break;case jo.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,jo.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,jo.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,jo.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 h=this.positions[n],l=this.positions[r],u=this.mcolors[n],c=this.mcolors[r],p=(s-h)/(l-h);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 jo.Cmyk:case jo.Rgb:e=255;break;case jo.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}(Qh),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)}}(),el=(function(t){function e(e,i,r,n){var o=t.call(this,new Wn)||this;if(o.mDictionaryProperties=new Hn,e instanceof zo&&i instanceof zo&&r instanceof Vo&&n instanceof Vo)o.initialize(r,n),o.mPointStart=e,o.mPointEnd=i,o.setPoints(o.mPointStart,o.mPointEnd);else if(e instanceof Ho)if(o.initialize(i,r),n===Kh.BackwardDiagonal||n===Kh.ForwardDiagonal||n===Kh.Horizontal||n===Kh.Vertical){switch(o.mBoundaries=e,n){case Kh.BackwardDiagonal:o.mPointStart=new zo(e.right,e.top),o.mPointEnd=new zo(e.left,e.bottom);break;case Kh.ForwardDiagonal:o.mPointStart=new zo(e.left,e.top),o.mPointEnd=new zo(e.right,e.bottom);break;case Kh.Horizontal:o.mPointStart=new zo(e.left,e.top),o.mPointEnd=new zo(e.right,e.top);break;case Kh.Vertical:o.mPointStart=new zo(e.left,e.top),o.mPointEnd=new zo(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 zo(e.left,e.top),o.mPointEnd=new zo(e.right,e.top);else if(90===n)o.mPointStart=new zo(e.left,e.top),o.mPointEnd=new zo(e.left,e.bottom);else if(180===n)o.mPointEnd=new zo(e.left,e.top),o.mPointStart=new zo(e.right,e.top);else if(270===n)o.mPointEnd=new zo(e.left,e.top),o.mPointStart=new zo(e.left,e.bottom);else{var s=n*(Math.PI/180),a=Math.tan(s),h=o.mBoundaries.left+(o.mBoundaries.right-o.mBoundaries.left)/2,l=o.mBoundaries.top+(o.mBoundaries.bottom-o.mBoundaries.top)/2,u=new zo(h,l);l=a*(h=o.mBoundaries.width/(2*Math.cos(s))),h+=u.x,l+=u.y;var c=new zo(h,l),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}tl(e,t),e.prototype.initialize=function(t,e){this.mColours=[t,e],this.mColourBlend=new Zh(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 Zh(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=Hh.None,e=this.shading.items.getValue(this.mDictionaryProperties.extend);if(null!=e){var i=e.items(0),r=e.items(1);i.value&&(t|=Hh.Start),r.value&&(t|=Hh.End)}return t},set:function(t){var e,i,r=this.shading.items.getValue(this.mDictionaryProperties.extend);null==r?(e=new Us(!1),i=new Us(!1),(r=new $n).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 zo(i,r)},e.prototype.subPoints=function(t,e){var i=t.x-e.x,r=t.y-e.y;return new zo(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 zo(0,0);if(t<90&&t>0)e=new zo(this.mBoundaries.right,this.mBoundaries.bottom);else if(t<180&&t>90)e=new zo(this.mBoundaries.left,this.mBoundaries.bottom);else if(t<270&&t>180)e=new zo(this.mBoundaries.left,this.mBoundaries.top);else{if(!(t>270))throw new Error("PdfException - Internal error.");e=new zo(this.mBoundaries.right,this.mBoundaries.top)}return e},e.prototype.setPoints=function(t,e){var i=new $n;i.add(new Qn(t.x)),i.add(new Qn(this.updateY(t.y))),i.add(new Qn(e.x)),i.add(new Qn(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=jo.Rgb,this.function=this.mColourBlend.getFunction(this.colorSpace),this.shading.items.setValue(this.mDictionaryProperties.shadingType,new Qn(Yh.Axial))},e.prototype.clone=function(){return this.resetPatternDictionary(new Wn(this.patternDictionary)),this.shading=new Wn,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)}}(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)}}());!function(t){function e(e,i,r,n,o,s){var a=t.call(this,new Wn)||this;if(a.mDictionaryProperties=new Hn,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}el(e,t),e.prototype.initialize=function(t,e){this.mColour=[t,e],this.mColourBlends=new Zh(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 Zh(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=$n.fromRectangle(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extend",{get:function(){var t=Hh.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|=Hh.Start),r.value&&(t|=Hh.End)}return t},set:function(t){var e,i,r=this.shading.items.getValue(this.mDictionaryProperties.extend);null==r&&void 0===r?(e=new Us(!1),i=new Us(!1),(r=new $n).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 $n;n.add(new Qn(t.x)),n.add(new Qn(this.updateY(t.y))),n.add(new Qn(i)),n.add(new Qn(e.x)),n.add(new Qn(this.updateY(e.y))),i!==r?n.add(new Qn(r)):n.add(new Qn(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=jo.Rgb,this.function=this.mColourBlends.getFunction(this.colorSpace),this.shading.items.setValue(this.mDictionaryProperties.shadingType,new Qn(Yh.Radial))},e.prototype.clone=function(){return this.resetPatternDictionary(new Wn(this.patternDictionary)),this.shading=new Wn,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)}}(ka);!function(t){t[t.Overlap=0]="Overlap",t[t.Inside=1]="Inside"}(Xh||(Xh={}));var il,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)}}(),nl=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}(),ol=function(t){function e(){var e=t.call(this)||this;return e.gridBorderOverlapStyle=Xh.Overlap,e.bAllowHorizontalOverflow=!1,e.gridHorizontalOverflowType=il.LastPage,e}return rl(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 Ph),this.gridCellPadding},set:function(t){void 0===this.gridCellPadding?(this.gridCellPadding=new Ph,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}(nl),sl=function(t){function e(){var e=t.call(this)||this;return e.gridCellBorders=Sh.default,e}return rl(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 Ph),this.gridCellPadding=t},enumerable:!0,configurable:!0}),e}(nl),al=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 Sh),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"}(il||(il={}));var hl=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 ss),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 ml){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 sl),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 hs;if("string"==typeof this.objectValue){t+=e.layout(this.objectValue,this.getTextFont(),this.stringFormat,new Go(Number.MAX_VALUE,Number.MAX_VALUE),!1,new Go(0,0)).actualSize.width,t+=2*(this.style.borders.left.width+this.style.borders.right.width)}else if(this.objectValue instanceof ml)t=this.objectValue.size.width;else if(this.objectValue instanceof Js||this.objectValue instanceof Qs)t+=this.objectValue.width;else if(this.objectValue instanceof jh){var i=this.objectValue;t+=e.layout(i.text,i.font,i.stringFormat,new Go(0,0),!1,new Go(0,0)).actualSize.width,t+=2*(this.style.borders.left.width+this.style.borders.right.width)}return this.objectValue instanceof ml?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 _o(t.x,t.y,t.width,t.height);return this.objectValue instanceof ml?(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 qo(new Vo(0,0,0)));var s=this.getTextFont(),a=this.getStringFormat(),h=e;if(h.height>=t.clientSize.height&&this.row.grid.allowRowBreakAcrossPages&&(h.height-=h.y),h=this.adjustContentLayoutArea(h),"string"==typeof this.objectValue||"string"==typeof this.remaining){var l=void 0,u=void 0;if(u=h.height<s.height?new _o(h.x,h.y,h.width,s.height):h,h.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?(l=""===this.remaining?this.remaining:this.objectValue,t.drawString(l,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 ml){var p=this.objectValue;p.isChildGrid=!0,p.ParentCell=this;var d=void 0;d=h,0!=this.gridRow.grid.style.cellSpacing&&(e.width-=this.gridRow.grid.style.cellSpacing);var f=new bl(p),g=new wl;null!=this.row.grid.LayoutFormat?g=this.row.grid.LayoutFormat:g.layout=qs.Paginate;var m=new vh;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 Js||this.objectValue instanceof Qs){var b=void 0;b=this.objectValue.width<=h.width?new _o(h.x,h.y,this.objectValue.width,h.height):h,t.drawImage(this.objectValue,b.x,b.y,b.width,b.height)}else this.objectValue instanceof jh?this.objectValue.draw(t.currentPage,h):void 0===this.objectValue&&(this.objectValue="",t.drawString(this.objectValue,s,n,o,h.x,h.y,h.width,h.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===Xh.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 zo(e.x,e.y+e.height),r=new zo(e.x,e.y),n=this.cellStyle.borders.left;this.cellStyle.borders.left.dashStyle===ko.Solid&&(n.lineCap=Do.Square),0!==n.width&&t.drawLine(n,i,r),i=new zo(e.x+e.width,e.y),r=new zo(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 zo(t.clientSize.width-n.width/2,e.y),r=new zo(t.clientSize.width-n.width/2,e.y+e.height)),this.cellStyle.borders.right.dashStyle===ko.Solid&&(n.lineCap=Do.Square),0!==n.width&&t.drawLine(n,i,r),i=new zo(e.x,e.y),r=new zo(e.x+e.width,e.y),n=this.cellStyle.borders.top,this.cellStyle.borders.top.dashStyle===ko.Solid&&(n.lineCap=Do.Square),0!==n.width&&t.drawLine(n,i,r),i=new zo(e.x+e.width,e.y+e.height),r=new zo(e.x,e.y+e.height),n=this.cellStyle.borders.bottom,e.y+e.height>t.clientSize.height-n.width/2&&(i=new zo(e.x+e.width,t.clientSize.height-n.width/2),r=new zo(e.x,t.clientSize.height-n.width/2)),this.cellStyle.borders.bottom.dashStyle===ko.Solid&&(n.lineCap=Do.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 _o(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==(l=this.columnSpan)&&this.isCellMergeContinue)for(var o=n+1;o<this.row.grid.columns.count&&this.row.cells.getCell(o).isCellMergeContinue;o++)l++;for(var s=0,a=n;a<n+l;a++){if(this.row.grid.style.allowHorizontalOverflow){var h=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)>h)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 l=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+l;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:ah.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 hs;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 Go(this.tempval,0),!1,new Go(0,0)).actualSize.height):e+=i.layout(r,this.getTextFont(),this.stringFormat,new Go(t,0),!1,new Go(0,0)).actualSize.height),e+=2*(this.style.borders.top.width+this.style.borders.bottom.width)}else if(this.objectValue instanceof ml){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 Js||this.objectValue instanceof Qs)e+=this.objectValue.height;else if(this.objectValue instanceof jh){var s=this.objectValue;e+=i.layout(s.text,s.font,s.stringFormat,new Go(t,0),!1,new Go(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 ml?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}(),ll=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 hl;return this.add(e),t}t.row=this.gridRow,this.cells.push(t)},t.prototype.indexOf=function(t){return this.cells.indexOf(t)},t}(),ul=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 ss),this.stringFormat},set:function(t){this.stringFormat=t},enumerable:!0,configurable:!0}),t}(),cl=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 ul(this.grid));for(var i=0;i<this.grid.rows.count;i++){var r=this.grid.rows.getRow(i),n=new hl;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}(),pl=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.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 ll(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 al,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.grid.rows.rowCollection.indexOf(this),a=0;a<n.rowSpan;a++)a+1<n.rowSpan&&(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}(),dl=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 pl(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 hl);this.rows.push(t)},t.prototype.getRow=function(t){return this.rows[t]},t}(),fl=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 pl(this.grid);for(var r=0;r<this.grid.columns.count;r++)e.cells.add(new hl);this.rows.push(e)}return this.rows}this.rows.push(t)},t.prototype.indexOf=function(t){return this.rows.indexOf(t)},t}(),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)}}(),ml=function(t){function e(){var e=t.call(this)||this;return e.gridSize=new Go(0,0),e.isGridSplit=!1,e.isRearranged=!1,e.pageBounds=new _o,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 gl(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 cl(this)),this.gridColumns},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return null==this.gridRows&&(this.gridRows=new dl(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 fl(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 ol),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 zo&&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 _o&&void 0!==e.width&&void 0===i)return this.drawHelper(t,e,null);if(e instanceof zo&&void 0===e.width&&i instanceof bh)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&"number"==typeof i&&(r instanceof bh||null==r)){var n=t.graphics.clientSize.width-e,o=new _o(e,i,n,0);return this.drawHelper(t,o,r)}return e instanceof _o&&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 Go(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){if(0!==this.rows.count){var e=this.rows.getRow(0).cells.getCell(0).style;if(null!=e.borders&&(null!=e.borders.left&&1!==e.borders.left.width||null!=e.borders.top&&1!==e.borders.top.width)){var i=e.borders.left.width/2,r=e.borders.top.width/2;if(t.bounds.x===Sh.default.right.width/2&&t.bounds.y===Sh.default.right.width/2){var n=new _o(i,r,this.gridSize.width,this.gridSize.height);t.bounds=n}}}this.setSpan(),this.checkSpan(),this.layoutFormat=t.format,this.gridLocation=t.bounds;return new bl(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 h=a.cells.count,l=0;l<h;l++){var u=a.cells.getCell(l);if(n=Math.max(n,u.rowSpan),!u.isCellMergeContinue&&!u.isRowMergeContinue&&(u.columnSpan>1||u.rowSpan>1)){if(u.columnSpan+l>a.cells.count)throw new Error("Invalid span specified at row "+l.toString()+" column "+s.toString());if(u.rowSpan+s>this.headers.count)throw new Error("Invalid span specified at Header "+l.toString()+" column "+s.toString());if(u.columnSpan>1&&u.rowSpan>1){for(t=u.columnSpan,e=u.rowSpan,i=l,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=l,t=u.columnSpan;e>1;){for(r++,this.headers.getHeader(r).cells.getCell(l).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=l}}else if(u.columnSpan>1&&1===u.rowSpan)for(t=u.columnSpan,i=l,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(l).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 h=a.cells.count,l=0;l<h;l++){var u=a.cells.getCell(l);if(r=Math.max(r,u.rowSpan),!u.isCellMergeContinue&&!u.isRowMergeContinue&&(u.columnSpan>1||u.rowSpan>1)){if(u.columnSpan+l>a.cells.count)throw new Error("Invalid span specified at row "+l.toString()+" column "+s.toString());if(u.rowSpan+s>this.rows.count)throw new Error("Invalid span specified at row "+l.toString()+" column "+s.toString());if(u.columnSpan>1&&u.rowSpan>1){for(t=u.columnSpan,i=u.rowSpan,e=l,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=l,t=u.columnSpan;i>1;){for(n++,this.rows.getRow(n).cells.getCell(l).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=l}}else if(u.columnSpan>1&&1===u.rowSpan)for(t=u.columnSpan,e=l,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(l).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 h=0;h<this.columns.count;h++)this.gridColumns.getColumn(h).width>0&&this.gridColumns.getColumn(h).isCustomWidth&&(o-=this.gridColumns.getColumn(h).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(h=0;h<this.columns.count;h++)this.columns.getColumn(h).isCustomWidth||(this.columns.getColumn(h).columnWidth=a)}}else{e=[this.columns.count];for(var l=0;l<this.columns.count;l++)e[l]=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(h=0;h<p;h++){var d=Math.min(this.initialWidth,this.headers.getHeader(h).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(h=0,p=this.rows.count;h<p;h++)if(1==this.rows.getRow(h).cells.getCell(i).columnSpan&&!this.rows.getRow(h).cells.getCell(i).isCellMergeContinue||null!=this.rows.getRow(h).cells.getCell(i).value){if(null!=this.rows.getRow(h).cells.getCell(i).value&&!this.rows.getRow(h).grid.style.allowHorizontalOverflow)this.rows.getRow(h).grid.style.cellPadding.right,this.rows.getRow(h).grid.style.cellPadding.left,this.rows.getRow(h).cells.getCell(i).style.borders.left.width;d=0;d=this.initialWidth>0?Math.min(this.initialWidth,this.rows.getRow(h).cells.getCell(i).width):this.rows.getRow(h).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++){h=0;for(var m=this.columns.count;h<m;h++)if(this.rows.getRow(i).cells.getCell(h).columnSpan>1){e[h];for(var y=1;y<this.rows.getRow(i).cells.getCell(h).columnSpan;y++)e[h+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(h=0;h<this.columns.count;h++)this.gridColumns.getColumn(h).width>0&&this.gridColumns.getColumn(h).isCustomWidth&&(b-=this.gridColumns.getColumn(h).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(h=0;h<this.columns.count;h++)this.columns.getColumn(h).isCustomWidth||(this.columns.getColumn(h).columnWidth=w)}},e}(Ch),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(e){var i=t.call(this,e)||this;return i.gridInitialWidth=0,i.gridSize=new Go(0,0),i.parentCellIndex=0,i.tempWidth=0,i.childheight=0,i.isChildGrid=!1,i.hasRowSpanSpan=!1,i.isRearranged=!1,i.pageBounds=new _o,i.listOfNavigatePages=[],i.flag=!0,i.columnRanges=[],i.currentLocation=new zo(0,0),i.breakRow=!0,i.slr=null,i.remainderText=null,i.isPaginate=!1,i.isOverloadWithPosition=!1,i}return yl(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===La.FitColumnsToPage?this.currentBounds=new _o(new zo(t.bounds.x,t.bounds.y),new Go(this.Grid.columns.width,this.currentGraphics.clientSize.height)):this.currentBounds=new _o(new zo(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 zo(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=[],this.Grid.measureColumnsWidth(this.currentBounds),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 Ns,o=t.page,s=[],a=0;a<this.columnRanges.length;a++){var h=this.columnRanges[a];this.cellStartIndex=h[0],this.cellEndIndex=h[1];var l=this.raiseBeforePageLayout(this.currentPage,this.currentBounds,this.currentRowIndex);this.currentBounds=l.currentBounds,this.currentRowIndex=l.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!==qs.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 zo(Sh.default.right.width/2,Sh.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===Sh.default.right.width/2&&this.currentBounds.y===Sh.default.right.width/2){var L=new _o(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=!0;for(var I=0;I<p.cells.count;I++)p.cells.getCell(I).value instanceof ml&&(p.cells.getCell(I).value.splitChildRowIndex=-1)}}}if(!S.isFinish&&null!==o&&i.layout!==qs.OnePage&&y){if(this.startLocation.x=this.currentBounds.x,this.currentPage=this.getNextPageformat(i),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:this.currentBounds.y=Sh.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===Sh.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,h)}if(null!=p.NestedGridLayoutResult){this.currentPage=p.NestedGridLayoutResult.page,this.currentGraphics=this.currentPage.graphics,this.startLocation=new zo(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 zo(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 ml)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 _o(_,new Go(q,H))),_.x+=q,W+=U.columnSpan-1}}o=this.currentPage}}}var J=!1,X=0;s.length>0&&(X=s[0]);var Q=[[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 ml){var $=this.Grid.rows.getRow(W).cells.getCell(this.cellEndIndex).value;this.rowLayoutBoundsWidth=$.rowLayoutBoundsWidth,J=!0}if(!J&&s.length>0){for(W=0;W<m-1;W++)X<s[W]&&(X=s[W]);this.rowLayoutBoundsWidth=X}else this.rowLayoutBoundsWidth=Q[0][1];if(this.columnRanges.indexOf(h)<this.columnRanges.length-1&&null!=o&&i.layout!=qs.OnePage)if(this.Grid.isChildGrid,0!=Q[0][0]){this.currentPage.section.indexOf(this.currentPage);this.currentGraphics=this.currentPage.graphics,this.currentBounds=new _o(new zo(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!==qs.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==il.NextPage&&this.reArrangePages(n),this.raisePageLayouted(r),r},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 _o(new zo(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 ss;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 Pl(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 Cl(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=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 _o(this.startLocation,new Go(this.currentBounds.width,this.currentBounds.y-this.startLocation.y))),new vl(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 Ll(e,t,i);this.Grid.onBeginPageLayout(n),r=n.cancel,e=n.bounds,i=n.startRowIndex}return{returnValue:r,currentBounds:e,currentRowIndex:i}},e.prototype.raisePageLayouted=function(t){var e=new Tl(t);return this.Grid.raiseEndPageLayout&&this.Grid.onEndPageLayout(e),e},e.prototype.drawRow=function(t,i,r){if(void 0===i){var n=new Ml,o=0,s=new Go(0,0),a=!1;if(t.rowSpanExists){var h=0,l=this.Grid.rows.rowCollection.indexOf(t);-1===l&&-1!==(l=this.Grid.headers.indexOf(t))&&(a=!0);for(var u=0;u<t.cells.count;u++){var c=t.cells.getCell(u);h=Math.max(h,c.rowSpan)}for(u=l;u<l+h;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(this.Grid.isChildGrid&&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?(this.Grid.ParentCell.row.grid.LayoutFormat.break===La.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==qs.Paginate&&this.Grid.LayoutFormat.break!=La.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&&void 0!==this.Grid.ParentCell&&null!==this.Grid.ParentCell&&this.currentBounds.y+this.Grid.ParentCell.row.grid.style.cellPadding.bottom+p>this.currentBounds.height?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 zo(this.currentBounds.x,this.currentBounds.y);i.bounds=new _o(f,new Go(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 Go(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 _o(f,s),b,y),t.cells.getCell(u).value instanceof ml){(w=t.cells.getCell(u).value).parentCellIndex=u}var v=t.cells.getCell(u).draw(this.currentGraphics,new _o(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 _o(f,s),b,t.cells.getCell(u).style),t.cells.getCell(u).value instanceof ml){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 _o(new zo(i.bounds.x,i.bounds.y),new Go(f.x,f.y))},e.prototype.isFitToCell=function(t,e,i){for(var r=!1,n=new hs,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:ah.defaultFont,this.remainderText=i.cells.getCell(o).value;var h=i.cells.getCell(o).width;e.columns.getColumn(o).isCustomWidth&&i.cells.getCell(o).width>e.columns.getColumn(o).width&&(h=e.columns.getColumn(o).width),this.slr=n.layout(i.cells.getCell(o).value,a,i.cells.getCell(o).stringFormat,new Go(h,t),!1,this.currentPageBounds);var l=this.slr.actualSize.height;if(0==l){r=!1;break}if(t>l||void 0!==this.slr.remainder&&null!==this.slr.remainder){r=!0;break}}}return r},e.prototype.drawRowWithBreak=function(t,e,i){var r=new zo(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 _o(r,new Go(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 ml&&(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 Go(this.Grid.columns.getColumn(n).width,this.gridHeight>0?this.gridHeight:this.currentPageBounds.height),h=e.cells.getCell(n).style;e.cells.getCell(n).style=h;var l=null;if(l=e.cells.getCell(n).draw(this.currentGraphics,new _o(r,a),s),e.rowBreakHeight>0&&null!=l&&void 0!==l.remainder&&(e.cells.getCell(n).FinishedDrawingCell=!1,e.cells.getCell(n).remainingString=null==l.remainder?" ":l.remainder,e.grid.isChildGrid&&(e.rowBreakHeight=i-l.actualSize.height)),t.isFinish=t.isFinish?e.cells.getCell(n).FinishedDrawingCell:t.isFinish,e.cells.getCell(n).value instanceof ml){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 _o(new zo(t.bounds.x,t.bounds.y),new Go(r.x,r.y))},e.repeatRowIndex=-1,e}(yh),vl=function(t){function e(e,i){return t.call(this,e,i)||this}return yl(e,t),e}(wh),wl=function(t){function e(e){return t.call(this,e)||this}return yl(e,t),e}(bh),Sl=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}(),Pl=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 yl(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}(Sl),Cl=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 yl(e,t),Object.defineProperty(e.prototype,"style",{get:function(){return this.cellStyle},enumerable:!0,configurable:!0}),e}(Sl),xl=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}(),Ol=function(t){function e(e,i){var r=t.call(this)||this;return r.bounds=e,r.pdfPage=i,r}return yl(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}(xl),Bl=function(t){function e(e){var i=t.call(this)||this;return i.layoutResult=e,i}return yl(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}(xl),Ll=function(t){function e(e,i,r){var n=t.call(this,e,i)||this;return n.startRow=r,n}return yl(e,t),Object.defineProperty(e.prototype,"startRowIndex",{get:function(){return this.startRow},enumerable:!0,configurable:!0}),e}(Ol),Tl=function(t){function e(e){return t.call(this,e)||this}return yl(e,t),e}(Bl),Ml=function(){function t(){this.layoutedBounds=new _o(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}(),Dl=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)}}(),kl=function(t){function e(e){var i=t.call(this,e)||this;return i.olderPdfForm=0,i.shapeBounds=new _o,i.totalPageSize=0,i}return Dl(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 El;for(s.page=e;;){var a=this.raiseBeforePageLayout(e,i);i=a.currentBounds;var h=null;if(a.cancel||(s=this.layoutOnPage(e,i,r,t),h=this.raiseEndPageLayout(s),a.cancel=null!==h&&h.cancel),s.end||a.cancel){o=this.getLayoutResult(s);break}if(i=this.getPaginateBounds(t),r=this.getNextShapeBounds(r,s),e=null===h||null===h.nextPage?this.getNextPage(e):h.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 Ol(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 Bl(i),this.element.onEndPageLayout(e)}return e},e.prototype.getLayoutResult=function(t){return new wh(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 El;e=this.checkCorrectCurrentBounds(t,e,r);var o=this.fitsToBounds(e,i),s=!1;if(!(r.format.break===La.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===qs.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 zo(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}(yh),El=function(){return function(){}}(),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)}}(),Il=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return jl(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 kl(this).layout(t)},e}(Ch),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){var i=t.call(this)||this;return void 0!==e&&(i.mpen=e),i}return Rl(e,t),Object.defineProperty(e.prototype,"pen",{get:function(){return this.mpen},set:function(t){this.mpen=t},enumerable:!0,configurable:!0}),e}(Il),Nl=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)}}(),Fl=function(t){function e(e,i){var r=t.call(this)||this;return r.mbrush=null,void 0===e||(e instanceof js?r=t.call(this,e)||this:r.mbrush=i),r}return Nl(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 js(new Vo(0,0,0)):this.pen},e}(Al),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){var o=t.call(this)||this;return o.mpoints=null,o.mpathTypes=null,o.mStartFigure=!0,o.mfillMode=Eo.Alternate,o.isBeziers3=!1,o.isXps=!1,void 0===e||(e instanceof js?(o=t.call(this,e)||this,i instanceof Wo?(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 Wo?(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}Vl(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 zo&&void 0===e.width&&void 0===i)return this.drawHelper(t,e.x,e.y);if(e instanceof _o&&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 zo&&i instanceof bh)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&(r instanceof bh||null==r)&&"number"==typeof i){var n=t.graphics.clientSize.width-e,o=new _o(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 _o)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 h=[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(h,Ta.Bezier3)}},e.prototype.addBezier=function(t,e,i,r,n,o,s,a){if(t instanceof zo&&e instanceof zo&&i instanceof zo&&r instanceof zo)this.addBezier(t.x,t.y,e.x,e.y,i.x,i.y,r.x,r.y);else{var h=[];h.push(t),h.push(e),h.push(i),h.push(r),h.push(n),h.push(o),h.push(s),h.push(a),this.addPoints(h,Ta.Bezier3)}},e.prototype.addEllipse=function(t,e,i,r){t instanceof _o?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 zo&&e instanceof zo)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,Ta.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 _o?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 zo(t+i/2,e+r/2),Ta.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,Ta.Line),this.closeFigure()},e.prototype.addRectangle=function(t,e,i,r){if(t instanceof _o)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,Ta.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===Ta.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 zo(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,h;Math.abs(o)<=90?(a=o,h=1):a=o/(h=Math.ceil(Math.abs(o)/90));for(var l=(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<h;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(l+c*v,u-p*S,l+c*(v-f*S),u-p*(S+f*v),l+c*(w+f*P),u-p*(P-f*w),l+c*w,u-p*P):g.push(l+c*v,u-p*S,l+c*(v+f*S),u-p*(S-f*v),l+c*(w-f*P),u-p*(P+f*w),l+c*w,u-p*P)}return g},e.prototype.getBoundsInternal=function(){var t=this.pathPoints,e=new _o(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 _o(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 zo(t[n],t[n+1]);n===i?this.pointCount<=0||this.mStartFigure?(this.addPoint(o,Ta.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,Ta.Bezier3):this.addPoint(o,Ta.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|=Ta.CloseSubpath,this.types[t]=e}}}(Fl),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,s){var a=t.call(this)||this;return a.bounds=new _o(0,0,0,0),void 0===e||(e instanceof js?(a=t.call(this,e,i)||this).bounds=r instanceof _o?r:new _o(r,n,o,s):a.bounds=e instanceof _o?e:new _o(e,i,r,n)),a}return zl(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}(Fl),_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,r,n,o,s,a,h){var l=t.call(this)||this;return l.startAngle=0,l.sweepAngle=0,void 0===e||(e instanceof _o&&void 0!==i&&void 0!==r?((l=t.call(this,e)||this).startAngle=i,l.sweepAngle=r):e instanceof js?r instanceof _o?((l=t.call(this,e,i,r)||this).startAngle=n,l.sweepAngle=o):((l=t.call(this,e,i,r,n,o,s)||this).startAngle=a,l.sweepAngle=h):((l=t.call(this,e,i,r,n)||this).startAngle=o,l.sweepAngle=s)),l}return _l(e,t),e}(Gl),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(e,i,r,n,o,s,a){var h=this;return void 0===e?h=t.call(this)||this:e instanceof _o?h=t.call(this,e,i,r)||this:e instanceof js?i instanceof _o?h=t.call(this,e,null,i,r,n)||this:void 0===s&&void 0===a?h=t.call(this,e,null,0,0,i,r,n,o)||this:void 0!==s&&void 0!==a&&(h=t.call(this,e,null,i,r,n,o,s,a)||this):void 0!==e&&void 0===o&&void 0===s?h=t.call(this,0,0,e,i,r,n)||this:void 0!==e&&void 0!==o&&void 0!==s&&(h=t.call(this,e,i,r,n,o,s)||this),h}Wl(e,t),e.prototype.draw=function(t,e,i,r){if(e instanceof zo&&void 0===e.width&&void 0===i)return this.drawHelper(t,e.x,e.y);if(e instanceof _o&&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 zo&&i instanceof bh)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&(r instanceof bh||null==r)&&"number"==typeof i){var n=t.graphics.clientSize.width-e,o=new _o(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)}}(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)}}()),ql=(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,Fo.Regular),n}Ul(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!==No.None){i=this.getUnicodeLineWidth(t,i,e).width}else i=this.fontInternal.getLineWidth(t);var r=this.metrics.getSize(e);return i*=ps.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 Sa(t,this.size),this.calculateStyle(e),this.initializeInternals()},e.prototype.calculateStyle=function(t){var e=this.fontInternal.ttfMetrics.macStyle;0!=(t&Fo.Underline)&&(e|=Fo.Underline),0!=(t&Fo.Strikeout)&&(e|=Fo.Strikeout),this.setStyle(e)},e.prototype.initializeInternals=function(){var t=null;ah.enableCache&&(t=ah.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 Sa&&(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 Ba).getGlyphIndex(t,this,i.textDirection===No.RightToLeft,r,!0),o=n.success;if(r=n.glyphs,o&&null!==r)for(var s=this.fontInternal.ttfReader,a=0,h=r.length;a<h;a++){var l=r[a],u=s.getGlyph(l);null!==u&&void 0!==u&&(e+=u.width)}return{success:o,width:e}}}(ps),function(){function t(t,e,i,r,n){t instanceof _o&&void 0===e?this.InitiateBounds(t.x,t.y,t.width,t.height,null):t instanceof _o&&e instanceof Ja&&void 0===i?this.InitiateBounds(t.x,t.y,t.width,t.height,e):t instanceof zo&&e instanceof Go&&void 0===i?this.InitiateBounds(t.x,t.y,e.width,e.height,null):t instanceof zo&&e instanceof Go&&i instanceof Ja&&void 0===r?this.InitiateBounds(t.x,t.y,e.width,e.height,i):t instanceof Go&&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 Ja&&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===Ts.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===Ts.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===Ts.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===Ts.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===Ts.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===Ts.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 _o(new zo(this.x,this.y),this.size)},set:function(t){this.type===Ts.None&&(this.location=new zo(t.x,t.y),this.size=new Go(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 Ea(i,r)},t.prototype.updateDocking=function(t){if(t!==Ts.None){switch(t){case Ts.Top:this.dock=Bs.Top;break;case Ts.Bottom:this.dock=Bs.Bottom;break;case Ts.Left:this.dock=Bs.Left;break;case Ts.Right:this.dock=Bs.Right}this.resetAlignment()}},t.prototype.resetAlignment=function(){this.alignment=Ls.None},t.prototype.setAlignment=function(t){if(this.dock===Bs.None)this.alignmentStyle=t;else{var e=!1;switch(this.dock){case Bs.Left:e=t===Ls.TopLeft||t===Ls.MiddleLeft||t===Ls.BottomLeft||t===Ls.None;break;case Bs.Top:e=t===Ls.TopLeft||t===Ls.TopCenter||t===Ls.TopRight||t===Ls.None;break;case Bs.Right:e=t===Ls.TopRight||t===Ls.MiddleRight||t===Ls.BottomRight||t===Ls.None;break;case Bs.Bottom:e=t===Ls.BottomLeft||t===Ls.BottomCenter||t===Ls.BottomRight||t===Ls.None;break;case Bs.Fill:e=t===Ls.MiddleCenter||t===Ls.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 zo(r.x,r.y),new Go(r.width,r.height))},t.prototype.calculateBounds=function(t,e){var i=this.bounds;return this.alignmentStyle!==Ls.None?i=this.getAlignmentBounds(t,e):this.dockStyle!==Bs.None&&(i=this.getDockBounds(t,e)),i},t.prototype.getAlignmentBounds=function(t,e){this.bounds;return this.type===Ts.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 Ls.TopLeft:n=0,o=0;break;case Ls.TopCenter:n=(r.width-this.width)/2,o=0;break;case Ls.TopRight:n=r.width-this.width,o=0;break;case Ls.MiddleLeft:n=0,o=(r.height-this.height)/2;break;case Ls.MiddleCenter:n=(r.width-this.width)/2,o=(r.height-this.height)/2;break;case Ls.MiddleRight:n=r.width-this.width,o=(r.height-this.height)/2;break;case Ls.BottomLeft:n=0,o=r.height-this.height;break;case Ls.BottomCenter:n=(r.width-this.width)/2,o=r.height-this.height;break;case Ls.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 Ls.TopLeft:this.type===Ts.Left?(o=-n.x,s=0):this.type===Ts.Top&&(o=-n.x,s=-n.y);break;case Ls.TopCenter:o=(n.width-this.width)/2,s=-n.y;break;case Ls.TopRight:this.type===Ts.Right?(o=n.width+r.getRightIndentWidth(e,t,!1)-this.width,s=0):this.type===Ts.Top&&(o=n.width+r.getRightIndentWidth(e,t,!1)-this.width,s=-n.y);break;case Ls.MiddleLeft:o=-n.x,s=(n.height-this.height)/2;break;case Ls.MiddleCenter:o=(n.width-this.width)/2,s=(n.height-this.height)/2;break;case Ls.MiddleRight:o=n.width+r.getRightIndentWidth(e,t,!1)-this.width,s=(n.height-this.height)/2;break;case Ls.BottomLeft:this.type===Ts.Left?(o=-n.x,s=n.height-this.height):this.type===Ts.Bottom&&(o=-n.x,s=n.height+r.getBottomIndentHeight(e,t,!1)-this.height);break;case Ls.BottomCenter:o=(n.width-this.width)/2,s=n.height+r.getBottomIndentHeight(e,t,!1)-this.height;break;case Ls.BottomRight:this.type===Ts.Right?(o=n.width+r.getRightIndentWidth(e,t,!1)-this.width,s=n.height-this.height):this.type===Ts.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===Ts.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 Bs.Left:r=0,n=0,o=this.width,s=i.height;break;case Bs.Top:r=0,n=0,o=i.width,s=this.height;break;case Bs.Right:r=i.width-this.width,n=0,o=this.width,s=i.height;break;case Bs.Bottom:r=0,n=i.height-this.height,o=i.width,s=this.height;break;case Bs.Fill:r=0,r=0,o=i.width,s=i.height}return new _o(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,h=this.height;switch(this.dockStyle){case Bs.Left:o=-r.x,s=0,a=this.width,h=r.height;break;case Bs.Top:o=-r.x,s=-r.y,a=n.width,h=this.height,r.height<0&&(s=-r.y+n.height);break;case Bs.Right:o=r.width+i.getRightIndentWidth(e,t,!1)-this.width,s=0,a=this.width,h=r.height;break;case Bs.Bottom:o=-r.x,s=r.height+i.getBottomIndentHeight(e,t,!1)-this.height,a=n.width,h=this.height,r.height<0&&(s-=n.height);break;case Bs.Fill:o=0,o=0,a=r.width,h=r.height}return new _o(o,s,a,h)}}(),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()}});di.userAgent.toString().indexOf("HeadlessChrome");i=c(i)?bs.Landscape:i;var a=n.control.svgObject.cloneNode(!0),h=a.childNodes[0];if(!c(h)){var l=h.getAttribute("fill");"Tailwind"!==n.control.theme&&"TailwindDark"!==n.control.theme&&"Bootstrap5"!==n.control.theme&&"Bootstrap5Dark"!==n.control.theme||"rgba(255,255,255, 0.0)"!==l&&"transparent"!==l||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 ah,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 Qs(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}()),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,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},Jl=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 Kl(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(){Xl.levelsData=null,Xl.defaultLevelsData=null,Xl.hierarchyData=null,this.createSecondaryElement(),this.addTabIndex(),this.themeStyle=me(this.theme),this.renderBorder(),this.renderTitle(this.titleSettings,"title",null,null),c(Xl.levelsData)||(Xl.defaultLevelsData=Xl.levelsData),this.processDataManager()},e.prototype.processDataManager=function(){var t,e,i,r,n=this;if(this.dataSource instanceof Rn){t=this.dataSource,e=this.query instanceof Pn?this.query:new Pn;t.executeQuery(e).then(function(t){n.dataSource=t.result,n.renderTreeMapElements()})}else this.dataSource instanceof wn?(r=this.dataSource,(i=new ii(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 dn(mt(this.width,t)||t||600,mt(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 Cr(this.element.id),this.layout=new Sn(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&&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 gn(this.element.id+"_TreeMap_Border",this.background||this.themeStyle.backgroundColor,this.border,1,new fn(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=bt(s,t.text,o),h=yt(a,o),l=vt(c(i)?new fn(this.margin.left,this.margin.top,this.availableSize.width,this.availableSize.height):i,t.alignment,h,e),u=new yn(this.element.id+"_TreeMap_"+e,l.x,l.y,"start",a),p=new fn(l.x,l.y,h.width,h.height),d=St(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 fn(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 fn(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(Xl.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=Bt(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]})}Xl.levelsData.push(i)}else{if(this.isHierarchicalData){Xl.hierarchyData=[],Xl.hierarchyData=u([],this.dataSource,Xl.hierarchyData,!0);for(r=0;r<Xl.hierarchyData.length;r++)this.processHierarchicalData(Xl.hierarchyData[r],r);Xl.levelsData=Xl.hierarchyData}else this.processFlatJsonData(),Xl.levelsData.length>1&&this.reOrderLevelData(Xl.levelsData.length-1);t=this.levels[0].groupPath}this.isHierarchicalData||this.findTotalWeight(Xl.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=Bt(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=Bt(t),(i=s?s.values:null)&&i.length>0){n=s.key;for(var h=0;h<this.levels.length;h++)n===this.levels[h].groupPath&&(this.levels[h],r=h);for(var l=0;l<i.length;l++){i[l].name=i[l][a],i[l].levelOrderName=(0===r?i[l].name:t.levelOrderName+"#"+i[l].name)+"";var u=i[l].levelOrderName,p=void 0;u.search("#")>0&&(p=u.split("#").length-1),i[l].groupIndex=c(r)?p===this.levels.length?this.levels.length:p:r,0!==r&&(i[l].parent=t),i[l].groupName=n,i[l].data=i[l],i[l].isDrilled=!1,i[l].weight=i[l][this.weightValuePath]}i.forEach(function(t){o.processHierarchicalData(t,e)})}if(e===Xl.hierarchyData.length-1){for(var d=Xl.hierarchyData[0][this.levels[0].groupPath],f=0;f<Xl.hierarchyData.length;f++)i=Bt(Xl.hierarchyData[f]).values,0!==f&&i&&(i.forEach(function(t){d.push(t)}),Xl.hierarchyData.splice(f,1),f-=1);d=Xl.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]=[],Xl.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 h=0;h<=i;h++){var l=this.levels[h]?this.levels[h].groupPath:t;s+=this.dataSource[n][l]+(h===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],Xl.levelsData[Xl.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=Xl.levelsData[t][i],o=Xl.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(Xl.levelsData[Xl.levelsData.length-1][i],"Child"),Xl.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("#"),h.dataSource.forEach(function(e){Ot(r,t[a].levelOrderName,e,o)&&(i+=parseFloat(e[o.weightValuePath]))}),"Parent"===e&&(s[n]=t,t[a].parent=s),t[a].weight=i},h=this,l=0;l<t.length;l++)a(l)},e.prototype.unWireEVents=function(){fi.remove(this.element,"click",this.clickOnTreeMap),fi.remove(this.element,"dblclick",this.doubleClickOnTreeMap),fi.remove(this.element,"contextmenu",this.rightClickOnTreeMap),fi.remove(this.element,di.touchStartEvent,this.mouseDownOnTreeMap),fi.remove(this.element,di.touchMoveEvent,this.mouseMoveOnTreeMap),fi.remove(this.element,di.touchEndEvent,this.mouseEndOnTreeMap),fi.remove(this.element,"pointerleave mouseleave",this.mouseLeaveOnTreeMap),window.removeEventListener("resize",this.resizeOnTreeMap)},e.prototype.wireEVents=function(){fi.add(this.element,"click",this.clickOnTreeMap,this),fi.add(this.element,"dblclick",this.doubleClickOnTreeMap,this),fi.add(this.element,"contextmenu",this.rightClickOnTreeMap,this),fi.add(this.element,di.touchStartEvent,this.mouseDownOnTreeMap,this),fi.add(this.element,di.touchMoveEvent,this.mouseMoveOnTreeMap,this),fi.add(this.element,di.touchEndEvent,this.mouseEndOnTreeMap,this),fi.add(this.element,"pointerleave mouseleave",this.mouseLeaveOnTreeMap,this),window.addEventListener("resize",this.resizeOnTreeMap.bind(this))},e.prototype.setCulture=function(){this.intl=new $e},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 dn(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("_")[6]),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=Zt(t.text,t.item.data,t.treemap),n.innerHTML=t.text):Pt(o,n,t.contentItemTemplate))}));var h,l=(new Date).getMilliseconds();c(this.doubleClick)||(!c(h)&&l-h<500&&this.doubleClickOnTreeMap(t),h=l)},e.prototype.doubleClickOnTreeMap=function(t){var e={cancel:!1,name:Ur,treemap:this,mouseEvent:t};this.trigger(Ur,e)},e.prototype.rightClickOnTreeMap=function(t){var e={cancel:!1,name:qr,treemap:this,mouseEvent:t};this.trigger(qr,e)},e.prototype.mouseDownOnTreeMap=function(t){t.target.id.indexOf("_Item_Index")>-1&&(this.mouseDown=!0),this.notify(di.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=Bt(i=this.layout.renderItems[parseFloat(r.split("_")[6])]).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(di.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,h=this.layout.renderItems[0].levelOrderName.split("#").length,l=0;l<h;l++)s=0===l?e.levelText[l]:s+"#"+e.levelText[l];a=h>1?h: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,h=this,l=t.target,p=l.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("_")[6]),o=this.layout.renderItems[n];var y=l.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&&Bt(o).values&&Bt(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:Gr,treemap:this,element:l,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(Gr,i,function(t){if(h.currentLevel=o.isDrilled&&c(s)?o.groupIndex:!c(s)&&h.enableBreadcrumb&&o.isDrilled?s:null,!t.cancel){if(document.getElementById(g)){var i=document.getElementById(g);i.parentNode.removeChild(i)}if(e=u({},h.areaRect,e,!0),h.legendSettings.visible&&!c(h.treeMapLegendModule)&&(c(f)||(h.treeMapLegendModule.legendGroup.textContent="",h.treeMapLegendModule.legendGroup=null,h.treeMapLegendModule.widthIncrement=0,h.treeMapLegendModule.heightIncrement=0,h.enableBreadcrumb&&!c(s)?h.drilledLegendItems={name:h.drilledItems[h.drilledItems.length-1].data.levelOrderName,data:h.drilledItems[h.drilledItems.length-1].data}:h.drilledLegendItems={name:o.levelOrderName,data:o},h.treeMapLegendModule.renderLegend()),e=c(h.totalRect)?e:h.totalRect),document.getElementById(m)){var r=document.getElementById(m);r.parentNode.removeChild(r)}c(t.childItems)||t.cancel?(h.layout.calculateLayoutItems(f,e),h.layout.renderLayoutItems(f)):h.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(di.touchEndEvent,t)},e.prototype.mouseLeaveOnTreeMap=function(t){this.treeMapTooltipModule&&this.treeMapTooltipModule.removeTooltip(),this.treeMapLegendModule&&this.treeMapLegendModule.removeInteractivePointer(),Qt(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",this),this.treeMapHighlightModule&&(he(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,Fn]}),this.allowImageExport&&t.push({member:"ImageExport",args:[this,Vn]}),this.allowPdfExport&&t.push({member:"PdfExport",args:[this,ql]}),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(ge(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""},Yl([G(!1)],e.prototype,"allowPrint",void 0),Yl([G(!1)],e.prototype,"allowImageExport",void 0),Yl([G(!1)],e.prototype,"allowPdfExport",void 0),Yl([G(null)],e.prototype,"width",void 0),Yl([G(null)],e.prototype,"height",void 0),Yl([_({},$r)],e.prototype,"border",void 0),Yl([_({},Zr)],e.prototype,"margin",void 0),Yl([G(null)],e.prototype,"background",void 0),Yl([G("Material")],e.prototype,"theme",void 0),Yl([_({},nn)],e.prototype,"titleSettings",void 0),Yl([G("Squarified")],e.prototype,"layoutType",void 0),Yl([G(null)],e.prototype,"dataSource",void 0),Yl([G(null)],e.prototype,"query",void 0),Yl([G(null)],e.prototype,"weightValuePath",void 0),Yl([G("")],e.prototype,"rangeColorValuePath",void 0),Yl([G("")],e.prototype,"equalColorValuePath",void 0),Yl([G(null)],e.prototype,"colorValuePath",void 0),Yl([G([])],e.prototype,"palette",void 0),Yl([G("TopLeftBottomRight")],e.prototype,"renderDirection",void 0),Yl([G(!1)],e.prototype,"enableDrillDown",void 0),Yl([G(!1)],e.prototype,"enableBreadcrumb",void 0),Yl([G(" - ")],e.prototype,"breadcrumbConnector",void 0),Yl([G(!1)],e.prototype,"drillDownView",void 0),Yl([_({},an)],e.prototype,"initialDrillDown",void 0),Yl([_({},hn)],e.prototype,"leafItemSettings",void 0),Yl([H([],pn)],e.prototype,"levels",void 0),Yl([_({},cn)],e.prototype,"highlightSettings",void 0),Yl([_({},un)],e.prototype,"selectionSettings",void 0),Yl([_({},ln)],e.prototype,"tooltipSettings",void 0),Yl([_({},sn)],e.prototype,"legendSettings",void 0),Yl([G(!1)],e.prototype,"useGroupingSeparator",void 0),Yl([G(null)],e.prototype,"description",void 0),Yl([G(1)],e.prototype,"tabIndex",void 0),Yl([G(null)],e.prototype,"format",void 0),Yl([W()],e.prototype,"load",void 0),Yl([W()],e.prototype,"beforePrint",void 0),Yl([W()],e.prototype,"loaded",void 0),Yl([W()],e.prototype,"itemRendering",void 0),Yl([W()],e.prototype,"drillStart",void 0),Yl([W()],e.prototype,"drillEnd",void 0),Yl([W()],e.prototype,"itemSelected",void 0),Yl([W()],e.prototype,"itemHighlight",void 0),Yl([W()],e.prototype,"tooltipRendering",void 0),Yl([W()],e.prototype,"itemClick",void 0),Yl([W()],e.prototype,"itemMove",void 0),Yl([W()],e.prototype,"click",void 0),Yl([W()],e.prototype,"doubleClick",void 0),Yl([W()],e.prototype,"rightClick",void 0),Yl([W()],e.prototype,"mouseMove",void 0),Yl([W()],e.prototype,"resize",void 0),Yl([W()],e.prototype,"legendItemRendering",void 0),Yl([W()],e.prototype,"legendRendering",void 0),e=Yl([U],e)}(Mi),Xl=function(){return function(){}}(),Ql=function(){function t(t){this.page=0,this.legendBorderRect=new fn(0,0,0,0),this.currentPage=0,this.heightIncrement=0,this.widthIncrement=0,this.textMaxWidth=0,this.legendInteractiveGradient=[],this.legendItemRect=new fn(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:Yr,treemap:this.treemap,_changePosition:this.treemap.legendSettings.position,position:this.treemap.legendSettings.position},this.treemap.trigger(Yr,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(Xl.levelsData[0]),(this.treemap.palette.length>0||!c(this.treemap.colorValuePath))&&0===this.legendCollections.length&&this.findPaletteLegendItems(Xl.levelsData[0],"Parent"),this.legendCollections.length>0){var r=i.position,n=i.title.text,o=i.titleStyle,s=i.mode,a=0,h=0,l=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=yt(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=yt(O.legendName,i.textStyle);if(this.textMaxWidth=Math.max(this.textMaxWidth,B.width),0===x)w=a=10+d/2,S=h=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,h=S):(a=f[0].x,h=M+L/2)}else a=T-d/2,h=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,h=S,g=[],f=[],this.getPageChanged(),C=0):(a=k+d/2,h=f[0].y)}else a=f[C-1].x,h=D+10+p/2}}l=a+d/2+P,u=h+B.height/4,f.push({x:a,y:h}),g.push({x:l,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:h},Text:{x:l,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-(l+B.width)),height:p>B.height?p:B.height}}),C++}var E=this.totalPages[0].Collection;E.forEach(function(e,i){var r=new fn(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 dn(0,0);"None"===z?W=yt(H,j):"Trim"===z?W=yt(H=bt("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?(l=w+R/2,u="After"===N?S+A+W.height/2+10:S-10):(l="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?l-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:l,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=Bt(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=Bt(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=Bt(s.data).values;else{i=Bt(s.data.parent).values}}else i=Bt(t).values;var a;if(i&&i.length>0){for(var h=0;h<i.length;h++)(c(i[h].data[this.treemap.legendSettings.showLegendPath])||i[h].data[this.treemap.legendSettings.showLegendPath])&&(a=i[h].data[this.treemap.legendSettings.valuePath]?i[h].data[this.treemap.legendSettings.valuePath]:i[h].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[h%this.treemap.palette.length]:r:i[h].data[this.treemap.colorValuePath],legendData:[],itemArea:i[h].weight}));if(this.legendCollections.sort(Yt),this.treemap.palette.length>0)for(var l=0;l<this.legendCollections.length;l++)this.legendCollections[l].legendFill=c(this.treemap.currentLevel)?this.treemap.palette[l%this.treemap.palette.length]:r}},t.prototype.calculateLegendItems=function(t){var e,i,r,n,o,s,a,h,l,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(h=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)}l="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:l,y2:u};h=this.treemap.renderer.drawGradient("linearGradient",j,M).childNodes[0],"[object Array]"!==Object.prototype.toString.call(T.color)&&(h.childNodes[0].setAttribute("stop-opacity",T.minOpacity.toString()),h.childNodes[1].setAttribute("stop-opacity",T.maxOpacity.toString())),this.defsElement.appendChild(h),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(h)&&c(T.value)?this.legendGradientColor(T,x):i,this.legendCollections.push({actualValue:p,legendName:o,legendFill:i,legendData:[],gradientElement:c(h)?c(T.value)?this.legendLinearGradient:null:h,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,h=i.element.id+"_Legend_Index_"+s+"_Text",l=this.legendRenderingCollections[s];t=(e=l.element)?"url(#"+e.id+")":l.fill;var u=new fn(l.x,l.y,l.width,l.height),c=new bn(l.textX,l.textY),p=new gn(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+l.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))),St(new yn(h,c.x,c.y,"middle",l.text,"",""),o,o.color||this.treemap.themeStyle.legendTextColor,this.legendGroup),this.legendGroup.appendChild(n.drawRectangle(p))}Xt(this.treemap,this.legendGroup)},t.prototype.defaultLegendRtlLocation=function(t,e,i,r){var n=t.Shape,o=t.Text,s=yt(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 dn(o.shapeWidth,o.shapeHeight),a=n.renderer,h=o.shapeBorder;if(t>=0&&t<this.totalPages.length){document.getElementById(this.legendGroup.id)&&document.getElementById(this.legendGroup.id).remove();for(var l="HorizontalLine"===o.shape||"VerticalLine"===o.shape||"Cross"===o.shape,u=l?c(o.fill)?"#000000":o.fill:h.color,p=l&&0===h.width?1:h.width,d=function(h){var c=f.totalPages[t].Collection[h],d=a.createGroup({id:n.element.id+"_Legend_Index_"+h}),g=c.DisplayText,m=n.element.id+"_Legend_Shape_Index_"+h,y=n.element.id+"_Legend_Text_Index_"+h,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:Kr,treemap:n,fill:c.Fill,shape:o.shape,imageUrl:o.imageUrl},f.treemap.trigger(Kr,i,function(t){var e=new mn(m,t.fill,p,l?c.Fill:u,o.opacity,"");d.appendChild(oe(b,t.shape,s,t.imageUrl,e,g)),St(new yn(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=yt(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 mn(n.element.id+"_Left_Page","#a6a6a6",0,"#a6a6a6",1,"",L);x.appendChild(a.drawPath(T));var M=new gn(n.element.id+"_Left_Page_Rect","transparent",{},1,new fn(w-5,P-10,20,20),"");x.appendChild(a.drawRectangle(M)),this.wireEvents(x);var D=new mn(n.element.id+"_Right_Page","#a6a6a6",0,"#a6a6a6",1,"",B);O.appendChild(a.drawPath(D));var k=new gn(n.element.id+"_Right_Page_Rect","transparent",{},1,new fn(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=yt(bt(this.legendItemRect.width+20,i,r),r);this.legendBorderRect=new fn(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 gn(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=bt(this.legendItemRect.width+20,r,i),o=yt(n,i);r&&St(new yn(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,h=void 0,l=void 0,u=void 0,p=void 0,d=void 0;n=e.layout.renderItems[parseFloat(i.id.split("_")[6])];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 fn(Math.abs(a.left-f.left),Math.abs(a.top-f.top),a.width,a.height);if(l=d.getAttribute("fill"),u=o.shapeBorder.color,p=o.shapeBorder.width,!c(s.legendData)){h=s.legendData;for(var y=0;y<h.length;y++)if(h[y].levelOrderName===n.levelOrderName){this.drawInteractivePointer(o,l,u,r,p,m);break}}}}else this.removeInteractivePointer()},t.prototype.drawInteractivePointer=function(t,e,i,r,n,o){var s,a,h;s="Horizontal"===("None"===t.orientation?"Top"===t.position||"Bottom"===t.position?"Horizontal":"Vertical":t.orientation)?t.invertedPointer?" M "+(a=o.x+o.width/2)+" "+(h=o.y+o.height)+" L "+(a-10)+" "+(h+10)+" L "+(a+10)+" "+(h+10)+" Z ":" M "+(a=o.x+o.width/2)+" "+(h=o.y)+" L "+(a-10)+" "+(h-10)+" L "+(a+10)+" "+(h-10)+" Z ":t.invertedPointer?" M "+(a=o.x)+" "+(h=o.y+o.height/2)+" L "+(a-10)+" "+(h-10)+" L "+(a-10)+" "+(h+10)+" z ":" M "+(a=o.x+o.width)+" "+(h=o.y+o.height/2)+" L "+(a+10)+" "+(h-10)+" L "+(a+10)+" "+(h+10)+" z ";var l=new mn(r,e,n,i,1,"",s);this.treemap.svgObject.appendChild(this.treemap.renderer.drawPath(l))},t.prototype.getLegendAlignment=function(t,e,i,r){var n,o,s,a=(s=u({},t.areaRect,s,!0)).x,h=s.y,l=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=l-i,n=p/2-e/2,o="Top"===f?h:h+s.height+10,s.y="Top"===f?h+i+10:h;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 bn(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){fi.add(t,di.touchStartEvent,this.changeNextPage,this)},t.prototype.addEventListener=function(){this.treemap.isDestroyed||(this.treemap.on(di.touchMoveEvent,this.renderInteractivePointer,this),this.treemap.on(di.touchEndEvent,this.mouseUpHandler,this))},t.prototype.removeEventListener=function(){this.treemap.isDestroyed||(this.treemap.off(di.touchMoveEvent,this.renderInteractivePointer),this.treemap.off(di.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",h="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",h+"%");for(var l=0;l<t.color.length;l++){var u=100/(t.color.length-1),p=document.createElementNS(r,"stop");p.setAttribute("offset",l*u+"%"),p.setAttribute("stop-color",t.color[l]),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}(),$l=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,h=this.treemap,l=t.target.id,u=[],c=this.treemap.highlightSettings,p=[],d=this.treemap.treeMapSelectionModule;if(l.indexOf("_Item_Index")>-1&&(!d||this.treemap.selectionId!==l)){if(this.highLightId!==l){o=document.getElementById(h.element.id+"_TreeMap_"+h.layoutType+"_Layout");var f=document.getElementsByClassName("treeMapSelection");r=this.treemap.layout.renderItems[parseFloat(l.split("_")[6])];var g=void 0;if(this.treemap.legendSettings.visible){var m=this.treemap.treeMapLegendModule.legendCollections;g=pe(this.treemap.treeMapLegendModule.legendCollections.length,r,h),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById("container_Legend_Shape_Index_"+g):document.getElementById("container_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&&(ce(this.shapeHighlightCollection,this.currentElement,h),this.highLightId=""):d&&this.shapeElement===d.shapeElement?this.currentElement.length>0&&this.currentElement[this.currentElement.length-1].currentElement!==this.shapeElement&&(ce(this.shapeHighlightCollection,this.currentElement,h),this.highLightId=""):(this.currentElement.push({currentElement:this.shapeElement}),he(this.shapeHighlightCollection),this.shapeHighlightCollection.push({legendEle:this.shapeElement,oldFill:m[g].legendFill,oldOpacity:m[g].opacity,oldBorderColor:m[g].borderColor,oldBorderWidth:m[g].borderWidth}),ue(this.shapeElement,c.fill,c.opacity,c.border.color,c.border.width.toString()),this.target="highlight")}if(a=Lt(r,[],c.mode,h),!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=h.layout.renderItems[s.id.split("_")[6]];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))}Qt(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",h);for(var v=0;v<p.length;v++)$t((s=p[v]).childNodes[0],{border:c.border,fill:c.fill,opacity:c.opacity}),s.classList.add("treeMapHighLight"),this.highLightId=l;i={cancel:!1,name:Hr,treemap:h,items:u,elements:p},h.trigger(Hr,i)}}}else if(l.indexOf("_Legend_Shape")>-1||l.indexOf("_Legend_Index")>-1){if(this.treemap.legendSettings.visible&&(!d||d.legendSelectId!==l)&&(!d||d.shapeSelectId!==l)){var w,S=void 0,P=void 0,C=document.getElementById(l);"highlight"===this.shapeTarget&&le(this.legendHighlightCollection),this.shapeTarget="highlight";g="Default"===this.treemap.legendSettings.mode?parseFloat(l.split("_")[4]):parseFloat(l.split("_")[3]);var x=this.treemap.treeMapLegendModule.legendCollections[g].legendData.length,O=(m=this.treemap.treeMapLegendModule.legendCollections,parseInt(l[l.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("container_Level_Index_"+P+"_Item_Index_"+S+"_RectPath");0===y&&(this.legendHighlightCollection=[],de(this.legendHighlightCollection,O,b,C,B,this.treemap.layout.renderItems,m),w=this.legendHighlightCollection.length,this.legendHighlightCollection[w-1].ShapeCollection={Elements:[]}),ue(C,c.fill,c.opacity,c.border.color,c.border.width.toString()),ue(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)&&Qt(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",h),"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)&&(he(this.shapeHighlightCollection),this.shapeHighlightCollection=[]),"highlight"===this.shapeTarget&&this.treemap.legendSettings.visible&&le(this.legendHighlightCollection),this.highLightId="",e=!1;return e},t.prototype.addEventListener=function(){this.treemap.isDestroyed||this.treemap.on(di.touchMoveEvent,this.mouseMove,this)},t.prototype.removeEventListener=function(){this.treemap.isDestroyed||this.treemap.off(di.touchMoveEvent,this.mouseMove)},t.prototype.getModuleName=function(){return"treeMapHighlight"},t.prototype.destroy=function(t){this.removeEventListener()},t}(),Zl=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,h=[],l=i.id,u=i.innerHTML,c=[],p=r.selectionSettings,d=this.treemap.treeMapHighlightModule,f=r.element.id+"_TreeMap_"+r.layoutType+"_Layout";if(l.indexOf("_Item_Index")>-1)if(t.preventDefault(),this.treemap.selectionId!==l&&this.legendSelect){o=document.getElementById(f),n=r.layout.renderItems[parseFloat(l.split("_")[6])];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,he(this.shapeSelectionCollection),d&&(d.shapeTarget="selection",d.shapeHighlightCollection=[]),g=pe(m,n,r),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById("container_Legend_Shape_Index_"+g):document.getElementById("container_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}),ue(this.shapeElement,p.fill,p.opacity,p.border.color,p.border.width.toString()))}a=Lt(n,[],p.mode,r);for(var b=0;b<o.childElementCount;b++)s=o.childNodes[b],n=r.layout.renderItems[s.id.split("_")[6]],a.indexOf(n.levelOrderName)>-1&&(c.push(s),r.levelSelection.push(s.id),h.push(n));Qt(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",r),this.treemap.selectionId=l;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"),$t(s.childNodes[0],{border:p.border,fill:p.fill,opacity:p.opacity}),s.classList.add("treeMapSelection");else $t(s.childNodes[0],{border:p.border,fill:p.fill,opacity:p.opacity}),s.classList.add("treeMapSelection");e={cancel:!1,name:_r,treemap:r,items:h,elements:c,text:u,contentItemTemplate:u},r.trigger(_r,e,function(t){t.contentItemTemplate!==u&&Pt(l,i,t.contentItemTemplate)})}}else he(this.shapeSelectionCollection),this.shapeSelectionCollection=[],this.shapeElement=void 0,this.shapeSelect=!0,this.shapeSelectId="",this.treemap.legendId=[],Qt(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",r),this.treemap.selectionId="";else if(l.indexOf("_Legend_Shape")>-1||l.indexOf("_Legend_Index")>-1){y=this.treemap.treeMapLegendModule.legendCollections;if(this.treemap.legendSettings.visible&&this.legendSelectId!==l&&this.shapeSelect){var P,C=void 0,x=void 0;this.legendSelectId=l,this.legendSelect=!1;var O=parseInt(l[l.length-1],10),B=document.getElementById(l);le(this.legendSelectionCollection),d&&(d.shapeTarget="selection");g="Default"===this.treemap.legendSettings.mode?parseFloat(l.split("_")[4]):parseFloat(l.split("_")[3]);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("container_Level_Index_"+x+"_Item_Index_"+C+"_RectPath");0===w&&(de(this.legendSelectionCollection,O,T,B,M,this.treemap.layout.renderItems,y),P=this.legendSelectionCollection.length,this.legendSelectionCollection[P-1].ShapeCollection={Elements:[]}),ue(B,p.fill,p.opacity,p.border.color,p.border.width.toString()),ue(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 le(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,h=[];this.treemap.levelSelection=[];for(var l=this.treemap.element.id+"_TreeMap_"+this.treemap.layoutType+"_Layout",u=document.getElementById(l),c=Lt(i,[],n.mode,this.treemap),p=0;p<u.childElementCount;p++)s=u.childNodes[p],i=this.treemap.layout.renderItems[s.id.split("_")[6]],c.indexOf(i.levelOrderName)>-1&&(o.push(s),this.treemap.levelSelection.push(s.id),h.push(i));if(this.treemap.legendSettings.visible)for(var d=0;d<h.length;d++){this.shapeSelect=!1;var f=this.treemap.treeMapLegendModule.legendCollections.length,g=this.treemap.treeMapLegendModule.legendCollections;this.shapeElement=void 0,he(this.shapeSelectionCollection),a=pe(f,h[d],this.treemap),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById("container_Legend_Shape_Index_"+a):document.getElementById("container_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}),ue(this.shapeElement,n.fill,n.opacity,n.border.color,n.border.width.toString()))}Qt(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"),$t(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,$t(s.childNodes[0],{border:n.border,fill:n.fill,opacity:n.opacity}),s.classList.add("treeMapSelection")}else he(this.shapeSelectionCollection),this.shapeElement=void 0,this.treemap.levelSelection=[],this.shapeSelect=!0,this.shapeSelectId="",this.treemap.legendId=[],Qt(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",this.treemap),this.treemap.selectionId=""},t.prototype.addEventListener=function(){this.treemap.isDestroyed||this.treemap.on(di.touchStartEvent,this.mouseDown,this)},t.prototype.removeEventListener=function(){this.treemap.isDestroyed||this.treemap.off(di.touchStartEvent,this.mouseDown)},t.prototype.getModuleName=function(){return"treeMapSelection"},t.prototype.destroy=function(t){this.removeEventListener()},t}(),tu=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},eu=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,h,l,u,p=r.id,d={},f={},g=[];p.indexOf("_Item_Index")>-1?c(d=this.treemap.layout.renderItems[parseFloat(p.split("_")[6])])||(d.name,a=d.weight,f=d.data,u=d.options.fill,g=this.treemap.enableRtl?[Zt(this.tooltipSettings.format,f,this.treemap)||te(a,this.treemap)+" : "+this.treemap.weightValuePath.toString()]:[Zt(this.tooltipSettings.format,f,this.treemap)||this.treemap.weightValuePath.toString()+" : "+te(a,this.treemap)],document.getElementById(this.tooltipId)?h=document.getElementById(this.tooltipId):(h=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(h)),(l=At(e,i,this.treemap.svgObject)).y=this.tooltipSettings.template?l.y+10:l.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:Wr,item:d,options:{location:l,text:g,data:f,textStyle:this.tooltipSettings.textStyle,template:this.tooltipSettings.template},treemap:this.treemap,element:r,eventArgs:t},this.treemap.trigger(Wr,o,function(t){s.addTooltip(o,u,h)})):(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=tu(t,["cancel"]).options}n?(this.removeTooltip(),this.treemap.clearTemplate()):(this.svgTooltip=new Fr({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.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(di.touchMoveEvent,this.renderTooltip,this),this.treemap.on(di.touchEndEvent,this.mouseUpHandler,this))},t.prototype.removeEventListener=function(){this.treemap.isDestroyed||(this.treemap.off(di.touchMoveEvent,this.renderTooltip),this.treemap.off(di.touchEndEvent,this.mouseUpHandler))},t.prototype.getModuleName=function(){return"treeMapTooltip"},t.prototype.destroy=function(t){this.removeEventListener()},t}(),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){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),nu=ru.h,ou=!nu,su=function(t){function e(){var e=t.call(this,arguments)||this;return e.hasInjectedModules=!1,e.hasChildDirective=!1,e.childDirObjects="",e}return iu(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);if(this.hasInjectedModules&&!ou&&s){for(var a=s[this.ej2Instances.getModuleName()]||[],h=0,l=this.ej2Instances.getInjectedModules()||[];h<l.length;h++){var u=l[h];-1===a.indexOf(u)&&a.push(u)}this.ej2Instances.injectedModules=a}}},e.prototype.mounted=function(){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=o("$vnode.context.$options.provide",this);if(e){var i=e;"function"==typeof e&&(i=this.$vnode.context.$options.provide()),t=i[this.ej2Instances.getModuleName()]||[]}return t},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){if(!this[0]||!this[0][1].slots.default)return;for(var i=this[0][1].slots.default(),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(),h=s.length>1&&a.indexOf(s[0])>-1?s[1]:s[0];h=h.replace(a,""),"splitter"==a&&"panes"==h?h="paneSettings":"bulletchart"==a&&"range"==h&&(h="ranges"),e[h]=o[n]}}else e=this.getDirectiveValues(this.$slots.default,this.tagMapper||{},this.tagNameMapper||{});this.childDirObjects||(this.childDirObjects=JSON.stringify(e));for(var l=0,u=Object.keys(e);l<u.length;l++){var c=u[l];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 h=0;h<Object.keys(i).length;h++)a=Object.keys(i)[h],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,h=r;a<h.length;a++){o(h[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,h=0,l=n=t.default?t.default():t;h<l.length;h++){s(l[h])}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 h=a[s],l=h.type.methods.getTag().replace("e-","");h.children&&(r=this.resolveMultilevelComplexInnerDirs(h.children,e[i],h.type.methods.getTag()),/[s]\b/.test(l)||n.length>1?/[s]\b/.test(l)?(o[l]=o[l]?o[l]:[],r.length?o[l]=r:o[l].push(r)):r&&o.push(r):o=r||o),n.length>1&&h.props&&o.length>=0?o.push(h.props):o=h.props?Object.assign(o,h.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 h=a[s],l=h.type.methods.getTag().replace("e-","");h.children&&(r=this.resolveComplexInnerDirs(h.children,e[i],h.type.methods.getTag())),/[s]\b/.test(l)?(o[l]=o[l]?o[l]:[],r.length?o[l]=r:o[l].push(r),h.props&&o[l].push(h.props)):(o=r,o=h.props?Object.assign(o,h.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 h=a.componentOptions.tag;if(-1!==r.indexOf(h)){var l=i[h]?i[h]:h;n[l.replace("e-","")]=[];for(var u=0,c=a.componentOptions.children;u<c.length;u++){var p=c[u],d=this.getVNodeValue(p,e[h],i);0!==Object.keys(d).length&&n[l.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,h=i[a]?i[a]:a;if(r[h.replace("e-","")]=[],s.componentOptions&&s.componentOptions.children)for(var l=0,u=s.componentOptions.children;l<u.length;l++){var c=u[l],p=this.getVNodeValue(c,e[a],i);0!==Object.keys(p).length&&r[h.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}((!ou||parseInt(ru.version),we)),au=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured"],hu=lt();ht({compile:function(t,e){var i=this;return"string"==typeof t?hu(t,e):function(e,r,n){var s=d("templateParentDiv"),a=d("templateDiv"),h=w("div",{id:s,innerHTML:'<div id="'+a+'"></div>'});document.body.appendChild(h);var l,c=t.call(i,{});if(r)if(nu){var p=c,f=o("template.propsData",c),g={data:{data:u(c.data||{},e)},parent:r.vueInstance};p.template||(p.template=p[Object.keys(p)[0]]);var m=void 0;m=p.template.extends?p.template.extends._context.components.template:p.template._context.components[t.name];var y;y=f?Object.assign(m.data(),f):Object.assign(m.data(),g.data),m.data=function(){return y},ru.createApp(m).mount("#"+a),l=h.childNodes,B(h)}else{var b=c.template;if(f=o("template.propsData",c),g={data:{data:u(c.data||{},e)},parent:r.vueInstance},f&&(b=c.template.extends,g.propsData=f),"function"!=typeof b&&(b=we.extend(b)),new b(g).$mount("#"+a),l=h.childNodes,r.vueInstance){var v=r.vueInstance.templateCollection;v||(r.vueInstance.templateCollection={},v=r.vueInstance.templateCollection),n&&(v[n]||(v[n]=[]),v[n].push(l[0]))}B(h)}return l||[]}}});var lu,uu,cu=!nu,pu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ut(e,t),e.prototype.render=function(){},e.prototype.getTag=function(){return"e-colorMappings"},e=ct([be({},cu)],e)}(lu=!cu||parseInt(ru.version)<3?i.Vue:we),du={name:"e-colorMappings",install:function(t){t.component(du.name,pu)}},fu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ut(e,t),e.prototype.render=function(){},e.prototype.getTag=function(){return"e-colorMapping"},e=ct([be({},cu)],e)}(lu),gu={name:"e-colorMapping",install:function(t){t.component(gu.name,fu)}},mu=!nu,yu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ut(e,t),e.prototype.render=function(){},e.prototype.getTag=function(){return"e-levels"},e=ct([be({},mu)],e)}(uu=!mu||parseInt(ru.version)<3?i.Vue:we),bu={name:"e-levels",install:function(t){t.component(bu.name,yu)}},vu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ut(e,t),e.prototype.render=function(){},e.prototype.getTag=function(){return"e-level"},e=ct([be({},mu)],e)}(uu),wu={name:"e-level",install:function(t){t.component(wu.name,vu)}},Su=["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"],Pu=[],Cu=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:Su})[1],xu=Object.keys(Cu);xu.push("modelchanged");for(var Ou=0,Bu=Pu;Ou<Bu.length;Ou++){var Lu=Bu[Ou];xu.push("update:"+Lu)}var Tu=!nu,Mu=function(t){function e(){var e=t.call(this,arguments)||this;return e.propKeys=Su,e.models=Pu,e.hasChildDirective=!0,e.hasInjectedModules=!0,e.tagMapper={"e-levels":{"e-level":{"e-colorMappings":"e-colorMapping"}}},e.tagNameMapper={"e-colorMappings":"e-colorMapping"},e.isVue3=!Tu,e.ej2Instances=new Jl({}),e.bindProperties(),e.ej2Instances._setProperties=e.ej2Instances.setProperties,e.ej2Instances.setProperties=e.setProperties,e.ej2Instances.clearTemplate=e.clearTemplate,e}return ut(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 h=a[s];o("__vue__.$destroy",h)&&h.__vue__.$destroy(),h.innerHTML&&(h.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=nu||t,i=null;return c(this.$slots.default)||(i=nu?this.$slots.default():this.$slots.default),e("div",i)},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=ct([be({props:Su},Tu)],e)}(su),Du={name:"ejs-treemap",install:function(t){t.component(Du.name,Mu),t.component(wu.name,vu),t.component(bu.name,yu),t.component(gu.name,fu),t.component(du.name,pu)}};Jl.Inject(eu,Ql,$l,Zl,Fn,ql,Vn);var ku=Object.freeze({ColorMappingsDirective:pu,ColorMappingDirective:fu,ColorMappingsPlugin:du,ColorMappingPlugin:gu,LevelsDirective:yu,LevelDirective:vu,LevelsPlugin:bu,LevelPlugin:wu,TreeMapComponent:Mu,TreeMapPlugin:Du,TreeMap:Jl,LevelsData:Xl,Border:$r,Margin:Zr,Font:tn,CommonTitleSettings:en,SubTitleSettings:rn,TitleSettings:nn,ColorMapping:on,LegendSettings:sn,InitialDrillSettings:an,LeafItemSettings:hn,TooltipSettings:ln,SelectionSettings:un,HighlightSettings:cn,LevelSettings:pn,load:"load",loaded:"loaded",beforePrint:Vr,itemRendering:zr,drillStart:Gr,drillEnd:"drillEnd",itemSelected:_r,itemHighlight:Hr,tooltipRendering:Wr,itemClick:"itemClick",itemMove:"itemMove",click:"click",doubleClick:Ur,rightClick:qr,mouseMove:"mouseMove",legendItemRendering:Kr,legendRendering:Yr,resize:"resize",defaultFont:Jr,get Theme(){return Di},getThemeStyle:me,Size:dn,stringToNumber:mt,Rect:fn,RectOption:gn,PathOption:mn,measureText:yt,TextOption:yn,textTrim:bt,Location:bn,findPosition:vt,createTextStyle:wt,renderTextElement:St,setItemTemplateContent:Pt,getElement:Ct,itemsToOrder:xt,isContainsData:Ot,findChildren:Bt,findHightLightItems:Lt,getTemplateFunction:Tt,convertElement:Mt,findLabelLocation:Dt,measureElement:kt,getArea:Et,getShortestEdge:jt,convertToContainer:It,convertToRect:Rt,getMousePosition:At,colorMap:Nt,deSaturationColor:Ft,colorCollections:Vt,rgbToHex:zt,getColorByValue:Gt,getGradientColor:_t,getPercentageColor:Ht,getPercentage:Wt,wordWrap:Ut,textWrap:qt,hide:Kt,orderByArea:Yt,maintainSelection:Jt,legendMaintain:Xt,removeClassNames:Qt,applyOptions:$t,textFormatter:Zt,formatValue:te,ColorValue:vn,convertToHexCode:ee,componentToHex:ie,convertHexToColor:re,colorNameToHex:ne,drawSymbol:oe,renderLegendShape:se,isParentItem:ae,TreeMapAjax:wn,removeShape:he,removeLegend:le,setColor:ue,removeSelectionWithHighlight:ce,getLegendIndex:pe,pushCollection:de,triggerDownload:fe,removeElement:ge,TreeMapLegend:Ql,LayoutPanel:Sn,TreeMapHighlight:$l,TreeMapSelection:Zl,TreeMapTooltip:eu,ImageExport:Vn,PdfExport:ql,Print:Fn});return t.base=Pr,t.treemap=ku,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,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+"_"+Pe++}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 Ce}function v(){if("undefined"!=typeof window){var t=new Uint16Array(5);return(window.msCrypto||window.crypto).getRandomValues(t)}}function w(t,e){var i=gi.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;fi.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(R(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 R(t,e){var i=t.matches||t.msMatchesSelector||t.webkitMatchesSelector;return i?i.call(t,e):-1!==[].indexOf.call(document.querySelectorAll(e),t)}function I(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 J(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&&fi.add(r,"mouseleave",$,{parent:this.parent,rippleOptions:this.rippleOptions})}}function X(t){Q(t,this)}function $(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&&fi.remove(o,"mouseleave",$),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,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(Xi,"").replace(sr,"'$1'").replace(lr,function(t,s,a,l){var h=s.match(rr);if(h){var u=h[1];if(Zi.test(s))s='";} '+s.replace(h[1],u.replace(or,function(t){return t=t.trim(),tt(t,!$i.test(t)&&-1===o.indexOf(t),e,o,r)}))+'{ \n str = str + "';else if(Qi.test(s))s='"; '+s.replace(h[1],u.replace(ar,function(t){return rt(t,e,o,r)}))+'{ \n str = str + "';else if(er.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+" < "+tt(c[1],!0,e,o,r)+".length; i"+n+"++"})+"{ \n "+c[0]+"= "+tt(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(dr.test(s)&&/\]\./gm.test(s)||/@|\$|#/gm.test(s)){/@|\$|#|\]\./gm.test(s)&&(s='"+ '+("global"===d?"":d)+s.replace(h[1],u.replace(pr,function(t){return rt(t,e,o,r)}))+'+ "')}else s='" + '+("global"===d?"":d)+s.replace(u,tt(h[1].replace(/,( |)data.|,/gi,","+e+".").replace(/,( |)data.window/gi,",window"),"global"!==d,e,o,r))+'+"'}}else tr.test(s)?s='"; '+s.replace(tr,'} else { \n str = str + "'):s.match(ir)?s=s.replace(ir,'"; \n } \n str = str + "'):/@|#|\$/gm.test(s)?(s.match(ur)&&(s=it(s)),s='"+'+et(s,-1===o.indexOf(s),e,o)+'"]+"'):s=s.match(ur)?'"+'+et(s=it(s),-1===o.indexOf(s),e,o)+'"]+"':'"+'+tt(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 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 }\n return str;";return new Function("data",r).bind(e)}function tt(t,e,i,r,n){return!e||nr.test(t)||-1!==r.indexOf(t.split(".")[0])||n?t:i+"."+t}function et(t,e,i,r){return e&&!nr.test(t)&&-1===r.indexOf(t.split(".")[0])?i+'["'+t:t}function it(t){return t=t.match(cr)?t:t.replace(ur,"\\\\")}function rt(t,e,i,r){t=t.trim();if(/\window\./gm.test(t))return t;var n=/'|"/gm;return/@|\$|#/gm.test(t)&&(t=et(t,-1===i.indexOf(t),e,i)+'"]'),hr.test(t)?function(t,e,i,r){return!e||nr.test(t)||-1!==r.indexOf(t.split(".")[0])||/^\..*/gm.test(t)?t:i+"."+t}(t,!n.test(t)&&-1===i.indexOf(t),e,i):tt(t,!n.test(t)&&-1===i.indexOf(t),e,i,r)}function nt(){return"-"+Math.random().toString(36).substr(2,5)}function ot(t,e,i){var r=yr.compile(t,e,i);return function(t,e,i,n,o,s,a){var l=r(t,e,i,a),h="BlazorTemplateId";if(b()&&!o){var u=n+nt();if(mr[n]||(mr[n]=[]),c(s))t[h]=u,mr[n].push(t);else for(var p=0,d=Object.keys(mr[n][s]);p<d.length;p++){var f=d[p];f!==h&&t[f]&&(mr[n][s][f]=t[f]),f===h&&(u=mr[n][s][f])}return"rowTemplate"===i?[w("tr",{id:u,className:"e-blazor-template"})]:[w("div",{id:u,className:"e-blazor-template"})]}if("string"==typeof l){if(gr.test(l)){return w("svg",{innerHTML:l}).childNodes}return w(fr.test(l)?"table":"div",{innerHTML:l}).childNodes}return l}}function st(t,e,i,r,n){if(b()){window.sfBlazor.updateTemplate(e,mr[t],t,i,n),!1!==r&&(mr[t]=[])}}function at(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 lt(t){yr.compile=t.compile}function ht(){return yr.compile}function ut(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 ct(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 pt(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 Or(r.clientWidth,r.clientHeight)}function dt(t){return document.getElementById(t)}function ft(t){var e=dt(t);e&&L(e)}function gt(t,e,i,r,n,o){var s=new Cr(""),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 mt(t,e){return null!==t&&void 0!==t?-1!==t.indexOf("%")?e/100*parseInt(t,10):parseInt(t,10):null}function yt(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 dn(i.clientWidth,i.clientHeight)}function bt(t,e,i){var r=e,n=yt(e,i).width;if(n>t)for(var o=e.length-1;o>=0;--o)if(r=e.substring(0,o)+"...",(n=yt(r,i).width)<=t||r.length<4)return r.length<4&&(r=" "),r;return r}function vt(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 bn(n,o)}function wt(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 St(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 Cr("");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=wt(u,l,f),d%2==0&&0!==d){f=f.replace(/\s+/g,"&nbsp")}var g=yt(f,e);l.x=0!==d?l.x+g.width:l.x+g.width+5,r.appendChild(a)}else a=wt(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=yt(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 Pt(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 Ct(t){return document.getElementById(t)}function xt(t,e){return t.weight===e.weight?0:t.weight<e.weight?1:-1}function Ot(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 Bt(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 Lt(t,e,i,r){if("Child"===i){e.push(t.levelOrderName);var n=Bt(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++)Lt(n[s],e,i,r)}}else if("Parent"===i)"string"==typeof t.levelOrderName&&-1===e.indexOf(t.levelOrderName)&&(e.push(t.levelOrderName),Lt(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 Tt(t){var e=null;try{document.querySelectorAll(t).length&&(e=ot(document.querySelector(t).innerHTML.trim()))}catch(i){e=ot(t)}return e}function Mt(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 Dt(t,e,i,r,n){var o=new bn(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 kt(t,e){var i=new dn(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 Et(t){return(t.width-t.x)*(t.height-t.y)}function jt(t){var e=Rt(t),i=e.width,r=e.height;return Math.min(i,r)}function Rt(t){var e=t.x,i=t.y;return{x:e,y:i,width:t.width-e,height:t.height-i}}function It(t){var e=t.x,i=t.y;return{x:e,y:i,width:e+t.width,height:i+t.height}}function At(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 bn(t-l,e-h)}function Nt(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]:Vt(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]:Vt(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=Ft(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 Ft(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 Vt(t,e){return Gt(t,e)}function zt(t,e,i){return"#"+ie(t)+ie(e)+ie(i)}function Gt(t,e){var i;return Number(e)===t.from?t.color[0]:Number(e)===t.to?t.color[t.color.length-1]:zt((i=_t(Number(e),t)).r,i.g,i.b)}function _t(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]:ne(e.color[0]),a="#"===e.color[e.color.length-1].charAt(0)?e.color[e.color.length-1]:ne(e.color[e.color.length-1]);else{s="#"===e.color[0].charAt(0)?e.color[0]:ne(e.color[0]),a="#"===e.color[e.color.length-1].charAt(0)?e.color[e.color.length-1]:ne(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:ne(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:ne(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:ne(u[d].color),a="#"===u[d+1].color.charAt(0)?u[d+1].color:ne(u[d+1].color),n=Math.abs(t-u[d+1].b)/l)}return Ht(n,s,a)}function Ht(t,e,i){var r=i.split("#")[1],n=e.split("#")[1],o=Wt(t,parseInt(n.substr(0,2),16),parseInt(r.substr(0,2),16)),s=Wt(t,parseInt(n.substr(2,2),16),parseInt(r.substr(2,2),16)),a=Wt(t,parseInt(n.substr(4,2),16),parseInt(r.substr(4,2),16));return new vn(o,s,a)}function Wt(t,e,i){var r=i-e;return Math.round(e+r*t)}function Ut(t,e,i){for(var r,n=e.split(" "),o="",s=[],a=0,l=n.length;a<l;a++)r=n[a],yt(o.concat(r),i).width<t?o=o.concat((""===o?"":" ")+r):""!==o?(s.push(bt(t,o,i)),o=r):(s.push(bt(t,r,i)),r=""),o&&a===l-1&&s.push(bt(t,o,i));return s}function qt(t,e,i){var r=[],n=0,o=yt(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=yt(l,i).width)<=t){if(r.push(l),n+=l.length,s===n)return r;a=s+1}}return r}function Kt(t,e,i,r){var n=yt(i,r);return n.width>t||n.height>e?" ":i}function Yt(t,e){return t.itemArea===e.itemArea?0:t.itemArea<e.itemArea?1:-1}function Jt(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),Qt(e.childNodes[0],{border:t.selectionSettings.border,fill:t.selectionSettings.fill,opacity:t.selectionSettings.opacity})):e.setAttribute("class","")}function Xt(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 $t(t,e,i){for(var r,n=0;n<t.length;n++)Qt(r=c(t[n].childNodes[0])?t[n]:t[n].childNodes[0],i.layout.renderItems[r.id.split("_")[6]].options),t[n].classList.remove(e),n-=1}function Qt(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 Zt(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(te(e[o],i).toString())}return t}function te(t,e){return(e.format&&!isNaN(Number(t))?e.intl.getNumberFormat({format:e.format,useGrouping:e.useGroupingSeparator})(Number(t)):t)||""}function ee(t){return"#"+ie(t.r)+ie(t.g)+ie(t.b)}function ie(t){var e=t.toString(16);return 1===e.length?"0"+e:e}function re(t){var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?new vn(parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)):new vn(255,255,255)}function ne(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 ee(new vn(parseInt(i[3],10),parseInt(i[4],10),parseInt(i[5],10)))}function oe(t,e,i,r,n,o){var s=new Cr(""),a=se(t,i,e,n,r),l=s["draw"+a.functionName](a.renderOption);return l.setAttribute("aria-label",o),l}function se(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 ae(t,e){for(var i=!1,r=0;r<t.length;r++)if(e.levelOrderName===t[r].levelOrderName){i=!0;break}return i}function le(t,e){if(t.length>0)for(var i=0;i<t.length;i++){var r=t[i];ue(r.legendEle,r.oldFill,r.oldOpacity,r.oldBorderColor,r.oldBorderWidth)}}function he(t,e){if(t.length>0)for(var i=0;i<t.length;i++){var r=t[i];ue(r.legendEle,r.oldFill,r.oldOpacity,r.oldBorderColor,r.oldBorderWidth);for(var n=r.ShapeCollection.Elements.length,o=0;o<n;o++)ue(r.ShapeCollection.Elements[o],r.shapeOldFill,r.shapeOldOpacity,r.shapeOldBorderColor,r.shapeOldBorderWidth)}}function ue(t,e,i,r,n){t.setAttribute("fill",e),t.setAttribute("opacity",i),t.setAttribute("stroke",r),t.setAttribute("stroke-width",n)}function ce(t,e,i){le(t),$t(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",i)}function pe(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 de(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 fe(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 ge(t){var e=document.getElementById(t);return e?L(e):null}function me(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"fluentui":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"fluentuidark":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 ye(t,e){if(null===t||void 0===t)throw new Error("ArgumentException: "+e+" cannot be null or undefined")}function be(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(au.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(su.prototype).forEach(function(t){au.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 we?l.constructor:we).extend(e)}(e,t)}}window.process={env:{NODE_ENV:"production"}};var ve,we=e.default,Se="ej2_instances",Pe=0,Ce=!1,xe={latn:{_digits:"0123456789",_type:"numeric"}},Oe={decimal:".",group:",",percentSign:"%",plusSign:"+",minusSign:"-",infinity:"∞",nan:"NaN",exponential:"E"},Be=[0,1,2,3,4,5,6,7,8,9],Le=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(Oe);i<r.length;i++){var n=r[i];e[t[n]]=Oe[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,Be),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=Be;a<l.length;a++){var h=l[a];r.mapper[h]=s[h]}}return r},t.nPair="numericPair",t.nRegex="numericRegex",t.numberingSystems=xe,t}(),Te={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)}}(ve||(ve={}));var Me,De=/\/MMMMM|MMMM|MMM|a|LLLL|LLL|EEEEE|EEEE|E|K|cccc|ccc|WW|W|G+|z+/gi,ke=["sun","mon","tue","wed","thu","fri","sat"],Ee={m:"getMinutes",h:"getHours",H:"getHours",s:"getSeconds",d:"getDate",f:"getMilliseconds"},je={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"},Re=function(){function t(){}return t.dateFormat=function(t,e,i){var r=this,n=Me.getDependables(i,t,e.calendar),s=o("parserObject.numbers",n),a=n.dateObject,l={isIslamic:Me.islamicRegex.test(e.calendar)};b()&&e.isServerRendered&&(e=Me.compareBlazorDateFormats(e,t));var h=e.format||Me.getResultantPattern(e.skeleton,n.dateObject,e.type,!1,b()?t:"");if(l.dateSeperator=b()?o("dateSeperator",a):Me.getDateSeparator(n.dateObject),p(h))m("Format options or type given must be invalid");else{h=Me.ConvertDateToWeekFormat(h),b()&&(h=h.replace(/tt/,"a")),l.pattern=h,l.numMapper=b()?u({},s):Le.getNumberMapper(n.parserObject,Le.getNumberingSystem(i));for(var c=0,d=h.match(De)||[];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."+Me.monthIndex[g],a):l.weekday=n.dateObject[Me.days]["stand-alone"][Me.monthIndex[g]];break;case"M":case"L":b()?l.month=o("months."+Me.monthIndex[g],a):l.month=n.dateObject[Me.month]["stand-alone"][Me.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(Me.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[ke[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[Ee[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[Ee[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=Me.getWeekOfYear(t);break;default:i+=a}d&&(f=!0,g=this.checkTwodigitNumber(u,l)),f&&(i+=Le.convertValueParts(g,Me.latnParseRegex,e.numMapper.mapper))}return i},t.getCurrentDateValue=function(t,e){return e?ve.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}(),Ie={ms:"minimumSignificantDigits",ls:"maximumSignificantDigits",mf:"minimumFractionDigits",lf:"maximumFractionDigits"},Ae=["infinity","nan","group","decimal","exponential"],Ne=function(){function t(){}return t.numberFormatter=function(t,e,i){var r,n=this,s=u({},e),a={},l={},h=Me.getDependables(i,t,"",!0),c=h.numericObject;l.numberMapper=b()?u({},c):Le.getNumberMapper(h.parserObject,Le.getNumberingSystem(i),!0),l.currencySymbol=b()?o("currencySymbol",c):Me.getCurrencySymbol(h.numericObject,s.currency||Xe,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&&!Me.formatRegex.test(e.format))a=Me.customFormat(e.format,l,h.numericObject);else{if(u(s,Me.getProperNumericSkeleton(e.format||"N")),s.isCurrency="currency"===s.type,s.isPercent="percent"===s.type,b()||(r=Me.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,Me.defaultCurrency)),b())a.nData=u({},{},o(s.type+"nData",c)),a.pData=u({},{},o(s.type+"pData",c)),"currency"===s.type&&e.currency&&Me.replaceBlazorCurrency([a.pData,a.nData],l.currencySymbol,e.currency);else{var f=r.split(";");a.nData=Me.getFormatData(f[1]||"-"+f[0],!0,l.currencySymbol),a.pData=Me.getFormatData(f[0],!1,l.currencySymbol),s.useGrouping&&(s.groupSeparator=d[Ae[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[Ae[1]]:isFinite(t)?n.intNumberFormatter(t,a,l):d[Ae[0]]}},t.getGroupingDetails=function(t){var e={},i=t.match(Me.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=Ie["l"+n],a=Ie["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[Ae[4]])),n=n.replace(".",i.numberMapper.numberSymbols[Ae[3]]),r.useGrouping&&(n=this.groupNumbers(n,r.groupData.primary,r.groupSeparator||",",i.numberMapper.numberSymbols[Ae[3]]||".",r.groupData.secondary)),n=Le.convertValueParts(n,Me.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}(),Fe=/^[0-9]*$/,Ve={minute:"setMinutes",hour:"setHours",second:"setSeconds",day:"setDate",month:"setMonth",milliseconds:"setMilliseconds"},ze=function(){function t(){}return t.dateParser=function(t,e,i){var r=this,n=Me.getDependables(i,t,e.calendar),s=Le.getCurrentNumericOptions(n.parserObject,Le.getNumberingSystem(i),!1,b()),a={};b()&&e.isServerRendered&&(e=Me.compareBlazorDateFormats(e,t));var l,h=e.format||Me.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=Me.ConvertDateToWeekFormat(h),a={isIslamic:Me.islamicRegex.test(e.calendar),pattern:h,evalposition:{},culture:t};for(var d=h.match(Me.dateParseRegex)||[],f=d.length,g=0,y=0,v=!1,w=s.numericRegex,S=b()?n.parserObject.numbers:Le.getNumberMapper(n.parserObject,Le.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=je[O],M=2===x?"":"?";switch(v&&(g=y,v=!1),O){case"E":case"c":var D=void 0;D=b()?o("days."+Me.monthIndex[x],n.dateObject):n.dateObject[Me.days]["stand-alone"][Me.monthIndex[x]];var k=Le.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."+Me.monthIndex[x],n.dateObject):n.dateObject.months["stand-alone"][Me.monthIndex[x]],a[T]=Le.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]=Le.reverseObject(j),u+="("+Object.keys(a[T]).join("|")+")";break;case"G":L=!0;var R=x<=3?"eraAbbr":4===x?"eraNames":"eraNarrow";a[T]=Le.reverseObject(b()?o("eras",n.dateObject):o("eras."+R,n.dateObject)),u+="("+Object.keys(a[T]).join("|")+"?)";break;case"z":L=0!==(new Date).getTimezoneOffset(),a[T]=o("dates.timeZoneNames",n.parserObject);var I=a[T],A=(l=x<4)?"+H;-H":I.hourFormat;A=A.replace(/:/g,S.timeSeparator),u+="("+this.parseTimeZoneRegx(A,I,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=ve.getHijriDate(new Date)),u&&(n=parseInt((i.year+"").slice(0,2)+h,10));var p=ve.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[Ve[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[Ve[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=Le.convertValueParts(t,e.numberParseRegex,e.numericPair),Fe.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}(),Ge=/^([^0-9]*)(([0-9,]*[0-9]+)(\.[0-9]+)?)([Ee][+-]?[0-9]+)?([^0-9]*)$/,_e=/,/g,He=["minusSign","infinity"],We=function(){function t(){}return t.numberParser=function(t,e,i){var r,n=this,s=Me.getDependables(i,t,"",!0),a={custom:!0};Me.formatRegex.test(e.format)||!e.format?(u(a,Me.getProperNumericSkeleton(e.format||"N")),a.custom=!1,a.fractionDigits||e.maximumFractionDigits&&(a.maximumFractionDigits=e.maximumFractionDigits)):u(a,Me.customFormat(e.format,null,null));var l=o("numbers",s.parserObject);r=Le.getCurrentNumericOptions(s.parserObject,Le.getNumberingSystem(i),!0,b()),a.symbolRegex=Le.getSymbolRegex(Object.keys(r.symbolMatch)),a.infinity=r.symbolNumberSystem[He[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&&Me.replaceBlazorCurrency([a.pData,a.nData],o("currencySymbol",l),e.currency);else if(h=Me.getSymbolPattern(a.type,r.numberSystem,s.numericObject,a.isAccount)){var c=(h=h.replace(/\u00A4/g,Me.defaultCurrency)).split(";");a.nData=Me.getFormatData(c[1]||"-"+c[0],!0,""),a.pData=Me.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=Le.convertValueParts(t,e.symbolRegex,i.symbolMatch),0===(t=-1!==(t=Le.convertValueParts(t,i.numberParseRegex,i.numericPair)).indexOf("-")?t.replace("-.","-0."):t).indexOf(".")&&(t="0"+t);var h=t.match(Ge);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}(),Ue=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}(),qe=new Ue,Ke=!1,Ye={},Je="en-US",Xe="USD",$e=["numericObject","dateObject"],Qe=function(){function t(t){t&&(this.culture=t)}return t.prototype.getDateFormat=function(t){return Re.dateFormat(this.getCulture(),t||{type:"date",skeleton:"short"},Ye)},t.prototype.getNumberFormat=function(t){return t&&!t.currency&&(t.currency=Xe),b()&&t&&!t.format&&(t.minimumFractionDigits=0),Ne.numberFormatter(this.getCulture(),t||{},Ye)},t.prototype.getDateParser=function(t){return ze.dateParser(this.getCulture(),t||{skeleton:"short",type:"date"},Ye)},t.prototype.getNumberParser=function(t){return b()&&t&&!t.format&&(t.minimumFractionDigits=0),We.numberParser(this.getCulture(),t||{format:"N"},Ye)},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 Me.getActualDateTimeFormat(this.getCulture(),t,Ye,e)},t.prototype.getNumberPattern=function(t,e){return Me.getActualNumberFormat(this.getCulture(),t,Ye,e)},t.prototype.getFirstDayOfWeek=function(){return Me.getWeekData(this.getCulture(),Ye)},t.prototype.getCulture=function(){return this.culture||Je},t}(),Ze={"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=Le.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,Ze);return r||(r=o("en-US."+i,Ze)),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];o.useGrouping=-1!==a.indexOf(","),a=a.replace(/,/g,"");var l=s[7];if(-1!==a.indexOf("0")&&(o.minimumIntegerDigits=a.length-a.indexOf("0")),c(l)||(o.minimumFractionDigits=l.lastIndexOf("0"),o.maximumFractionDigits=l.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 h=r(o.type,i.numberMapper.numberSystem,n,!1);o.useGrouping&&(o.groupSeparator=i.numberMapper.numberSymbols[S[2]],o.groupData=Ne.getGroupingDetails(h.split(";")[0])),o.nlead=o.nlead.replace(/'/g,""),o.nend=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#]*)?)|([#,]*@+#*))(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(/[d‏M‏]([^d‏M])[d‏M‏]/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=Le.getNumberMapper(l.parserObject,Le.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=Re.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):Le.getNumberMapper(p.parserObject,Le.getNumberingSystem(s),!0);var x=b()?o("currencySymbol",p.numericObject):d(p.numericObject,n.currency||Xe,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||"",Te)}(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}}(Me||(Me={}));var ti=/^(.*?):[ \t]*([^\r\n]*)$/gm,ei="GET",ii=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():ei,this.mode=!!c(i)||i):"object"==typeof t&&(this.options=t,h(this,this.options)),this.type=this.type?this.type.toUpperCase():ei,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=ti.exec(this.httpRequest.getAllResponseHeaders());r;)e[r[1].toLowerCase()]=r[2],r=ti.exec(this.httpRequest.getAllResponseHeaders());return i=e[t.toLowerCase()],c(i)?null:i},t}(),ri=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i,ni=/msie|trident/i,oi=/Trident\/7\./,si=/(ipad|iphone|ipod touch)/i,ai=/(ipad|iphone|ipod touch);.*os 7_\d|(ipad|iphone|ipod touch);.*os 8_\d/i,li=/android/i,hi=/trident|windows phone|edge/i,ui=/(version)[ /]([\w.]+)/i,ci={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 pi,di=function(){function t(){}return t.extractBrowserDetail=function(){for(var e={culture:{}},i=[],r=0,n=Object.keys(ci);r<n.length;r++){var o=n[r];if(i=t.userAgent.match(ci[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(oi)){e.name="msie";break}var s=t.userAgent.match(ui);"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 void 0===r[e]?r[e]=i.test(t.userAgent):("MacIntel"===navigator.platform&&navigator.maxTouchPoints>1&&!0===t.isTouch&&(r.isIos=!0,r.isDevice=!0,r.isTouch=!0,r.isPointer=!0),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",ni)},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",ri)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isIos",{get:function(){return t.getValue("isIos",si)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isIos7",{get:function(){return t.getValue("isIos7",ai)},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isAndroid",{get:function(){return t.getValue("isAndroid",li)},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",hi)},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}(),fi=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}),di.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}(),gi=/^svg|^path|^g/,mi=new RegExp("]"),yi=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 Ue(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(mi.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}(),bi=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)}}(),vi=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=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}bi(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 vi([G("FadeIn")],e.prototype,"name",void 0),vi([G(400)],e.prototype,"duration",void 0),vi([G("ease")],e.prototype,"timingFunction",void 0),vi([G(0)],e.prototype,"delay",void 0),vi([W()],e.prototype,"progress",void 0),vi([W()],e.prototype,"begin",void 0),vi([W()],e.prototype,"end",void 0),vi([W()],e.prototype,"fail",void 0),e=i=vi([U],e)}(yi),Si=!1,Pi=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}(),Ci=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",yi),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}(),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)}}(),Oi=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},Bi=0,Li=0,Ti=!1,Mi=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:Ke},!0),c(r.locale)&&r.setProperties({locale:Je},!0),r.moduleLoader=new Pi(r),r.localObserver=new Ue(r),qe.on("notifyExternalChange",r.detectFunction,r,r.randomId),p(i)||r.appendTo(),r}return xi(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(),qe.off("notifyExternalChange",this.detectFunction,this.randomId)))},e.prototype.refresh=function(){this.refreshing=!0,this.moduleLoader.clean(),this.destroy(),this.clearChanges(),this.localObserver=new Ue(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 Ti?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=Ti?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||(Ti?window.localStorage.setItem(this.getModuleName()+this.element.id+this.ej2StatePersistenceVersion,this.getPersistData()):window.localStorage.setItem(this.getModuleName()+this.element.id,this.getPersistData()))},e.prototype.appendReactElement=function(t,e){},e.prototype.renderReactTemplates=function(){},e.prototype.clearTemplate=function(t,e){},e.prototype.getUniqueID=function(t){return this.isHistoryChanged()&&(Bi=0),pi=this.pageID(location.href),Li=history.length,t+"_"+pi+"_"+Bi++},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 pi!==this.pageID(location.href)||Li!==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 Ci?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},Oi([G(!1)],e.prototype,"enablePersistence",void 0),Oi([G()],e.prototype,"enableRtl",void 0),Oi([G()],e.prototype,"locale",void 0),e=Oi([U],e)}(yi);"undefined"!=typeof window&&window.addEventListener("popstate",function(){Bi=0});var Di,ki=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)}}(),Ei=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={left:0,top:0,bottom:0,right:0},Ri={isDragged:!1},Ii=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ki(e,t),Ei([G(0)],e.prototype,"left",void 0),Ei([G(0)],e.prototype,"top",void 0),e}(Ci),Ai=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}ki(e,t),i=e,e.prototype.bind=function(){this.toggleEvents(),di.isIE&&S([this.element],"e-block-touch"),this.droppables[this.scope]={}},e.getDefaultPosition=function(){return u({},ji)},e.prototype.toggleEvents=function(t){var e;p(this.handle)||(e=M(this.handle,this.element));var i=this.enableTapHold&&di.isDevice&&di.isTouch?this.mobileInitialize:this.initialize;t?fi.remove(e||this.element,di.touchStartEvent,i):fi.add(e||this.element,di.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),fi.add(document,di.touchMoveEvent,this.removeTapholdTimer,this),fi.add(document,di.touchEndEvent,this.removeTapholdTimer,this)},e.prototype.removeTapholdTimer=function(){clearTimeout(this.tapHoldTimer),fi.remove(document,di.touchMoveEvent,this.removeTapholdTimer),fi.remove(document,di.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):(fi.add(document,di.touchMoveEvent,this.intDragStart,this),fi.add(document,di.touchEndEvent,this.intDestroy,this)),this.toggleEvents(!0),"touchstart"!==t.type&&this.isPreventSelect&&document.body.classList.add("e-prevent-select"),this.externalInitialize=!1,fi.trigger(document.documentElement,di.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})),fi.remove(document,di.touchMoveEvent,this.intDragStart),fi.remove(document,di.touchEndEvent,this.intDestroy),b()||this.bindDragEvents(u)}}},e.prototype.bindDragEvents=function(t){x(t)?(fi.add(document,di.touchMoveEvent,this.intDrag,this),fi.add(document,di.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){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"),fi.remove(document,di.touchMoveEvent,this.intDragStart),fi.remove(document,di.touchEndEvent,this.intDragStop),fi.remove(document,di.touchEndEvent,this.intDestroy),fi.remove(document,di.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&&(Ri.isDragged=!Ri.isDragged),Ri.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 Ei([_({},Ii)],e.prototype,"cursorAt",void 0),Ei([G(!0)],e.prototype,"clone",void 0),Ei([G()],e.prototype,"dragArea",void 0),Ei([G()],e.prototype,"isDragScroll",void 0),Ei([G()],e.prototype,"isReplaceDragEle",void 0),Ei([G(!0)],e.prototype,"isPreventSelect",void 0),Ei([W()],e.prototype,"drag",void 0),Ei([W()],e.prototype,"dragStart",void 0),Ei([W()],e.prototype,"dragStop",void 0),Ei([G(1)],e.prototype,"distance",void 0),Ei([G()],e.prototype,"handle",void 0),Ei([G()],e.prototype,"abort",void 0),Ei([G()],e.prototype,"helper",void 0),Ei([G("default")],e.prototype,"scope",void 0),Ei([G("")],e.prototype,"dragTarget",void 0),Ei([G()],e.prototype,"axis",void 0),Ei([G()],e.prototype,"queryPositionInfo",void 0),Ei([G(!1)],e.prototype,"enableTailMode",void 0),Ei([G(!1)],e.prototype,"skipDistanceCheck",void 0),Ei([G(!0)],e.prototype,"preventDefault",void 0),Ei([G(!1)],e.prototype,"enableAutoScroll",void 0),Ei([G(!1)],e.prototype,"enableTapHold",void 0),Ei([G(750)],e.prototype,"tapHoldThreshold",void 0),Ei([G(!1)],e.prototype,"enableScrollHandler",void 0),e=i=Ei([U],e)}(yi),Ni=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)}}(),Fi=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},Vi=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 Ni(e,t),e.prototype.bind=function(){this.wireEvents()},e.prototype.wireEvents=function(){fi.add(this.element,di.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=R(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(){fi.remove(this.element,di.touchEndEvent,this.intDrop),t.prototype.destroy.call(this)},Fi([G()],e.prototype,"accept",void 0),Fi([G("default")],e.prototype,"scope",void 0),Fi([W()],e.prototype,"drop",void 0),Fi([W()],e.prototype,"over",void 0),Fi([W()],e.prototype,"out",void 0),e=Fi([U],e)}(yi),zi=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)}}(),Gi=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},_i={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},Hi=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}zi(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 _i[t]||t.toUpperCase().charCodeAt(0)};var i;return e.configCache={},Gi([G({})],e.prototype,"keyConfigs",void 0),Gi([G("keyup")],e.prototype,"eventName",void 0),Gi([W()],e.prototype,"keyAction",void 0),e=i=Gi([U],e)}(yi),Wi=function(){function t(t,e,i){this.controlName=t,this.localeStrings=e,this.setLocale(i||Je)}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}(),Ui=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},Ki=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ui(e,t),qi([G(50)],e.prototype,"swipeThresholdDistance",void 0),e}(Ci),Yi=/(Up|Down)/,Ji=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),fi.add(r.element,di.touchMoveEvent,r.moveEvent,r),fi.add(r.element,di.touchEndEvent,r.endEvent,r),fi.add(r.element,di.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),fi.remove(r.element,di.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=Yi.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(),fi.remove(r.element,di.touchMoveEvent,r.moveEvent),fi.remove(r.element,di.touchEndEvent,r.endEvent),fi.remove(r.element,di.touchCancelEvent,r.cancelEvent)},r.bind(),r}return Ui(e,t),e.prototype.onPropertyChanged=function(t,e){},e.prototype.bind=function(){this.wireEvents(),di.isIE&&this.element.classList.add("e-block-touch")},e.prototype.destroy=function(){this.unwireEvents(),t.prototype.destroy.call(this)},e.prototype.wireEvents=function(){fi.add(this.element,di.touchStartEvent,this.startEvent,this)},e.prototype.unwireEvents=function(){fi.remove(this.element,di.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;fi.remove(this.element,di.touchMoveEvent,this.moveEvent),fi.remove(this.element,di.touchEndEvent,this.endEvent),e={originalEvent:t},this.trigger("tapHold",e),fi.remove(this.element,di.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},qi([W()],e.prototype,"tap",void 0),qi([W()],e.prototype,"tapHold",void 0),qi([W()],e.prototype,"swipe",void 0),qi([W()],e.prototype,"scroll",void 0),qi([G(350)],e.prototype,"tapThreshold",void 0),qi([G(750)],e.prototype,"tapHoldThreshold",void 0),qi([_({},Ki)],e.prototype,"swipeSettings",void 0),e=qi([U],e)}(yi),Xi=new RegExp("\\n|\\r|\\s\\s+","g"),$i=new RegExp(/'|"/g),Qi=new RegExp("if ?\\("),Zi=new RegExp("else if ?\\("),tr=new RegExp("else"),er=new RegExp("for ?\\("),ir=new RegExp("(/if|/for)"),rr=new RegExp("\\((.*)\\)",""),nr=new RegExp("^[0-9]+$","g"),or=new RegExp("[\\w\"'.\\s+]+","g"),sr=new RegExp('"(.*?)"',"g"),ar=new RegExp("[\\w\"'@#$.\\s-+]+","g"),lr=new RegExp("\\${([^}]*)}","g"),hr=/^\..*/gm,ur=/\\/gi,cr=/\\\\/gi,pr=new RegExp("[\\w\"'@#$.\\s+]+","g"),dr=/\window\./gm,fr=/^[\n\r.]+<tr|^<tr/,gr=/^[\n\r.]+<svg|^<path|^<g/,mr={},yr={compile:(new(function(){function t(){}return t.prototype.compile=function(t,e,i){return void 0===e&&(e={}),Z(t,e)},t}())).compile},br=["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"]'],vr=[{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"]'}],wr=["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"],Sr=function(){function t(){}return t.beforeSanitize=function(){return{selectors:{tags:br,attributes:vr}}},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},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("["+wr.join("],[")+"]");t.length>0&&t.forEach(function(t){wr.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}(),Pr=Object.freeze({blazorCultureFormats:Ze,get IntlBase(){return Me},Ajax:ii,Animation:wi,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&&!Si?function(){}:(t.setAttribute("data-ripple","true"),fi.add(t,"mousedown",J,{parent:t,rippleOptions:r}),fi.add(t,"mouseup",X,{parent:t,rippleOptions:r,done:i}),fi.add(t,"mouseleave",$,{parent:t,rippleOptions:r}),di.isPointer&&fi.add(t,"transitionend",$,{parent:t,rippleOptions:r}),function(){t.removeAttribute("data-ripple"),fi.remove(t,"mousedown",J),fi.remove(t,"mouseup",X),fi.remove(t,"mouseleave",$),fi.remove(t,"transitionend",$)})},get isRippleEnabled(){return Si},enableRipple:function(t){return Si=t},Base:yi,getComponent:I,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=I(e[i],r);p(n)||n.destroy()}},Browser:di,get versionBasedStatePersistence(){return Ti},enableVersionBasedPersistence:function(t){Ti=t},Component:Mi,ChildProperty:Ci,Position:Ii,Draggable:Ai,Droppable:Vi,EventHandler:fi,onIntlChange:qe,get rightToLeft(){return Ke},cldrData:Ye,get defaultCulture(){return Je},get defaultCurrencyCode(){return Xe},Internationalization:Qe,setCulture:function(t){Je=t,qe.notify("notifyExternalChange",{locale:Je})},setCurrencyCode:function(t){Xe=t,qe.notify("notifyExternalChange",{currencyCode:Xe})},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(Ye,n,{},!0)}},enableRtl:function(t){void 0===t&&(t=!0),Ke=t,qe.notify("notifyExternalChange",{enableRtl:Ke})},getNumericObject:function(t,e){var i=Me.getDependables(Ye,t,"",!0)[$e[0]],r=Me.getDependables(Ye,t,"")[$e[1]],n=o("defaultNumberingSystem",i),s=b()?o("numberSymbols",i):o("symbols-numberSystem-"+n,i),a=Me.getSymbolPattern(e||"decimal",n,i,!1);return u(s,Me.getFormatData(a,!0,"",!0),{dateSeparator:Me.getDateSeparator(r)})},getNumberDependable:function(t,e){var i=Me.getDependables(Ye,t,"",!0);return Me.getCurrencySymbol(i.numericObject,e)},getDefaultDateObject:function(t){return Me.getDependables(Ye,"",t,!1)[$e[1]]},KeyboardEvents:Hi,L10n:Wi,ModuleLoader:Pi,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:Ki,Touch:Ji,get HijriParser(){return ve},blazorTemplates:mr,getRandomId:nt,compile:ot,updateBlazorTemplate:st,resetBlazorTemplate:at,setTemplateEngine:lt,getTemplateEngine:ht,disableBlazorMode:function(){Ce=!1},createInstance:r,setImmediate:n,getValue:o,setValue:s,deleteObject:a,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(){Ce=!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[Se])for(var r=0,n=i[Se];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[Se]?i[Se].push(e):i[Se]=[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:R,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:Ue,SanitizeHtmlHelper:Sr}),Cr=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}(),xr=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)}}(),Or=function(){return function(t,e){this.width=t,this.height=e}}(),Br=function(){return function(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}}(),Lr=function(){return function(t,e){this.isRight=e,this.isBottom=t}}(),Tr=function(){return function(t){this.id=t}}(),Mr=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 xr(e,t),e}(Tr),Dr=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 xr(e,t),e}(Tr),kr=function(){return function(t,e){this.x=t,this.y=e}}(),Er=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)}}(),jr=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},Rr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Er(e,t),jr([G(null)],e.prototype,"size",void 0),jr([G("")],e.prototype,"color",void 0),jr([G("Segoe UI")],e.prototype,"fontFamily",void 0),jr([G("Normal")],e.prototype,"fontWeight",void 0),jr([G("Normal")],e.prototype,"fontStyle",void 0),jr([G(1)],e.prototype,"opacity",void 0),e}(Ci),Ir=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Er(e,t),jr([G("")],e.prototype,"color",void 0),jr([G(1)],e.prototype,"width",void 0),e}(Ci),Ar=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Er(e,t),jr([G(0)],e.prototype,"x",void 0),jr([G(0)],e.prototype,"y",void 0),jr([G(0)],e.prototype,"width",void 0),jr([G(0)],e.prototype,"height",void 0),e}(Ci),Nr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Er(e,t),jr([G(0)],e.prototype,"x",void 0),jr([G(0)],e.prototype,"y",void 0),e}(Ci),Fr=function(t){function e(e,i){return t.call(this,e,i)||this}return Er(e,t),e.prototype.preRender=function(){this.allowServerDataBinding=!1,this.initPrivateVariable(),this.isCanvas||this.removeSVG(),this.createTooltipElement()},e.prototype.initPrivateVariable=function(){this.renderer=new Cr(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:"rgba(0, 0, 0, 0.9)",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;default:e={tooltipFill:"rgba(0, 8, 22, 0.75)",tooltipBoldLabel:"#ffffff",tooltipLightLabel:"#dbdbdb",tooltipHeaderLine:"#ffffff"}}return e}(this.theme),this.formattedText=[],this.padding=5,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&&at(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=dt(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 Dr(this.element.id+"_Trackball_"+n,this.palette[n],1,"#cccccc",1,null),this.markerPoint[n]&&o.appendChild(gt(new kr(a,this.markerPoint[n]-this.padding+(t?this.arrowPadding:0)),u,new Or(i,i),"",r,null)),n++)}s.appendChild(o)},e.prototype.renderTooltipElement=function(t,e){var i,r=dt(this.element.id),n=new kr(0,0),o=new kr(0,0),s=dt(this.element.id+"_svg"),a=dt(this.element.id+"_group"),l=dt(this.element.id+"_path"),h=!1,u=!1,p=!1,d=0,f=0;if(this.tipRadius=1,""!==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=pt(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 Br(w+d,w+f,i.width-w,i.height-w);if(a.setAttribute("opacity","1"),!this.enableAnimation||this.shared||this.isFirst?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){var c="",p=i.x,d=i.y,f=i.x+i.width,g=i.y+i.height;return u=u||0,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=(c=c.concat(" L "+(r.x+n/2)+" "+g)).concat(" L "+(l+u)+" "+(g+n-u)),c+=" Q "+l+" "+(g+n)+" "+(l-u)+" "+(g+n-u)),c=r.x-n/2>p?c.concat(" L "+(r.x-n/2)+" "+g+" 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.concat("M "+p+" "+(d+e)+" Q "+p+" "+d+" "+(p+t)+" "+d+" L "+(r.x-n/2)+" "+d)).concat(" L "+(l-u)+" "+(r.y+u)),c=(c=(c+=" Q "+l+" "+r.y+" "+(l+u)+" "+(r.y+u)).concat(" L "+(r.x+n/2)+" "+d+" 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=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/2))).concat(" L "+(f+n-u)+" "+(h-u)),c=(c=(c+=" Q "+(f+n)+" "+h+" "+(f+n-u)+" "+(h+u)).concat(" L "+f+" "+(r.y+n/2)+" L "+f+" "+(g-e)+" Q "+f+" "+g+" "+(f-t)+" "+g)).concat(" L "+(p+t)+" "+g+" Q "+p+" "+g+" "+p+" "+(g-e)+" z")):(c=(c=c.concat("M "+(p+t)+" "+d+" Q "+p+" "+d+" "+p+" "+(d+e)+" L "+p+" "+(r.y-n/2))).concat(" L "+(p-n+u)+" "+(h-u)),c=(c=(c+=" Q "+(p-n)+" "+h+" "+(p-n+u)+" "+(h+u)).concat(" L "+p+" "+(r.y+n/2)+" 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.tipRadius)),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",di.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}return l.setAttribute("stroke",this.border.color),this.changeText(new kr(d,f),p,!u&&!h&&!p),new Lr(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=dt(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=pt(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||(ft(this.element.id+"_text"),ft(this.element.id+"_header_path"),ft(this.element.id+"_trackball_group"),ft(this.element.id+"SVG_tooltip_definition"));for(var M=new Mr(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 Cr("");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,R=0,I=this.formattedText.length;R<I;R++)if(r=this.formattedText[R].replace(/<(b|strong)>/g,"<b>").replace(/<\/(b|strong)>/g,"</b>").split(/<br.*?>/g),0===R&&!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[R]).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===R&&""!==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===R&&(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===R&&(E||this.isWrap))&&(O="Normal",B=this.themeStyle.tooltipLightLabel),i.textContent=n=this.getTooltipTextContent(n),l+=pt(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 Or(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-pt(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(dt(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 Or(l.width,l.height);var h=this.shared?this.sharedTooltipLocation(t,this.location.x,this.location.y):this.tooltipLocation(t,e,new kr(0,0),new kr(0,0));if(!this.enableAnimation||this.shared||this.isFirst?this.updateDiv(a,h.x,h.y):this.animateTooltipDiv(this.element,h),this.blazorTemplate){var u=function(){var i=dt(c.element.id).getBoundingClientRect();c.elementSize=new Or(i.width,i.height);var r=c.tooltipLocation(t,e,new kr(0,0),new kr(0,0));c.updateDiv(dt(c.element.id),r.x,r.y)},c=this;u.bind(c,t,e),st(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 Br(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 kr(e.x,e.y);return"Top"===n||"Bottom"===n?(u=new kr(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 kr(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 Br(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 kr(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.inverted?(n=new kr(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/2>s-this.ry&&(i.y=s-this.ry-this.arrowPadding/2,r.y=s,this.tipRadius=0),i.y-this.arrowPadding/2<this.ry&&(i.y=this.ry+this.arrowPadding/2,r.y=0,this.tipRadius=0)):(n=new kr(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/2>o-this.rx&&(i.x=o-this.rx-this.arrowPadding/2,r.x=o,this.tipRadius=0),i.x-this.arrowPadding/2<this.rx&&(i.x=this.rx+this.arrowPadding/2,r.x=0,this.tipRadius=0)),new Br(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 wi({}).animate(t,{duration:this.duration,progress:function(r){i=r.timeStamp/r.duration,t.style.animation=null,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){t.style.left=e+"px",t.style.top=i+"px"},e.prototype.updateTemplateFn=function(){if(this.template)try{document.querySelectorAll(this.template).length&&(this.templateFn=ot(document.querySelector(this.template).innerHTML.trim()))}catch(t){this.templateFn=ot(this.template)}},e.prototype.fadeOut=function(){var t=this,e=this.isCanvas&&!this.template?dt(this.element.id+"_svg"):dt(this.element.id);if(e){var i=e.firstChild;if(i.nodeType!=Node.ELEMENT_NODE&&(i=e.firstElementChild),this.isCanvas&&!this.template&&(i=document.getElementById(this.element.id+"_group")?document.getElementById(this.element.id+"_group"):i),!i)return null;var r=parseFloat(i.getAttribute("opacity"));r=c(r)?1:r,new wi({}).animate(i,{duration:200,progress:function(e){t.progressAnimation(i,r,e.timeStamp/e.duration)},end:function(){t.fadeOuted=!0,t.endAnimation(i)}})}},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&&at(this.element.id+"parent_template_blazorTemplate"),this.isFirst=!1,this.render()},jr([G(!1)],e.prototype,"enable",void 0),jr([G(!1)],e.prototype,"shared",void 0),jr([G(!0)],e.prototype,"enableShadow",void 0),jr([G(null)],e.prototype,"fill",void 0),jr([G("")],e.prototype,"header",void 0),jr([G(.75)],e.prototype,"opacity",void 0),jr([_({size:"13px",fontWeight:"Normal",color:null,fontStyle:"Normal",fontFamily:"Segoe UI"},Rr)],e.prototype,"textStyle",void 0),jr([G(null)],e.prototype,"template",void 0),jr([G(!0)],e.prototype,"enableAnimation",void 0),jr([G(300)],e.prototype,"duration",void 0),jr([G(!1)],e.prototype,"inverted",void 0),jr([G(!1)],e.prototype,"isNegative",void 0),jr([_({color:"#cccccc",width:.5},Ir)],e.prototype,"border",void 0),jr([G([])],e.prototype,"content",void 0),jr([G(10)],e.prototype,"markerSize",void 0),jr([_({x:0,y:0},Nr)],e.prototype,"clipBounds",void 0),jr([G([])],e.prototype,"palette",void 0),jr([G([])],e.prototype,"shapes",void 0),jr([_({x:0,y:0},Nr)],e.prototype,"location",void 0),jr([G(0)],e.prototype,"offset",void 0),jr([G(2)],e.prototype,"rx",void 0),jr([G(2)],e.prototype,"ry",void 0),jr([G(5)],e.prototype,"marginX",void 0),jr([G(5)],e.prototype,"marginY",void 0),jr([G(12)],e.prototype,"arrowPadding",void 0),jr([G(null)],e.prototype,"data",void 0),jr([G("Material")],e.prototype,"theme",void 0),jr([_({x:0,y:0,width:0,height:0},Ar)],e.prototype,"areaBounds",void 0),jr([G(null)],e.prototype,"availableSize",void 0),jr([G()],e.prototype,"blazorTemplate",void 0),jr([G(!1)],e.prototype,"isCanvas",void 0),jr([G(!1)],e.prototype,"isTextWrap",void 0),jr([G(null)],e.prototype,"tooltipPlacement",void 0),jr([G(null)],e.prototype,"controlInstance",void 0),jr([W()],e.prototype,"tooltipRender",void 0),jr([W()],e.prototype,"loaded",void 0),jr([W()],e.prototype,"animationComplete",void 0),jr([G(!1)],e.prototype,"enableRTL",void 0),e=jr([U],e)}(Mi),Vr="beforePrint",zr="itemRendering",Gr="drillStart",_r="itemSelected",Hr="itemHighlight",Wr="tooltipRendering",Ur="doubleClick",qr="rightClick",Kr="legendItemRendering",Yr="legendRendering",Jr="Roboto, Segoe UI, Noto, Sans-serif",Xr=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)}}(),$r=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 Xr(e,t),$r([G("#808080")],e.prototype,"color",void 0),$r([G(0)],e.prototype,"width",void 0),e}(Ci),Zr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),$r([G(10)],e.prototype,"left",void 0),$r([G(10)],e.prototype,"right",void 0),$r([G(10)],e.prototype,"top",void 0),$r([G(10)],e.prototype,"bottom",void 0),e}(Ci),tn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),$r([G(null)],e.prototype,"size",void 0),$r([G(null)],e.prototype,"color",void 0),$r([G(Jr)],e.prototype,"fontFamily",void 0),$r([G("Normal")],e.prototype,"fontWeight",void 0),$r([G("Normal")],e.prototype,"fontStyle",void 0),$r([G(1)],e.prototype,"opacity",void 0),e}(Ci),en=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),$r([G("")],e.prototype,"text",void 0),$r([G("")],e.prototype,"description",void 0),e}(Ci),rn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),$r([_({size:"14px"},tn)],e.prototype,"textStyle",void 0),$r([G("Center")],e.prototype,"alignment",void 0),e}(en),nn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),$r([_({size:"15px"},tn)],e.prototype,"textStyle",void 0),$r([G("Center")],e.prototype,"alignment",void 0),$r([_({},rn)],e.prototype,"subtitleSettings",void 0),e}(en),on=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),$r([G(null)],e.prototype,"from",void 0),$r([G(null)],e.prototype,"to",void 0),$r([G(null)],e.prototype,"color",void 0),$r([G(null)],e.prototype,"label",void 0),$r([G(null)],e.prototype,"value",void 0),$r([G(null)],e.prototype,"minOpacity",void 0),$r([G(null)],e.prototype,"maxOpacity",void 0),$r([G(!0)],e.prototype,"showLegend",void 0),e}(Ci),sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),$r([G(!1)],e.prototype,"visible",void 0),$r([G("Default")],e.prototype,"mode",void 0),$r([G("transparent")],e.prototype,"background",void 0),$r([G("Circle")],e.prototype,"shape",void 0),$r([G("")],e.prototype,"width",void 0),$r([G("")],e.prototype,"height",void 0),$r([_({size:"13px"},tn)],e.prototype,"textStyle",void 0),$r([G(null)],e.prototype,"fill",void 0),$r([G(1)],e.prototype,"opacity",void 0),$r([G(15)],e.prototype,"shapeWidth",void 0),$r([G(15)],e.prototype,"shapeHeight",void 0),$r([G(10)],e.prototype,"shapePadding",void 0),$r([G(null)],e.prototype,"imageUrl",void 0),$r([_({color:"#000000",width:0},Qr)],e.prototype,"border",void 0),$r([_({color:"#000000",width:0},Qr)],e.prototype,"shapeBorder",void 0),$r([_({},en)],e.prototype,"title",void 0),$r([_({size:"14px"},tn)],e.prototype,"titleStyle",void 0),$r([G("Bottom")],e.prototype,"position",void 0),$r([G("None")],e.prototype,"orientation",void 0),$r([G(!1)],e.prototype,"invertedPointer",void 0),$r([G("After")],e.prototype,"labelPosition",void 0),$r([G("None")],e.prototype,"labelDisplayMode",void 0),$r([G("Center")],e.prototype,"alignment",void 0),$r([G({x:0,y:0})],e.prototype,"location",void 0),$r([G(null)],e.prototype,"showLegendPath",void 0),$r([G(null)],e.prototype,"valuePath",void 0),$r([G(!1)],e.prototype,"removeDuplicateLegend",void 0),e}(Ci),an=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),$r([G(null)],e.prototype,"groupIndex",void 0),$r([G(null)],e.prototype,"groupName",void 0),e}(Ci),ln=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),$r([G(null)],e.prototype,"fill",void 0),$r([G(!1)],e.prototype,"autoFill",void 0),$r([_({},Qr)],e.prototype,"border",void 0),$r([G(0)],e.prototype,"gap",void 0),$r([G(10)],e.prototype,"padding",void 0),$r([G(1)],e.prototype,"opacity",void 0),$r([G(!0)],e.prototype,"showLabels",void 0),$r([G(null)],e.prototype,"labelPath",void 0),$r([G(null)],e.prototype,"labelFormat",void 0),$r([G("TopLeft")],e.prototype,"labelPosition",void 0),$r([_({color:null,size:"12px"},tn)],e.prototype,"labelStyle",void 0),$r([G(null)],e.prototype,"labelTemplate",void 0),$r([G("Center")],e.prototype,"templatePosition",void 0),$r([G("Trim")],e.prototype,"interSectAction",void 0),$r([H([],on)],e.prototype,"colorMapping",void 0),e}(Ci),hn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),$r([G(!1)],e.prototype,"visible",void 0),$r([G("")],e.prototype,"template",void 0),$r([G(null)],e.prototype,"format",void 0),$r([G(null)],e.prototype,"fill",void 0),$r([G(.75)],e.prototype,"opacity",void 0),$r([G(["Circle"])],e.prototype,"markerShapes",void 0),$r([_({},Qr)],e.prototype,"border",void 0),$r([_({fontFamily:Jr,size:"13px"},tn)],e.prototype,"textStyle",void 0),e}(Ci),un=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),$r([G(!1)],e.prototype,"enable",void 0),$r([G(null)],e.prototype,"fill",void 0),$r([G("0.5")],e.prototype,"opacity",void 0),$r([_({},Qr)],e.prototype,"border",void 0),$r([G("Item")],e.prototype,"mode",void 0),e}(Ci),cn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),$r([G(!1)],e.prototype,"enable",void 0),$r([G("#808080")],e.prototype,"fill",void 0),$r([G("0.5")],e.prototype,"opacity",void 0),$r([_({},Qr)],e.prototype,"border",void 0),$r([G("Item")],e.prototype,"mode",void 0),e}(Ci),pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xr(e,t),$r([G(null)],e.prototype,"groupPath",void 0),$r([G(0)],e.prototype,"groupGap",void 0),$r([G(10)],e.prototype,"groupPadding",void 0),$r([_({},Qr)],e.prototype,"border",void 0),$r([G(null)],e.prototype,"fill",void 0),$r([G(!1)],e.prototype,"autoFill",void 0),$r([G(1)],e.prototype,"opacity",void 0),$r([G(!0)],e.prototype,"showHeader",void 0),$r([G(20)],e.prototype,"headerHeight",void 0),$r([G(null)],e.prototype,"headerTemplate",void 0),$r([G(null)],e.prototype,"headerFormat",void 0),$r([G("Near")],e.prototype,"headerAlignment",void 0),$r([_({color:null,size:"13px"},tn)],e.prototype,"headerStyle",void 0),$r([G("TopLeft")],e.prototype,"templatePosition",void 0),$r([H([],on)],e.prototype,"colorMapping",void 0),e}(Ci),dn=function(){return function(t,e){this.width=t,this.height=e}}(),fn=function(){return function(t,e,i,r){this.x=t,this.y=e,this.width=i,this.height=r}}(),gn=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}}(),mn=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}}(),yn=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}}(),bn=function(){return function(t,e){this.x=t,this.y=e}}(),vn=function(){return function(t,e,i){this.r=t,this.g=e,this.b=i}}(),wn=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}}(),Sn=function(){function t(t){this.treemap=t}return t.prototype.processLayoutPanel=function(){var t,e;if(Xh.levelsData&&Xh.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)?Xh.levelsData[0]:this.getDrilldownData(Xh.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||Xh.levelsData[0],e),this.renderLayoutItems(t||Xh.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||Xh.levelsData[0],e),this.renderLayoutItems(n||Xh.levelsData[0])}},t.prototype.getDrilldownData=function(t,e){var i=this.treemap,r={},n=Bt(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=Bt(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 fn(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(xt);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 fn(o+e.x,e.y,i,e.height))):(i=r/s*t[l].weight/e.width,o<=e.height&&(t[l].rect=new fn(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=Bt(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 fn(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,Et(i)),e.sort(Yt),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=jt(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=Rt(t),r=i.width,n=i.height,o=i.x,s=i.y;if(r>=n){var a=e/n;return It({x:o+a,y:s,width:r-a,height:n})}var l=e/r;return It({x:o,y:s+l,width:r,height:n-l})},t.prototype.getCoordinates=function(t,e){for(var i,r=Rt(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=ae(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;"}),R=!1,I=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,R=f.isLeafItem,y=P+"_Level_Index_"+l+"_Item_Index_"+t,T=N.renderer.createGroup({id:y+"_Group"}),v=(R?I.gap:L[l].groupGap)/2;var w=N.treemap.totalRect?Rt(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)),R?I.colorMapping:L[l].colorMapping,r=N.getItemColor(R,f),d=r.fill,m=r.opacity,p=R?I.labelFormat:L[l].headerFormat;var C;if(i=R?I.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=Zt(p,f.data,N.treemap)||C||"undefined",k=Bt(f).values,g=!R&&k&&k.length>0&&N.treemap.enableDrillDown?f.isDrilled?s.enableRtl?g+" [-]":"[-] "+g:s.enableRtl?g+" [+]":"[+] "+g:g,(S=R?I.labelStyle:L[l].headerStyle).fontFamily=N.treemap.themeStyle.labelFontFamily||S.fontFamily,D=R?I.border:L[l].border,e=R?I.labelPosition:"Near"===L[l].headerAlignment?"TopLeft":"Center"===L[l].headerAlignment?"TopCenter":"TopRight",h=R?I.templatePosition:L[l].templatePosition,M=R?I.labelTemplate:L[l].headerTemplate,f.options={border:D,opacity:m,fill:d},n={cancel:!1,name:zr,treemap:N.treemap,text:g,currentItem:f,RenderItems:N.renderItems,options:f.options},N.treemap.trigger(zr,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 mn(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=Zt(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,R),j.appendChild(b),o.treemap.renderReactTemplates()),T.setAttribute("aria-label",f.name),T.setAttribute("tabindex",(o.treemap.tabIndex+t+2).toString()),Jt(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=yt(d&&d[0]||u[0],i),this.treemap.enableRtl){var m=yt(t,i),y=t.search("[+]")||t.search("[-]");if(r.width<m.width&&y>0){var b=t.substring(y-1,t.length),v=yt("[+]",i);u[0]=bt(r.width-v.width-5,u[0],i)+b}}var w=Dt(r,a,h,"Text",this.treemap);if(!c(d)){for(var S=[],P=null,C=[],x=0;x<d.length;x++)g+=(h=yt(P=bt(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=yt(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);St(new yn(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(Xh.defaultLevelsData)||Xh.defaultLevelsData.length>0&&(Xh.levelsData=Xh.defaultLevelsData);var o=Bt(Xh.levelsData[0]).values,s=t?i.leafItemSettings.colorMapping:i.levels[e.groupIndex].colorMapping;if(s.length>0){var a=Nt(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=re(ne(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=Mt(Tt(n)(o.data,this.treemap,n,this.treemap.element.id+l,!1),a,o.data),d=Dt(i,r,kt(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=[Kt(o,t.height,e,i)];break;case"Trim":n=[bt(o+3,e,i)];break;case"WrapByWord":n=Ut(o,e,i);break;case"Wrap":n=qt(o,e,i)}return n},t}(),Pn=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):On.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):On.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 Cn(t,e,i,r,n):t instanceof Cn&&(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=On.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&&On.endsWith(e.toLowerCase()," desc")&&(e=e.replace(/ desc$/i,""),i="descending"),i&&"string"!=typeof i||(a=i?i.toLowerCase():"ascending",i=On.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}(),Cn=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=On.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,On.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)):On.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}(),xn={GroupGuid:"{271bbba0-1ee7}"},On=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===xn.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=xn.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 In(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 Pn;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 Cn(t.field,t.operator,t.value,t.ignoreCase,t.ignoreAccent)):e=e.concat(i.getPredicate(t.predicates)),"or"==t.condition?r.where(Cn.or(e)):"and"==t.condition&&r.where(Cn.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 Cn(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?Cn.or(n):Cn.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 In(t).executeLocal((new Pn).where(e,"equal",!0,!0)).length},falsecount:function(t,e){return new In(t).executeLocal((new Pn).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}(),Bn=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)}}(),Ln={GroupGuid:"{271bbba0-1ee7}"},Tn=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}(),Mn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Bn(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=On.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=On.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=Pn.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:On.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=On.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&&On.getFieldList(t[0],e.fieldNames),t.filter(function(t){for(var i=0;i<e.fieldNames.length;i++)if(e.comparer.call(t,On.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=On.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,On.endsWith(n[o]," desc")&&(r=On.fnSort("descending"),n[o]=n[o].replace(" desc","")),t=On.sort(t,n[o],r));return t}return On.sort(t,n,e.comparer)},e.prototype.onGroup=function(t,e,i){if(!t||!t.length)return t;var r=this.getAggregate(i);return On.group(t,On.getValue(e.fieldName,i),r,null,null,e.comparer)},e.prototype.onPage=function(t,e,i){var r=On.getValue(e.pageSize,i),n=(On.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(On.getValue(e.start),On.getValue(e.end)):t},e.prototype.onTake=function(t,e){return t&&t.length?t.slice(0,On.getValue(e.nos)):t},e.prototype.onSkip=function(t,e){return t&&t.length?t.slice(On.getValue(e.nos)):t},e.prototype.onSelect=function(t,e){return t&&t.length?On.select(t,On.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=On.getObject(e,i)),n=0;n<o.length&&On.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}(Tn),Dn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Bn(e,t),e.prototype.processQuery=function(t,e,i){var r,n,o=this.getQueryRequest(e),s=Pn.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=On.getValue(r.pageIndex,e))-1)*(h=On.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=On.getValue(o.sorts[d].e.fieldName,e),p.sorts.push(On.callAdaptorFunction(this,"onEachSort",{name:r,direction:o.sorts[d].e.direction},e));i&&(r=this.getFiltersFrom(i,e))&&p.filters.push(On.callAdaptorFunction(this,"onEachWhere",r.toJson(),e));for(d=0;d<o.filters.length;d++){var f=On.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];On.isNull(p[y])&&delete p[y]}}for(d=0;d<o.searches.length;d++)r=o.searches[d].e,p.searches.push(On.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(On.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:On.getValue(r.field,e)});var b={};if(this.getRequestQuery(u,e,s,p,b),On.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];(On.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]=On.callAdaptorFunction(this,"onSkip",n,e),b[u.take]=On.callAdaptorFunction(this,"onTake",h,e));var S=this.pvt;return this.pvt={},"json"===this.options.requestType?{data:JSON.stringify(b,On.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?On.callAdaptorFunction(this,"onDistinct",e.distincts):""),!e.distincts.length&&t.expand&&(o[t.expand]="onExpand"in this&&"onSelect"in i?On.callAdaptorFunction(this,"onExpand",{selects:On.getValue(i.onSelect.fieldNames,e),expands:e.expands},e):e.expands),o[t.select]="onSelect"in i&&!e.distincts.length?On.callAdaptorFunction(this,"onSelect",On.getValue(i.onSelect.fieldNames,e),e):"",o[t.count]=e.isCountRequired?On.callAdaptorFunction(this,"onCount",e.isCountRequired,e):"",o[t.search]=r.searches.length?On.callAdaptorFunction(this,"onSearch",r.searches,e):"",o[t.skip]="onSkip"in i?On.callAdaptorFunction(this,"onSkip",On.getValue(i.onSkip.nos,e),e):"",o[t.take]="onTake"in i?On.callAdaptorFunction(this,"onTake",On.getValue(i.onTake.nos,e),e):"",o[t.where]=r.filters.length||r.searches.length?On.callAdaptorFunction(this,"onWhere",r.filters,e):"",o[t.sortBy]=r.sorts.length?On.callAdaptorFunction(this,"onSortBy",r.sorts,e):"",o[t.group]=r.groups.length?On.callAdaptorFunction(this,"onGroup",r.groups,e):"",o[t.aggregates]=r.aggregates.length?On.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=On.timeZoneHandling;e&&!e.timeZoneHandling&&(On.timeZoneHandling=!1),t=On.parse.parseJson(t),On.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),On.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=Ln.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]},On.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"},On.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"},On.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:On.getObject(e,i),table:r},On.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]?On.getObject(o||n,t[a]):t[a],s.push(new Cn(r,"equal",i));return Cn.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=On.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=On.group(r,d[u]));var f=Pn.filterQueries(n.queries,"onGroup")[u].e;o=On.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=Pn.filterQueries(t.queries,"onSortBy"),e.groups=Pn.filterQueries(t.queries,"onGroup"),e.filters=Pn.filterQueries(t.queries,"onWhere"),e.searches=Pn.filterQueries(t.queries,"onSearch"),e.aggregates=Pn.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}(Tn),kn=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 Bn(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'"+On.parse.replacer(a)+"'"),"string"===l&&(a=a.replace("'","''"),a="'"+(a=encodeURIComponent(a))+"'",r&&(h="cast("+h+", 'Edm.String')"),On.parse.isGuid(a)&&(o="guid"),t.ignoreCase&&(o||(h="tolower("+h+")"),a=a.toLowerCase())),n=On.odBiOperator[t.operator])return s+=h,s+=n,o&&(s+=o),s+a;if("substringof"===(n=c(this.getModuleName)||"ODataV4Adaptor"!==this.getModuleName()?On.odUniOperator[t.operator]:On.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&&On.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 Cn(t.fields[i],t.operator,t.key,t.ignoreCase));this.pvt.search=e},e.prototype.onSearch=function(t){return this.pvt.search=Cn.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){On.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),On.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]=On.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||On.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]||On.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=On.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:On.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=On.getObject(i,t[e]);if("number"==typeof r||On.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 On.getObject(e.key,i)===On.getObject(e.key,t)})[0],e.key)});var o={method:this.options.updateType+" ",url:function(t,e,i){if("number"==typeof t[e][i]||On.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&&On.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=On.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(On.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}(Dn),En=(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}Bn(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 Pn)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")),On.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={},i={},r=t.expands.slice(),n=[];return t.selects.filter(function(t){return t.indexOf(".")>-1}).forEach(function(t){var i=t.split(".");if(i[0]in e||(e[i[0]]=[]),2==i.length)e[i[0]].length&&-1!==Object.keys(e).indexOf(i[0])?e[i[0]][0]=e[i[0]][0]+","+i[1]:e[i[0]].push("$select="+i[1]);else{for(var r="$select="+i[i.length-1],n="",o="",s=1;s<i.length-1;s++)n=n+"$expand="+i[s]+"(",o+=")";var a=n+r+o;e[i[0]].length&&-1!==Object.keys(e).indexOf(i[0])&&-1!==e[i[0]][0].indexOf("$expand")?e[i[0]][0]=e[i[0]][0]+a.replace("$expand=",","):e[i[0]].push(a)}}),Object.keys(e).forEach(function(t){-1===r.indexOf(t)&&r.push(t)}),r.forEach(function(t){i[t]=t in e?t+"("+e[t].join(";")+")":t}),Object.keys(i).forEach(function(t){return n.push(i[t])}),n.join(",")},e.prototype.onDistinct=function(t){return"groupby(("+t.map(function(t){return kn.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),On.isNull(u)?p.result:{result:p.result,count:u,aggregates:p.aggregates}}}(kn),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Bn(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=On.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=On.getObject(i,t[e]);if("number"==typeof r||On.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&&(On.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,On.isNull(a)?l.result:{result:l.result,count:l.count,aggregates:l.aggregates}}}(kn),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Bn(e,t),e.prototype.processQuery=function(t,e,i){var r=(new Dn).processQuery(t,e,i),n=On.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"}}}(Dn),function(t){function e(){var e=t.call(this)||this;return s("beforeSend",Dn.prototype.beforeSend,e),e}return Bn(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"},On.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"},On.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},On.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?On.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},On.getAddParams(this,t,r)))}},e.prototype.addParams=function(t){(new Dn).addParams(t)},e}(Mn)),jn=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 Bn(e,t),e.prototype.getModuleName=function(){return"CustomDataAdaptor"},e}(Dn),Rn=(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}Bn(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:On.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}}(Dn),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=On.getGuid("cacheAdaptor");window.localStorage.setItem(n.guidId,JSON.stringify({keys:[],results:[]}));var o=n.guidId;return c(i)||setInterval(function(){var t;t=On.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 Bn(e,t),e.prototype.generateKey=function(t,e){var i=this.getQueryRequest(e),r=Pn.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=On.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&&On.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=On.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)&&On.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}(Dn)),In=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 En||t.adaptor instanceof jn)&&!t.url,requiresFormat:t.requiresFormat}):On.throwError("DataManager: Invalid arguments"),void 0!==n.requiresFormat||On.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 kn,this.dataSource.offline=!1,this.ready=this.executeQuery(e||new Pn),this.ready.then(function(t){r.dataSource.offline=!0,r.isDataAvailable=!0,n.json=t.result,r.adaptor=new Mn})):this.adaptor=n.offline?new Mn:new kn,!n.jsonp&&this.adaptor instanceof kn&&(n.jsonp="callback"),this.adaptor=i||this.adaptor,n.enableCaching&&(this.adaptor=new Rn(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 Pn||On.throwError("DataManager - executeLocal() : A query is required to execute"),this.dataSource.json||On.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&&On.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 Pn||On.throwError("DataManager - executeQuery() : A query is required to execute");var a=new An,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 An,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&&(On.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=On.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 ii(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),On.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 Pn&&(r=i,i=null);var s={url:i,key:e||this.dataSource.key},a=this.adaptor.batchRequest(this,t,s,r||new Pn,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 An,h=new ii(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 Pn&&(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=On.getObject(t,e)),i instanceof Pn&&(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 Pn&&(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{On.parse.parseJson(t)}catch(e){t=[]}t=this.adaptor.processResponse(On.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 An,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 ii(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}(),An=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)}}();(Di||(Di={})).mapsTitleFont={size:"14px",fontWeight:"Medium",color:"#424242",fontStyle:"Medium",fontFamily:"Roboto, Noto, Sans-serif"};var Nn,Fn=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:Vr};this.control.trigger(Vr,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(Ct(t).cloneNode(!0))}):t instanceof Element?e.appendChild(t.cloneNode(!0)):e.appendChild(Ct(t).cloneNode(!0)):e.appendChild(this.control.element.cloneNode(!0)),e},t.prototype.getModuleName=function(){return"Print"},t.prototype.destroy=function(t){},t}(),Vn=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=!(di.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?fe(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?fe(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}(),zn=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}(),Gn=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}(),_n=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}(),Hn=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"}}(),Wn=function(){function t(t){if(this.position7=-1,this.primitiveItems=new zn,this.prefix="<<",this.suffix=">>",this.resources=[],this.object=null,this.archive=!0,this.isFont=!1,void 0===t)this.primitiveItems=new zn,this.encrypt=!0,this.dictionaryProperties=new Hn;else{this.primitiveItems=new zn;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 Hn}}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 Gn(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(_n.newLine))},t.prototype.saveItems=function(t){t.write(_n.newLine);for(var e=this.primitiveItems.keys(),i=this.primitiveItems.values(),r=0;r<e.length;r++){var n=e[r];new Gn(n).save(t),t.write(_n.whiteSpace);i[r].save(t),t.write(_n.newLine)}},t}(),Un=function(){return function(t){this.sender=t}}(),qn=function(){return function(t){this.sender=t}}(),Kn=function(){return function(t){this.sender=t}}(),Yn=function(){return function(t){this.sender=t}}(),Jn=function(){return function(t,e){this.sender=t,this.state=e}}(),Xn=function(){return function(t){this.sender=t}}(),$n=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}(),Qn=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 $n(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(_n.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}(),Zn=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}(),to=(function(){function t(){this.contentPos=0,this.bufferText="",this.bufferBlob=new Blob([""],{type:"text/plain"}),this.currentState="Initial",this.namespaceStack=[],this.namespaceStack.push(new to),this.namespaceStack[0].set("xmlns","http://www.w3.org/2000/xmlns/","Special"),this.namespaceStack.push(new to),this.namespaceStack[1].set("xml","http://www.w3.org/XML/1998/namespace","Special"),this.namespaceStack.push(new to),this.namespaceStack[2].set("","","Implied"),this.elementStack=[],this.elementStack.push(new eo),this.elementStack[0].set("","","",this.namespaceStack.length-1),this.attributeStack=[],Zn.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(),Zn.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 eo),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,"&amp;")).replace(/\</g,"&lt;")).replace(/\>/g,"&gt;"),e&&(t=t.replace(/\"/g,"&quot;")),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 to),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 io),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}()),eo=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}(),io=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}(),ro=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(ye(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(ye(t,"string"),ye(e,"charIndex"),ye(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(ye(t,"bytes"),ye(e,"index"),ye(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}(),no=function(){function t(t){this.bufferBlob=new Blob([""]),this.bufferText="",this.init(t),Zn.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 ro(!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(),Zn.save(t,this.buffer)},t.prototype.write=function(t){if(void 0===this.encoding)throw new Error("Object Disposed Exception: current writer is disposed");ye(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");ye(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 ro&&this.enc.destroy(),this.enc=void 0},t}(),oo=new Int16Array(286),so=new Uint8Array(286),ao=new Int16Array(30),lo=new Uint8Array(30),ho=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 uo(this,286,257,15),this.treeDistances=new uo(this,30,1,15),this.treeCodeLengths=new uo(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 ro(!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[uo.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]*so[o];for(o=0;o<30;o++)a+=this.treeDistances.codeFrequencies[o]*lo[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(oo,so),this.treeDistances.setStaticCodes(ao,lo),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[uo.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;)oo[t]=uo.bitReverse(48+t<<8),so[t++]=8;for(;t<256;)oo[t]=uo.bitReverse(256+t<<7),so[t++]=9;for(;t<280;)oo[t]=uo.bitReverse(-256+t<<9),so[t++]=7;for(;t<286;)oo[t]=uo.bitReverse(-88+t<<8),so[t++]=8;for(t=0;t<30;t++)ao[t]=uo.bitReverse(t<<11),lo[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}(),uo=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}(),po=[],fo=(function(){function t(){0===po.length&&t.initCrc32Table(),this.files=[],this.level="Normal",Zn.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 fo&&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 fo&&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 fo){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,po);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,po),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 ho(!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||Zn.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;po[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}()),go=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)}}(),mo=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 go(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 ho;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 Po){e=e.object}var i=e,r=e;null!=r&&((i=new Qn).insert(0,r),this.items.setValue(this.dictionaryProperties.filter,i)),r=new Gn(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 $n(n)),t.prototype.save.call(this,e,!1),e.write(this.dicPrefix),e.write(_n.newLine),i.length>0&&e.write(i),e.write(_n.newLine),e.write(this.dicSuffix),e.write(_n.newLine)},e.bytesToString=function(t){for(var e="",i=0;i<t.length;i++)e+=String.fromCharCode(t[i]);return e},e}(Wn),yo=function(){return function(t){this.sender=t}}(),bo=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={}))}(Nn||(Nn={}));var vo,wo=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===Nn.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===Nn.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}(),So=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}(),Po=function(){function t(t,e){this.index4=-1,this.position4=-1,this.objectIndex=-1,this.dictionaryProperties=new Hn,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 Qn||t instanceof Wn||t instanceof Gn||t instanceof $n||t instanceof mo||t instanceof So||t instanceof wo)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}(),Co=function(){function t(){this.action=null,this.dictionaryProperties=new Hn,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 Po(this.action))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dictionary",{get:function(){return void 0===this.pdfDictionary&&(this.pdfDictionary=new Wn),this.pdfDictionary},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){this.dictionary.items.setValue(this.dictionaryProperties.type,new Gn(this.dictionaryProperties.action))},Object.defineProperty(t.prototype,"element",{get:function(){return this.dictionary},enumerable:!0,configurable:!0}),t}(),xo=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)}}(),Oo=function(t){function e(e){var i=t.call(this)||this;return i.uniformResourceIdentifier="",i}return xo(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 wo(this.uniformResourceIdentifier))},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.dictionary.items.setValue(this.dictionaryProperties.s,new Gn(this.dictionaryProperties.uri))},e}(Co);!function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right"}(vo||(vo={}));var Bo;!function(t){t[t.Top=0]="Top",t[t.Middle=1]="Middle",t[t.Bottom=2]="Bottom"}(Bo||(Bo={}));var Lo;!function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right",t[t.Justify=3]="Justify"}(Lo||(Lo={}));var To;!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"}(To||(To={}));var Mo;!function(t){t[t.Miter=0]="Miter",t[t.Round=1]="Round",t[t.Bevel=2]="Bevel"}(Mo||(Mo={}));var Do;!function(t){t[t.Flat=0]="Flat",t[t.Round=1]="Round",t[t.Square=2]="Square"}(Do||(Do={}));var ko;!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"}(ko||(ko={}));var Eo;!function(t){t[t.Winding=0]="Winding",t[t.Alternate=1]="Alternate"}(Eo||(Eo={}));var jo;!function(t){t[t.Rgb=0]="Rgb",t[t.Cmyk=1]="Cmyk",t[t.GrayScale=2]="GrayScale",t[t.Indexed=3]="Indexed"}(jo||(jo={}));var Ro;!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"}(Ro||(Ro={}));var Io;!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"}(Io||(Io={}));var Ao;!function(t){t[t.Fit=0]="Fit",t[t.Center=1]="Center",t[t.Stretch=2]="Stretch",t[t.Tile=3]="Tile"}(Ao||(Ao={}));var No;!function(t){t[t.None=0]="None",t[t.LeftToRight=1]="LeftToRight",t[t.RightToLeft=2]="RightToLeft"}(No||(No={}));var Fo,Vo=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=$n.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 jo.Rgb:i=this.rgbToString(e);break;case jo.GrayScale:i=this.grayScaleToString(e);break;case jo.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+_n.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+_n.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"+_n.newLine},t.prototype.toArray=function(t){var e=new Qn;switch(t){case jo.Rgb:e.add(new $n(this.red)),e.add(new $n(this.green)),e.add(new $n(this.blue))}return e},t.rgbStrings=new zn,t.grayStringsSroke=new zn,t.grayStringsFill=new zn,t.maxColourChannelValue=255,t}(),zo=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)}}(),Go=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)}}(),_o=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 zo&&e instanceof Go&&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}}}(),Ho=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 zo(this.left,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){return new Go(this.width,this.height)},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.topLeft+"x"+this.size},t}(),Wo=function(){function t(){}return t.prototype.clone=function(){return this},t}(),Uo=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)}}(),qo=function(t){function e(e){var i=t.call(this)||this;return i.pdfColor=e,i}return Uo(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 Vo(0,0,0),jo.Rgb,!1)},e}(Wo);!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"}(Fo||(Fo={}));var Ko;!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"}(Ko||(Ko={}));var Yo;!function(t){t[t.Standard=0]="Standard",t[t.TrueType=1]="TrueType",t[t.TrueTypeEmbedded=2]="TrueTypeEmbedded"}(Yo||(Yo={}));var Jo;!function(t){t[t.None=0]="None",t[t.Word=1]="Word",t[t.WordOnly=2]="WordOnly",t[t.Character=3]="Character"}(Jo||(Jo={}));var Xo;!function(t){t[t.None=0]="None",t[t.SuperScript=1]="SuperScript",t[t.SubScript=2]="SubScript"}(Xo||(Xo={}));var $o;!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"}($o||($o={}));var Qo;!function(t){t[t.Apple=0]="Apple",t[t.Microsoft=4]="Microsoft",t[t.Trimmed=6]="Trimmed"}(Qo||(Qo={}));var Zo;!function(t){t[t.Unknown=0]="Unknown",t[t.Symbol=1]="Symbol",t[t.Unicode=2]="Unicode",t[t.Macintosh=3]="Macintosh"}(Zo||(Zo={}));var ts;!function(t){t[t.AppleUnicode=0]="AppleUnicode",t[t.Macintosh=1]="Macintosh",t[t.Iso=2]="Iso",t[t.Microsoft=3]="Microsoft"}(ts||(ts={}));var es;!function(t){t[t.Undefined=0]="Undefined",t[t.Unicode=1]="Unicode"}(es||(es={}));var is;!function(t){t[t.Roman=0]="Roman",t[t.Japanese=1]="Japanese",t[t.Chinese=2]="Chinese"}(is||(is={}));var rs;!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"}(rs||(rs={}));var ns;!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"}(ns||(ns={}));var os,ss=function(){function t(t,e){this.scalingFactor=100,this.wordWrapType=Jo.Word,this.internalLineLimit=!0,this.wordWrapType=Jo.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?Bo.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?Xo.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}(),as=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}(),ls=function(){function t(){this.isOverloadWithPosition=!1}return t.prototype.layout=function(t,e,i,r,n,o,s){if(r instanceof _o){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 Go(r.width,r.height),this.rectangle=r,this.pageHeight=n,this.reader=new as(t)}else this.initialize(t,e,i,new _o(new zo(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 hs,e=new hs,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 hs;i.layoutLineHeight=this.getLineHeight();var r=[],n=this.size.width,o=this.getLineWidth(t)+e,s=os.FirstParagraphLine,a=!0;if(n<=0||Math.round(o)<=Math.round(n))this.addToLineResult(i,r,t,o,os.NewLineBreak|s);else{var l="",h="";o=e;var u=e,c=new as(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()===Jo.None)break;if(h.length===p.length){if(this.getWrapType()===Jo.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=Jo.Character:void 0!==this.format&&null!==this.format&&(this.format.wordWrap=Jo.Word),this.getWrapType()===Jo.Character&&a)a=!1,h="",h+=l.toString(),p=c.peek().toString();else{" "!==(f=l.toString())&&this.addToLineResult(i,r,f,o,os.LayoutBreak|s),this.isOverloadWithPosition&&(n=this.clientSize.width),h="",l="",o=0,u=0,d=0,s=os.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,os.NewLineBreak|os.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 us;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,os.FirstParagraphLine,null==this.format||this.format.rightToLeft;return(i=i.trim()).length!==t.text.length&&(r=this.getLineWidth(i),(t.lineType&os.FirstParagraphLine)>0&&(r+=this.getLineIndent(e))),t.text=i,t.width=r,t},t.prototype.getWrapType=function(){return null!=this.format?this.format.wordWrap:Jo.Word},t}(),hs=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 Go(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}(),us=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"}(os||(os={}));var cs,ps=function(){function t(t,e){this.fontStyle=Fo.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&Fo.Bold)>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"italic",{get:function(){return(this.style&Fo.Italic)>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"strikeout",{get:function(){return(this.style&Fo.Strikeout)>0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"underline",{get:function(){return(this.style&Fo.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 ss||null==e)&&void 0===i&&void 0===r){var o=e;return this.measureString(t,o,0,0)}if("string"==typeof t&&(e instanceof ss||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 ss||null==i)&&"number"==typeof r&&"number"==typeof n){var s=new Go(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 ls).layout(t,this,a,o,!1,new Go(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=as.spaces;r+=as.getCharsCount(t,n)*e.wordSpacing}return r},t.charSizeMultiplier=.001,t.syncObject=new Object,t}(),ds=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 fs,gs=function(){function t(){this.objectCollections=[],this.mainObjectCollection=new zn,this.primitiveObjectCollection=new zn}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 ms(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 zn,this.primitiveObjectCollection=new zn},t}(),ms=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}(),ys=function(){function t(t){this.isStreamCopied=!1,t instanceof al&&(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 ro(!0),r=new no(i);if(void 0===t){var n=new ro(!0),o=new no(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"}(fs||(fs={}));var bs,vs=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)}}(),ws=function(t){function e(){var e=t.call(this)||this;return e.sections=null,e.tempDictionaryProperties=new Hn,e.items.setValue((new Hn).type,new Gn("Catalog")),e}return vs(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 Po(t))},enumerable:!0,configurable:!0}),e}(Wn),Ss=function(){function t(){this.objects=new zn,this.maxGenNumIndex=0,this.objectCount=0,this.dictionaryProperties=new Hn}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 mo),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 So(0,-1),!0);t.write(_n.xref),t.write(_n.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(_n.newLine+_n.startxref+_n.newLine),t.write(e.toString()+_n.newLine),t.write(_n.eof+_n.newLine)},t.prototype.saveTrailer=function(t,e,i){t.write(_n.trailer+_n.newLine);var r=this.trailer;r.items.setValue(this.dictionaryProperties.size,new $n(this.objectCount+1)),(r=new Wn(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)+_n.newLine);for(var r=e;r<=e+i;++r){var n=this.objects.getValue(r),o="";o=n.type===fs.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?_n.f:_n.n)+_n.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(_n.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 So(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 ws&&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(_n.whiteSpace),i.write(e.genNumber.toString()),i.write(_n.whiteSpace),i.write(_n.obj),i.write(_n.newLine),t.save(i);i.stream;i.write(_n.endObj),i.write(_n.newLine)},t.prototype.registerObject=function(t,e,i){"boolean"==typeof i?(this.objects.setValue(e.objNumber,new Ps(t,e,i)),this.maxGenNumIndex=Math.max(this.maxGenNumIndex,e.genNumber)):void 0===i&&(this.objects.setValue(e.objNumber,new Ps(t,e)),this.maxGenNumIndex=Math.max(this.maxGenNumIndex,e.genNumber))},t.dereference=function(t){return null!=t&&(t=t.object),t},t}(),Ps=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?fs.Normal:fs.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}(),Cs=function(){function t(){}return t.letter=new Go(612,792),t.note=new Go(540,720),t.legal=new Go(612,1008),t.a0=new Go(2380,3368),t.a1=new Go(1684,2380),t.a2=new Go(1190,1684),t.a3=new Go(842,1190),t.a4=new Go(595,842),t.a5=new Go(421,595),t.a6=new Go(297,421),t.a7=new Go(210,297),t.a8=new Go(148,210),t.a9=new Go(105,148),t.a10=new Go(74,105),t.b0=new Go(2836,4008),t.b1=new Go(2004,2836),t.b2=new Go(1418,2004),t.b3=new Go(1002,1418),t.b4=new Go(709,1002),t.b5=new Go(501,709),t.archE=new Go(2592,3456),t.archD=new Go(1728,2592),t.archC=new Go(1296,1728),t.archB=new Go(864,1296),t.archA=new Go(648,864),t.flsa=new Go(612,936),t.halfLetter=new Go(396,612),t.letter11x17=new Go(792,1224),t.ledger=new Go(1224,792),t}();!function(t){t[t.Portrait=0]="Portrait",t[t.Landscape=1]="Landscape"}(bs||(bs={}));var xs;!function(t){t[t.RotateAngle0=0]="RotateAngle0",t[t.RotateAngle90=1]="RotateAngle90",t[t.RotateAngle180=2]="RotateAngle180",t[t.RotateAngle270=3]="RotateAngle270"}(xs||(xs={}));var Os;!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"}(Os||(Os={}));var Bs;!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"}(Bs||(Bs={}));var Ls;!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"}(Ls||(Ls={}));var Ts;!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"}(Ts||(Ts={}));var Ms,Ds=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}(),ks=function(){function t(t){this.pageMargins=new Ds,this.pageSize=Cs.a4,this.rotateAngle=xs.RotateAngle0,this.pageOrientation=bs.Portrait,this.pageOrigin=new zo(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 bs.Portrait:this.pageSize=new Go(e,i);break;case bs.Landscape:this.pageSize=new Go(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 Go(t,e)},t.prototype.setSize=function(t){var e=Math.min(t.width,t.height),i=Math.max(t.width,t.height);this.orientation===bs.Portrait?this.pageSize=new Go(e,i):this.pageSize=new Go(i,e)},t}(),Es=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 Gn?(this.stream.write(t.toString()),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setGraphicsState)):(this.stream.write(_n.slash),this.stream.write(t),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setGraphicsState))},t.prototype.executeObject=function(t){this.stream.write(t.toString()),this.stream.write(_n.whiteSpace),this.writeOperator(_n.paintXObject),this.stream.write(_n.newLine)},t.prototype.closePath=function(){this.writeOperator(_n.closePath)},t.prototype.clipPath=function(t){this.stream.write(_n.clipPath),t&&this.stream.write(_n.evenOdd),this.stream.write(_n.whiteSpace),this.stream.write(_n.endPath),this.stream.write(_n.newLine)},t.prototype.closeFillStrokePath=function(t){this.stream.write(_n.closeFillStrokePath),t?(this.stream.write(_n.evenOdd),this.stream.write(_n.newLine)):this.stream.write(_n.newLine)},t.prototype.fillStrokePath=function(t){this.stream.write(_n.fillStroke),t?(this.stream.write(_n.evenOdd),this.stream.write(_n.newLine)):this.stream.write(_n.newLine)},t.prototype.fillPath=function(t){this.stream.write(_n.fill),t?(this.stream.write(_n.evenOdd),this.stream.write(_n.newLine)):this.stream.write(_n.newLine)},t.prototype.endPath=function(){this.writeOperator(_n.n)},t.prototype.closeFillPath=function(t){this.writeOperator(_n.closePath),this.stream.write(_n.fill),t?(this.stream.write(_n.evenOdd),this.stream.write(_n.newLine)):this.stream.write(_n.newLine)},t.prototype.closeStrokePath=function(){this.writeOperator(_n.closeStrokePath)},t.prototype.setTextScaling=function(t){this.stream.write($n.floatToString(t)),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setTextScaling)},t.prototype.strokePath=function(){this.writeOperator(_n.stroke)},t.prototype.restoreGraphicsState=function(){this.writeOperator(_n.restoreState)},t.prototype.saveGraphicsState=function(){this.writeOperator(_n.saveState)},t.prototype.startNextLine=function(t,e){void 0===t?this.writeOperator(_n.goToNextLine):t instanceof zo?(this.writePoint(t),this.writeOperator(_n.setCoords)):(this.writePoint(t,e),this.writeOperator(_n.setCoords))},t.prototype.showText=function(t){this.checkTextParam(t),this.writeText(t),this.writeOperator(_n.setText)},t.prototype.setLeading=function(t){this.stream.write($n.floatToString(t)),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setTextLeading)},t.prototype.beginPath=function(t,e){this.writePoint(t,e),this.writeOperator(_n.beginPath)},t.prototype.beginText=function(){this.writeOperator(_n.beginText)},t.prototype.endText=function(){this.writeOperator(_n.endText)},t.prototype.appendRectangle=function(t,e,i,r){t instanceof _o?this.appendRectangle(t.x,t.y,t.width,t.height):(this.writePoint(t,e),this.writePoint(i,r),this.writeOperator(_n.appendRectangle))},t.prototype.appendLineSegment=function(t,e){t instanceof zo?this.appendLineSegment(t.x,t.y):(this.writePoint(t,e),this.writeOperator(_n.appendLineSegment))},t.prototype.setTextRenderingMode=function(t){this.stream.write(t.toString()),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setRenderingMode)},t.prototype.setCharacterSpacing=function(t){this.stream.write($n.floatToString(t)),this.stream.write(_n.whiteSpace),this.stream.write(_n.setCharacterSpace),this.stream.write(_n.newLine)},t.prototype.setWordSpacing=function(t){this.stream.write($n.floatToString(t)),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setWordSpace)},t.prototype.showNextLineText=function(t,e){t instanceof wo?(this.checkTextParam(t),this.writeText(t),this.writeOperator(_n.setTextOnNewLine)):(this.checkTextParam(t),this.writeText(t,e),this.writeOperator(_n.setTextOnNewLine))},t.prototype.setColorSpace=function(t,e){if(t instanceof Gn&&"boolean"==typeof e){var i=t,r=(n=e)?_n.selectcolorspaceforstroking:_n.selectcolorspacefornonstroking;this.stream.write(i.toString()),this.stream.write(_n.whiteSpace),this.stream.write(r),this.stream.write(_n.newLine)}else{i=t;var n=e;this.setColorSpace(new Gn(i),n)}},t.prototype.modifyCtm=function(t){if(null==t)throw new Error("ArgumentNullException:matrix");this.stream.write(t.toString()),this.stream.write(_n.whiteSpace),this.writeOperator(_n.modifyCtm)},t.prototype.setFont=function(t,e,i){if("string"==typeof e)this.setFont(t,new Gn(e),i);else{if(null==t)throw new Error("ArgumentNullException:font");this.stream.write(e.toString()),this.stream.write(_n.whiteSpace),this.stream.write($n.floatToString(i)),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setFont)}},t.prototype.writeOperator=function(t){this.stream.write(t),this.stream.write(_n.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 wo&&void 0===e)this.stream.write(t.pdfEncode());else{var i=void 0,r=void 0;e?(i=wo.hexStringMark[0],r=wo.hexStringMark[1]):(i=wo.stringMark[0],r=wo.stringMark[1]),this.stream.write(i),this.stream.write(t),this.stream.write(r)}},t.prototype.writePoint=function(t,e){if(t instanceof zo&&void 0===e)this.writePoint(t.x,t.y);else{var i=t;this.stream.write($n.floatToString(i)),this.stream.write(_n.whiteSpace),e=this.updateY(e),this.stream.write($n.floatToString(e)),this.stream.write(_n.whiteSpace)}},t.prototype.updateY=function(t){return-t},t.prototype.write=function(t){var e="";e+=t,e+=_n.newLine,this.writeOperator(e)},t.prototype.writeComment=function(t){if(!(null!=t&&t.length>0))throw new Error("Invalid comment");var e="";e+=_n.comment,e+=_n.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(_n.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+=" "+_n.setDashPattern,this.stream.write(i),this.stream.write(_n.newLine)},t.prototype.setMiterLimit=function(t){this.stream.write($n.floatToString(t)),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setMiterLimit)},t.prototype.setLineWidth=function(t){this.stream.write($n.floatToString(t)),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setLineWidth)},t.prototype.setLineCap=function(t){this.stream.write(t.toString()),this.stream.write(_n.whiteSpace),this.writeOperator(_n.setLineCapStyle)},t.prototype.setLineJoin=function(t){this.stream.write(t.toString()),this.stream.write(_n.whiteSpace),this.writeOperator(_n.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 zo&&e instanceof zo&&i instanceof zo?(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(_n.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(_n.whiteSpace)}null!=e&&(this.stream.write(e.toString()),this.stream.write(_n.whiteSpace)),i?this.writeOperator(_n.setColorAndPatternStroking):this.writeOperator(_n.setColorAndPattern)},t}(),js=function(){function t(t,e){this.pdfColor=new Vo(0,0,0),this.dashOffsetValue=0,this.penDashPattern=[0],this.pdfDashStyle=ko.Solid,this.pdfLineCap=0,this.pdfLineJoin=0,this.penWidth=1,this.internalMiterLimit=0,this.colorSpace=jo.Rgb,t instanceof Wo?this.setBrush(t):t instanceof Vo&&(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 ko.Custom:break;case ko.Dash:this.penDashPattern=[3,1];break;case ko.Dot:this.penDashPattern=[1,1];break;case ko.DashDot:this.penDashPattern=[3,1,1,1];break;case ko.DashDotDot:this.penDashPattern=[3,1,1,1,1,1];break;case ko.Solid:break;default:this.pdfDashStyle=ko.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 qo&&(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}(),Rs=function(){function t(t){this.radDegFactor=180/Math.PI,this.transformationMatrix=new Is(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+=$n.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}(),Is=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 zo(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}(),As=function(){return function(){this.pdf="PDF",this.text="Text",this.imageB="ImageB",this.imageC="ImageC",this.imageI="ImageI"}}(),Ns=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}(),Fs=function(){function t(t,e,i){this.dictionary=new Wn,this.dictionaryProperties=new Hn,this.dictionary.items.setValue(this.dictionaryProperties.CA,new $n(t)),this.dictionary.items.setValue(this.dictionaryProperties.ca,new $n(e)),this.dictionary.items.setValue(this.dictionaryProperties.BM,new Gn(i.toString()))}return Object.defineProperty(t.prototype,"element",{get:function(){return this.dictionary},enumerable:!0,configurable:!0}),t}(),Vs=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}(),zs=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}(),Gs=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)}}(),_s=function(t){function e(){var e=t.call(this)||this;return e.internalBounds=new _o(0,0,0,0),e.internalTemplateSize=new Go(0,0),e}return Gs(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 Go(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 zo(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 zo(0,0);this.draw(t,r)}else if(e instanceof zo)this.draw(t,e.x,e.y);else{this.drawHelper(t,e,i);var n=new Hs(this,new zo(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 qo(new Vo(0,0,0)):this.internalBrush},e.prototype.getFont=function(){return void 0===this.internalFont||null==this.internalFont?al.defaultFont:this.internalFont},e.prototype.getPageFromGraphics=function(t){if(void 0!==t.page&&null!==t.page){return t.page}return t.currentPage},e}(zs),Hs=function(){function t(e,i,r,n){this.pageNumberFieldLocation=new zo,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 zo&&e instanceof _s?(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}(),Ws=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}(),Us=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"}(Ms||(Ms={}));var qs,Ks=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=Ms.Unknown,this.mbitsPerComponent=8,this.dictionaryProperties=new Hn,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===Ms.Unknown&&this.checkIfJpeg()&&(this.mFormat=Ms.Jpeg,this.parseJpegImage()),this.reset(),this.mImageData=new Ws(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 Ws(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===Ms.Jpeg){this.imageData.internalBuffer.length;this.imageStream=new mo,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 Gn(this.dictionaryProperties.xObject)),this.imageStream.items.setValue(this.dictionaryProperties.subtype,new Gn(this.dictionaryProperties.image)),this.imageStream.items.setValue(this.dictionaryProperties.width,new $n(this.width)),this.imageStream.items.setValue(this.dictionaryProperties.height,new $n(this.height)),this.imageStream.items.setValue(this.dictionaryProperties.bitsPerComponent,new $n(this.bitsPerComponent)),this.imageStream.items.setValue(this.dictionaryProperties.filter,new Gn(this.dictionaryProperties.dctdecode)),this.imageStream.items.setValue(this.dictionaryProperties.colorSpace,new Gn(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 Wn;return t.items.setValue(this.dictionaryProperties.columns,new $n(this.width)),t.items.setValue(this.dictionaryProperties.blackIs1,new Us(!0)),t.items.setValue(this.dictionaryProperties.k,new $n(-1)),t.items.setValue(this.dictionaryProperties.predictor,new $n(15)),t.items.setValue(this.dictionaryProperties.bitsPerComponent,new $n(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 Ws(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}(),Ys=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}(),Js=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 Go(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=Ys.horizontalResolution,o=Ys.verticalResolution;return this.getPointSize(t,e,n,o)}var s=new Ys(i),a=new Ys(r),l=s.convertUnits(t,Io.Pixel,Io.Point),h=a.convertUnits(e,Io.Pixel,Io.Point);return new Go(l,h)},t}(),Xs=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)}}(),$s=function(t){function e(e){var i=t.call(this)||this;return i.imageStatus=!0,i.dictionaryProperties=new Hn,i.loadImage(e),i}return Xs(e,t),e.prototype.loadImage=function(t){this.initializeAsync(t)},e.prototype.initializeAsync=function(t){var e=new Ws(t.length);e.writeFromBase64String(t),this.decoder=new Ks(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}(Js),Qs=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}(),Zs=function(){return function(){}}(),ta=function(){return function(){}}(),ea=function(){return function(){}}(),ia=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}(),ra=function(){return function(){}}(),na=function(){return function(){}}(),oa=function(){return function(){}}(),sa=function(){return function(){}}(),aa=function(){return function(){}}(),la=function(){return function(){}}(),ha=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}(),ua=function(){return function(){}}(),ca=function(){return function(){}}(),pa=function(){return function(){}}(),da=function(){return function(){}}(),fa=function(){return function(){}}(),ga=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}(),ma=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 zn),this.macintoshDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"microsoft",{get:function(){return null!==this.microsoftDictionary&&void 0!==this.microsoftDictionary||(this.microsoftDictionary=new zn),this.microsoftDictionary},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"macintoshGlyphs",{get:function(){return null!==this.internalMacintoshGlyphs&&void 0!==this.internalMacintoshGlyphs||(this.internalMacintoshGlyphs=new zn),this.internalMacintoshGlyphs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"microsoftGlyphs",{get:function(){return null!==this.internalMicrosoftGlyphs&&void 0!==this.internalMicrosoftGlyphs||(this.internalMicrosoftGlyphs=new zn),this.internalMicrosoftGlyphs},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){void 0===this.metrics&&(this.metrics=new ia),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 zn);for(var e=0;e<t;++e){var i=new Qs,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 zn;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 Zs;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 ta;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 ea;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 ra;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 na;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 oa;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 sa;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 la;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 aa;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===Zo.Macintosh?ts.Macintosh:ts.Microsoft;if(r!==Zo.Unknown)switch(i){case Qo.Apple:this.readAppleCmapTable(t,r);break;case Qo.Microsoft:this.readMicrosoftCmapTable(t,r);break;case Qo.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 ha;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===Zo.Unicode?this.microsoft:this.macintosh,n=new pa;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 ha;c.index=a,c.width=this.getWidth(c.index);var p=e===Zo.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 da;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 ha;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 Qs;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=Zo.Unknown;return t==ts.Microsoft&&e==es.Undefined?i=Zo.Symbol:t==ts.Microsoft&&e==es.Unicode?i=Zo.Unicode:t==ts.Macintosh&&e==is.Roman&&(i=Zo.Macintosh),i},t.prototype.addGlyph=function(t,e){var i=null;switch(e){case Zo.Unicode:i=this.microsoftGlyphs;break;case Zo.Macintosh:case Zo.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)===Zo.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 Ho(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(as.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 ua,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 zn,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 fa;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&ns.MoreComponents))break;s=0!=(a&ns.Arg1And2AreWords)?4:2,0!=(a&ns.WeHaveScale)?s+=2:0!=(a&ns.WeHaveAnXyScale)?s+=4:0!=(a&ns.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 ga(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 ga(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 ia;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!==as.whiteSpace.charCodeAt(0)&&(this.isFontPresent=!0)):r!==as.whiteSpace.charCodeAt(0)&&(this.isFontPresent=!1),t===as.whiteSpace&&null===i&&(i=new ha);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 zn,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 ha,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}(),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)}}(),ba=function(){function t(){this.lineGap=0}return t.prototype.getAscent=function(t){return this.ascent*ps.charSizeMultiplier*this.getSize(t)},t.prototype.getDescent=function(t){return this.descent*ps.charSizeMultiplier*this.getSize(t)},t.prototype.getLineGap=function(t){return this.lineGap*ps.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 Xo.SubScript:e/=this.subScriptSizeFactor;break;case Xo.SuperScript:e/=this.superscriptSizeFactor}return e},t.prototype.clone=function(){return this.widthTable=va.clone(),this},Object.defineProperty(t.prototype,"widthTable",{get:function(){return this.internalWidthTable},set:function(t){this.internalWidthTable=t},enumerable:!0,configurable:!0}),t}(),va=function(){function t(){}return t.clone=function(){return null},t}(),wa=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 ya(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 Qn(this.widths)},e}(va),Sa=function(){function t(t,e){if(this.nameString="ABCDEFGHIJKLMNOPQRSTUVWXYZ",this.dictionaryProperties=new Hn,this.isCompress=!1,this.isEmbedFont=!1,this.cmapPrefix="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap"+_n.newLine+"/CIDSystemInfo << /Registry (Adobe)/Ordering (UCS)/Supplement 0>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange"+_n.newLine,this.cmapEndCodespaceRange="endcodespacerange"+_n.newLine,this.cmapBeginRange="beginbfrange"+_n.newLine,this.cmapEndRange="endbfrange"+_n.newLine,this.cmapSuffix="endbfrange\nendcmap\nCMapName currentdict /CMap defineresource pop\nend end"+_n.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 Ws(this.fontString.length);t.writeFromBase64String(this.fontString),this.fontData=t.internalBuffer,this.ttfReader=new ma(this.fontData),this.ttfMetrics=this.ttfReader.metrics},t.prototype.createInternals=function(){this.fontDictionary=new Wn,this.fontProgram=new mo,this.cmap=new mo,this.descendantFont=new Wn,this.metrics=new ba,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 wa(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 qn(this),this.descendantFont.items.setValue(this.dictionaryProperties.type,new Gn(this.dictionaryProperties.font)),this.descendantFont.items.setValue(this.dictionaryProperties.subtype,new Gn(this.dictionaryProperties.cIDFontType2)),this.descendantFont.items.setValue(this.dictionaryProperties.baseFont,new Gn(this.subsetName)),this.descendantFont.items.setValue(this.dictionaryProperties.cIDToGIDMap,new Gn(this.dictionaryProperties.identity)),this.descendantFont.items.setValue(this.dictionaryProperties.dw,new $n(1e3)),this.fontDescriptor=this.createFontDescriptor(),this.descendantFont.items.setValue(this.dictionaryProperties.fontDescriptor,new Po(this.fontDescriptor));var t=this.createSystemInfo();this.descendantFont.items.setValue(this.dictionaryProperties.cIDSystemInfo,t)},t.prototype.createFontDescriptor=function(){var t=new Wn,e=this.ttfReader.metrics;return t.isFont=!0,t.items.setValue(this.dictionaryProperties.type,new Gn(this.dictionaryProperties.fontDescriptor)),t.items.setValue(this.dictionaryProperties.fontName,new Gn(this.subsetName)),t.items.setValue(this.dictionaryProperties.flags,new $n(this.getDescriptorFlags())),t.items.setValue(this.dictionaryProperties.fontBBox,Qn.fromRectangle(this.getBoundBox())),t.items.setValue(this.dictionaryProperties.missingWidth,new $n(e.widthTable[32])),t.items.setValue(this.dictionaryProperties.stemV,new $n(e.stemV)),t.items.setValue(this.dictionaryProperties.italicAngle,new $n(e.italicAngle)),t.items.setValue(this.dictionaryProperties.capHeight,new $n(e.capHeight)),t.items.setValue(this.dictionaryProperties.ascent,new $n(e.winAscent)),t.items.setValue(this.dictionaryProperties.descent,new $n(e.winDescent)),t.items.setValue(this.dictionaryProperties.leading,new $n(e.leading)),t.items.setValue(this.dictionaryProperties.avgWidth,new $n(e.widthTable[32])),t.items.setValue(this.dictionaryProperties.fontFile2,new Po(this.fontProgram)),t.items.setValue(this.dictionaryProperties.maxWidth,new $n(e.widthTable[32])),t.items.setValue(this.dictionaryProperties.xHeight,new $n(0)),t.items.setValue(this.dictionaryProperties.stemH,new $n(0)),t},t.prototype.createCmap=function(){this.cmap.cmapBeginSave=new yo(this)},t.prototype.createFontDictionary=function(){this.fontDictionary.isFont=!0,this.fontDictionary.fontDictionaryBeginSave=new Kn(this),this.fontDictionary.items.setValue(this.dictionaryProperties.type,new Gn(this.dictionaryProperties.font)),this.fontDictionary.items.setValue(this.dictionaryProperties.baseFont,new Gn(this.subsetName)),this.fontDictionary.items.setValue(this.dictionaryProperties.subtype,new Gn(this.dictionaryProperties.type0)),this.fontDictionary.items.setValue(this.dictionaryProperties.encoding,new Gn(this.dictionaryProperties.identityH));var t=new Qn,e=new Po(this.descendantFont);t.isFont=!0,t.add(e),this.fontDictionary.items.setValue(this.dictionaryProperties.descendantFonts,t)},t.prototype.createFontProgram=function(){this.fontProgram.fontProgramBeginSave=new bo(this)},t.prototype.createSystemInfo=function(){var t=new Wn;return t.items.setValue(this.dictionaryProperties.registry,new wo("Adobe")),t.items.setValue(this.dictionaryProperties.ordering,new wo(this.dictionaryProperties.identity)),t.items.setValue(this.dictionaryProperties.supplement,new $n(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 Po(this.cmap))},t.prototype.fontProgramBeginSave=function(){this.isCompress=!0,this.generateFontProgram()},t.prototype.getDescendantWidth=function(){var t=new Qn;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 Qn;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 $n(o)),0!==r&&t.add(l),o=h.index,l=new Qn),l.add(new $n(h.width)),r+1===e.length&&(t.add(new $n(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)+_n.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+=_n.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 zn: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|=rs.FixedPitch),e.isSymbol?t|=rs.Symbolic:t|=rs.Nonsymbolic,e.isItalic&&(t|=rs.Italic),e.isBold&&(t|=rs.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 _o(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 zn);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}(),Pa=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 zn;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 Ca,a=new Ca;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 Ca).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}(),Ca=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}(),xa=function(){function t(){this.indexes=[],this.indexLevels=[],this.mirroringShapeCharacters=new zn,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 Oa;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}(),Oa=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}(),Ba=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 Pa).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!==No.None){o=(new xa).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!==No.None){var a=(new Pa).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=wo.toUnicodeArray(r,!1);return r=wo.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"}(qs||(qs={}));var La;!function(t){t[t.FitPage=0]="FitPage",t[t.FitElement=1]="FitElement",t[t.FitColumnsToPage=2]="FitColumnsToPage"}(La||(La={}));var Ta;!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"}(Ta||(Ta={}));var Ma,Da=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)}}(),ka=function(t){function e(e){var i=t.call(this)||this;return i.mbackground=new Vo(255,255,255),i.mbStroking=!1,i.mfunction=null,i.dictionaryProperties=new Hn,i.mpatternDictionary=new Wn,i.mpatternDictionary.items.setValue(i.dictionaryProperties.type,new Gn(i.dictionaryProperties.pattern)),i.mpatternDictionary.items.setValue(i.dictionaryProperties.patternType,new $n(2)),i.shading=e,i.colorSpace=jo.Rgb,i}return Da(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 Us(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 Po(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 Gn(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 Wn),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 Po(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 Qn(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 jo.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 Us(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}(Wo),Ea=function(){function t(t,e){if(this.dictionaryProperties=new Hn,this.writeTransformation=!0,void 0===t);else if(t instanceof Go&&void 0===e){this.content=new mo;var i=new Go(t.width,t.height);this.setSize(i),this.initialize()}else this.content=new mo,this.setSize(new Go(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 Va(this),e=new Fa(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 Ra,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 Gn(this.dictionaryProperties.xObject);this.content.items.setValue(this.dictionaryProperties.type,t)},t.prototype.addSubType=function(){var t=new Gn(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 _o(new zo(0,0),t),i=Qn.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}(),ja=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)}}(),Ra=function(t){function e(e){var i=t.call(this,e)||this;return i.properties=new Wn,i}return ja(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 Gn(r),this.names.setValue(e,i),t instanceof ps?this.add(t,i):t instanceof Ea?this.add(t,i):t instanceof ka||t instanceof Na?this.add(t,i):t instanceof Fs?this.add(t,i):(t instanceof Js||t instanceof $s)&&this.add(t,i)}return i},e.prototype.getNames=function(){null==this.pdfNames&&(this.pdfNames=new Ns);var t=this.items.getValue(this.dictionaryProperties.font);if(null!=t){Ss.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 Qn,this.items.setValue(this.dictionaryProperties.procset,e));var i=new Gn(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 Gn(t)){e=i[r];break}null!=e&&this.pdfNames.remove(e)},e.prototype.generateName=function(){return Ia.getNewGuidString()},e.prototype.add=function(t,e){if(t instanceof ps){var i=null,r=this.items.getValue(this.dictionaryProperties.font);if(null!=r){var n=r;i=r,i=r}else i=new Wn,this.items.setValue(this.dictionaryProperties.font,i);i.items.setValue(e.value,new Po(t.element))}else if(t instanceof Ea){var o=void 0;null==(o=this.items.getValue(this.dictionaryProperties.xObject))&&(o=new Wn,this.items.setValue(this.dictionaryProperties.xObject,o)),o.items.setValue(e.value,new Po(t.element))}else if(t instanceof Wo){if(t instanceof ka||t instanceof Na){if(null!=(a=t.element)){var s=this.items.getValue(this.dictionaryProperties.pattern);null==s&&(s=new Wn,this.items.setValue(this.dictionaryProperties.pattern,s)),s.items.setValue(e.value,new Po(a))}}}else if(t instanceof Fs){var a=t.element,l=null;null==(l=this.items.getValue(this.dictionaryProperties.extGState))&&(l=new Wn,this.items.setValue(this.dictionaryProperties.extGState,l)),l.items.setValue(e.value,new Po(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 Wn,this.pdfDocument.sections.element.items.getValue(this.dictionaryProperties.resources).items.setValue(this.dictionaryProperties.xObject,h);if(null==o&&(o=new Wn,this.Dictionary.items.setValue(this.dictionaryProperties.xObject,o)),u&&void 0!==c)o.items.setValue(e.value,c);else{n=new Po(t.element);o.items.setValue(e.value,n),void 0!==this.pdfDocument&&h.items.setValue(e.value,n)}}},e}(Wn),Ia=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}(),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)}}(),Na=function(t){function e(e,i){var r=t.call(this)||this;r.mStroking=!1,r.mLocation=new zo(0,0),r.mDictionaryProperties=new Hn;var n=null;return e instanceof Ho?n=e:e instanceof Go&&(n=new Ho(0,0,e.width,e.height)),null!==i&&i instanceof Ja&&(r.mPage=i),r.brushStream=new mo,r.mResources=new Ra,r.brushStream.items.setValue(r.mDictionaryProperties.resources,r.mResources),r.setBox(n),r.setObligatoryFields(),null!==i&&i instanceof Ja&&(r.mPage=i,r.graphics.colorSpace=i.document.colorSpace),r}return Aa(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 mo;var n=new Ra;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 $n(1)),this.brushStream.items.setValue(this.mDictionaryProperties.paintType,new $n(1)),this.brushStream.items.setValue(this.mDictionaryProperties.tilingType,new $n(1)),this.brushStream.items.setValue(this.mDictionaryProperties.xStep,new $n(this.mBox.right-this.mBox.left)),this.brushStream.items.setValue(this.mDictionaryProperties.yStep,new $n(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 Qn([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 Qn([e[0],e[1],e[2],e[3],e[4],t]))}},e.prototype.setBox=function(t){this.mBox=t;var e=new _o(this.mBox.left,this.mBox.top,this.mBox.right,this.mBox.bottom);this.brushStream.items.setValue(this.mDictionaryProperties.bBox,Qn.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 Va(this),e=new Fa(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 Qn(this.mTransformationMatrix.matrix.elements)),t.brushStream.data=this.tempBrushStream.data,t.mResources=new Ra(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}(Wo),Fa=function(){function t(t,e,i){this.currentColorSpace=jo.Rgb,this.previousTextRenderingMode=To.Fill,this.previousCharacterSpacing=0,this.previousWordSpacing=0,this.previousTextScaling=100,this.procedureSets=new As,this.isNormalRender=!0,this.isUseFontSize=!1,this.isItalic=!1,this.isEmfTextScaled=!1,this.isEmf=!1,this.isEmfPlus=!1,this.isBaselineFormat=!0,this.emfScalingFactor=new Go(0,0),this.colorSpaceChanged=!1,this.dictionaryProperties=new Hn,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 Es?i:new Es(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 Go(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 Rs),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 Vs),this.internalAutomaticFields},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){this.bStateSaved=!1,this.currentPen=null,this.currentBrush=null,this.currentFont=null,this.currentColorSpace=jo.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 _o(new zo(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 Rs;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 zo(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 Hs(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 ps&&(i instanceof js||null===i)&&(r instanceof Wo||null===r)&&"number"==typeof n&&"number"==typeof o&&(s instanceof ss||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 ls).layout(t,e,g,new Go(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 _o(c,p,d,f),g),this.isEmfTextScaled=!1,this.emfScalingFactor=new Go(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 zo){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 js&&"number"==typeof e){var s=i;this.drawRectangle(t,null,e,s,r,n)}else if(t instanceof Wo&&"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 Na){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 zo(u,c),e.graphics.colorSpace=this.colorSpace}else e instanceof ka&&(e.colorSpace=this.colorSpace);e instanceof qo&&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,Eo.Winding,n)}else{var o=null!=t,s=null!=e,a=(n=i)===Eo.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 Rs;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(_n.restoreState),this.pdfStreamWriter.write(_n.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 _o(c,a,p,d)}else o=new _o(0,0,0,0);return o},t.prototype.checkCorrectLayoutRectangle=function(t,e,i,r){var n=new _o(e,i,t.width,t.width);if(null!=r){switch(r.alignment){case Lo.Center:n.x-=n.width/2;break;case Lo.Right:n.x-=n.width}switch(r.lineAlignment){case Bo.Middle:n.y-=n.height/2;break;case Bo.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===Xo.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 _o(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,Eo.Winding):(this.pdfStreamWriter.appendRectangle(t),this.pdfStreamWriter.clipPath(e===Eo.Alternate))},t.prototype.applyStringSettings=function(t,e,i,r,n){i instanceof Na?(this.bCSInitialized=!1,i.graphics.colorSpace=this.colorSpace):i instanceof ka&&(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!==Bo.Top)switch(i.lineAlignment){case Bo.Middle:r=(e-t)/2;break;case Bo.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 wo(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===Lo.Justify),a=i,l=this.justifyLine(t,e.width,r),h=new Ba;if(o||null!==r&&void 0!==r&&r.textDirection!==No.None){var u=null,c=null!==r&&void 0!==r&&r.alignment===Lo.Right,p=null;p=(u=null!==r&&void 0!==r&&r.textDirection!==No.None?h.layout(n,a,r.textDirection===No.RightToLeft,s,r):h.layout(n,a,c,s,r)).length>1?null!==r&&void 0!==r&&r.textDirection!==No.None?h.splitLayout(n,a,r.textDirection===No.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(as.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 wo(t);return e.converted=!0,e.encode=Nn.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 Sa){var r=e.fontInternal.ttfReader;e.setSymbols(t),i=r.convertString(t);var n=wo.toUnicodeArray(i,!1);i=wo.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=as.spaces,l=as.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===Lo.Justify,s=e>=0&&n<e,a=as.spaces,l=as.getCharsCount(r,a)>0&&r[0]!==as.whiteSpace,h=(t.lineType&os.LayoutBreak)>0;return o&&s&&l&&(h||i.alignment===Lo.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 js(t.color,n):null!=e&&(o=new js(e,n)),o},t.prototype.getTextRenderingMode=function(t,e,i){var r=To.None;return r=null!=t&&null!=e?To.FillStroke:null!=t?To.Stroke:To.Fill,null!=i&&i.clipPath&&(r|=To.ClipFlag),r},t.prototype.getLineIndent=function(t,e,i,r){var n=0,o=(t.lineType&os.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!==Lo.Left)switch(i.alignment){case Lo.Center:r=(e-t)/2;break;case Lo.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!==No.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 ka&&(this.bCSInitialized=!1,e.colorSpace=this.colorSpace),e instanceof Na&&(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!=jo.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 qo||t instanceof Na)){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:Xo.None,n=null!=this.currentStringFormat?this.currentStringFormat.subSuperScript:Xo.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,Ro.Normal);else if("number"==typeof e&&void 0===i)this.setTransparency(t,e,Ro.Normal);else{null==this.trasparencies&&(this.trasparencies=new Ns);var r=null,n=new Ga(t,e,i);this.trasparencies.containsKey(n)&&(r=this.trasparencies.getValue(n)),null==r&&(r=new Fs(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 _o&&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 _o(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 Rs;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 Rs;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 Rs),i.scale(t,e),i},t.prototype.rotateTransform=function(t){var e=new Rs;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 Rs),e.rotate(this.updateY(t)),e},t.prototype.save=function(){var t=new za(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 Na?(this.bCSInitialized=!1,e.graphics.colorSpace=this.colorSpace):e instanceof ka&&(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 _o?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 Ta.Start:this.pdfStreamWriter.beginPath(s.x,s.y);break;case Ta.Bezier3:var a=new zo(0,0),l=new zo(0,0),h=this.getBezierPoints(e,i,n,a,l);this.pdfStreamWriter.appendBezierSegment(s,h.p2,h.p3),n=h.i;break;case Ta.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)!==Ta.Bezier3)throw new Error("ArgumentException : errorMsg");if(n=e[r],++r,(i[r]&t.pathTypesValuesMask)!==Ta.Bezier3)throw new Error("ArgumentException : errorMsg");return o=e[r],{i:r,p2:n,p3:o}},t.prototype.checkFlags=function(t){(t&Ta.CloseSubpath)===Ta.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}(),Va=function(){function t(t){this.sender=t}return t.prototype.getResources=function(){return this.sender.getResources()},t}(),za=function(){function t(t,e){this.internalTextRenderingMode=To.Fill,this.internalCharacterSpacing=0,this.internalWordSpacing=0,this.internalTextScaling=100,this.pdfColorSpace=jo.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}(),Ga=function(){return function(t,e,i){this.alphaPen=t,this.alphaBrush=e,this.blendMode=i}}(),_a=function(){function t(t,e){if(this.pdfColorSpace=jo.Rgb,this.isVisible=!0,this.sublayer=!1,this.contentLength=0,this.dictionaryProperties=new Hn,null===t)throw new Error("ArgumentNullException:page");if(this.pdfPage=t,this.clipPageTemplates=!0,void 0===e)this.content=new mo;else if(e instanceof mo||null===e){if(null===e)throw new Error("ArgumentNullException:stream");this.content=e}else this.content=new mo,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 Ua(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 Va(this.page);if(this.pdfGraphics=new Fa(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}(),Ha=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}(),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)||this;if(i.parentLayerCount=0,i.sublayer=!1,i.optionalContent=new Wn,e instanceof qa){i.page=e;var r=e;i.parseLayers(r)}return i}return Wa(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 _a(this.page);return i.name="",this.add(i),i}if(t instanceof _a){var r=this.list.push(t);return this.addLayer(r,t),r}return 0},e.prototype.addLayer=function(t,e){var i=new Po(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 Po(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 mo,r=new mo,n=[];n.push("q"),i.data=n,e.insert(0,new Po(i)),(n=[]).push("Q"),r.data=n,e.insert(e.count,new Po(r))},e.prototype.indexOf=function(t){if(null==t)throw new Error("ArgumentNullException: layer");return this.list.indexOf(t)},e}(Ha),qa=function(){function t(t){this.defLayerIndex=-1,this.modified=!1,this.dictionaryProperties=new Hn,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 Ua(this)),this.layerCollection},enumerable:!0,configurable:!0}),t.prototype.getResources=function(){return null==this.resources&&(this.resources=new Ra,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 Qn,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}(),Ka=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 Hn,this.internalAnnotations=new Qn,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 Po(t)),this.lists.push(t);var e=(new ls).layout(t.text,t.font,t.stringFormat,new Go(t.bounds.width,0),!1,new Go(0,0)),i=t.bounds.y;if(1===e.lines.length){var r=t.font.measureString(e.lines[0].text);t.bounds=new _o(new zo(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 Po(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 _o(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 Po(t)),this.lists.push(t),i+=t.bounds.height;else{var o=t.clone();o.bounds=new _o(new zo(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 Po(o)),this.lists.push(o),i+=o.bounds.height}}},t.prototype.setColor=function(t){var e=jo.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}(),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)}}(),Ja=function(t){function e(){var e=t.call(this,new Wn)||this;return e.annotationCollection=null,e.beginSave=null,e.initialize(),e}return Ya(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 Ka(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 Gn("Page")),this.dictionary.pageBeginDrawTemplate=new Xn(this)},e.prototype.setSection=function(t){this.section=t,this.dictionary.items.setValue(this.dictionaryProperties.parent,new Po(t))},e.prototype.resetProgress=function(){this.isProgressOn=!1},e.prototype.getClientSize=function(){var t=this.section.getActualBounds(this,!0);return new Go(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 _a(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 _a(this,!1);this.layers.add(n),this.section.drawTemplates(this,n,t,!0)}},e}(qa),Xa=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}(),$a=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}(),Qa=function(){function t(){}return Object.defineProperty(t.prototype,"left",{get:function(){return this.leftTemplate},set:function(t){this.leftTemplate=this.checkElement(t,Ts.Left)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.topTemplate},set:function(t){this.topTemplate=this.checkElement(t,Ts.Top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.rightTemplate},set:function(t){this.rightTemplate=this.checkElement(t,Ts.Right)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.bottomTemplate},set:function(t){this.bottomTemplate=this.checkElement(t,Ts.Bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"EvenLeft",{get:function(){return this.evenLeft},set:function(t){this.evenLeft=this.checkElement(t,Ts.Left)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"EvenTop",{get:function(){return this.evenTop},set:function(t){this.evenTop=this.checkElement(t,Ts.Top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"EvenRight",{get:function(){return this.evenRight},set:function(t){this.evenRight=this.checkElement(t,Ts.Right)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"EvenBottom",{get:function(){return this.evenBottom},set:function(t){this.evenBottom=this.checkElement(t,Ts.Bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OddLeft",{get:function(){return this.oddLeft},set:function(t){this.oddLeft=this.checkElement(t,Ts.Left)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OddTop",{get:function(){return this.oddTop},set:function(t){this.oddTop=this.checkElement(t,Ts.Top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OddRight",{get:function(){return this.oddRight},set:function(t){this.oddRight=this.checkElement(t,Ts.Right)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OddBottom",{get:function(){return this.oddBottom},set:function(t){this.oddBottom=this.checkElement(t,Ts.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!==Ts.None)throw new Error("NotSupportedException:Can not reassign the template element. Please, create new one.");t.type=e}return t},t}(),Za=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(){var e=t.call(this)||this;return e.leftValue=e.topValue=e.rightValue=e.bottomValue=e.stampValue=!0,e}return Za(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}(Qa),el=function(){function t(t,e){this.pageAdded=new Xa,this.pdfPages=[],this.dictionaryProperties=new Hn,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 Po(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 tl),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 $a(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 Qn,this.section=new Wn,this.state=new il(this.pdfDocument),this.section.sectionBeginSave=new Jn(this,this.state),this.pageCount=new $n(0),this.section.items.setValue(this.dictionaryProperties.count,this.pageCount),this.section.items.setValue(this.dictionaryProperties.type,new Gn(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 Ja;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 Po(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 Po(t);return this.pagesReferences.indexOf(i)},t.prototype.pageAddedMethod=function(t){var e=new Xa(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 Ja&&"boolean"==typeof e){var r=this.parent.document;return this.getActualBounds(r,t,e)}t=t,e=e,i=i;var n=new _o(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 _o(i.origin,i.size);t.items.setValue(this.dictionaryProperties.mediaBox,Qn.fromRectangle(r));var n=0;n=rl.rotateFactor*i.rotate;var o=new $n(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}(),il=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}(),rl=function(){function t(t){this.sections=[],this.dictionaryProperties=new Hn,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 $n(0),this.sectionCollection=new Qn,this.pages=new Wn,this.pages.beginSave=new Un(this),this.pages.items.setValue(this.dictionaryProperties.type,new Gn("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 Wn),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 _o(new zo,e.size);t.items.setValue(this.dictionaryProperties.mediaBox,Qn.fromRectangle(i))},t.prototype.add=function(t){if(void 0===t){var e=new el(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 Po(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}(),nl=function(){function t(t){this.pdfPageCollectionIndex=new zn,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 Ja;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}(),ol=function(){function t(){this.referenceObjects=[],this.pdfFontCollection=new zn}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}(),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(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 ol,n=!1):n=i;var o=new gs;r.setMainObjectCollection(o);var s=new Ss;s.isMerging=n,s.document=r,r.setCrossTable(s);var a=new ws;return r.setCatalog(a),o.add(a),a.position=-1,r.sectionCollection=new rl(r),r.documentPageCollection=new nl(r),a.pages=r.sectionCollection,r}return sl(e,t),Object.defineProperty(e,"defaultFont",{get:function(){return null==this.defaultStandardFont&&(this.defaultStandardFont=new ul(Ko.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 ks(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 ol: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===jo.Rgb||this.pdfColorSpace===jo.Cmyk||this.pdfColorSpace===jo.GrayScale?this.pdfColorSpace:jo.Rgb},set:function(t){t===jo.Rgb||t===jo.Cmyk||t===jo.GrayScale?this.pdfColorSpace=t:this.pdfColorSpace=jo.Rgb},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"template",{get:function(){return null==this.pageTemplate&&(this.pageTemplate=new Qa),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 ds(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}(ys),ll=function(){function t(){}return t.getMetrics=function(t,e,i){var r=null;switch(t){case Ko.Helvetica:r=this.getHelveticaMetrics(t,e,i);break;case Ko.Courier:r=this.getCourierMetrics(t,e,i);break;case Ko.TimesRoman:r=this.getTimesMetrics(t,e,i);break;case Ko.Symbol:r=this.getSymbolMetrics(t,e,i);break;case Ko.ZapfDingbats:r=this.getZapfDingbatsMetrics(t,e,i);break;default:r=this.getHelveticaMetrics(Ko.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 ba;return(e&Fo.Bold)>0&&(e&Fo.Italic)>0?(r.ascent=this.helveticaBoldItalicAscent,r.descent=this.helveticaBoldItalicDescent,r.postScriptName=this.helveticaBoldItalicName,r.size=i,r.widthTable=new wa(this.arialBoldWidth),r.height=r.ascent-r.descent):(e&Fo.Bold)>0?(r.ascent=this.helveticaBoldAscent,r.descent=this.helveticaBoldDescent,r.postScriptName=this.helveticaBoldName,r.size=i,r.widthTable=new wa(this.arialBoldWidth),r.height=r.ascent-r.descent):(e&Fo.Italic)>0?(r.ascent=this.helveticaItalicAscent,r.descent=this.helveticaItalicDescent,r.postScriptName=this.helveticaItalicName,r.size=i,r.widthTable=new wa(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 wa(this.arialWidth),r.height=r.ascent-r.descent),r},t.getCourierMetrics=function(t,e,i){var r=new ba;return(e&Fo.Bold)>0&&(e&Fo.Italic)>0?(r.ascent=this.courierBoldItalicAscent,r.descent=this.courierBoldItalicDescent,r.postScriptName=this.courierBoldItalicName,r.size=i,r.widthTable=new wa(this.fixedWidth),r.height=r.ascent-r.descent):(e&Fo.Bold)>0?(r.ascent=this.courierBoldAscent,r.descent=this.courierBoldDescent,r.postScriptName=this.courierBoldName,r.size=i,r.widthTable=new wa(this.fixedWidth),r.height=r.ascent-r.descent):(e&Fo.Italic)>0?(r.ascent=this.courierItalicAscent,r.descent=this.courierItalicDescent,r.postScriptName=this.courierItalicName,r.size=i,r.widthTable=new wa(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 wa(this.fixedWidth),r.height=r.ascent-r.descent),r},t.getTimesMetrics=function(t,e,i){var r=new ba;return(e&Fo.Bold)>0&&(e&Fo.Italic)>0?(r.ascent=this.timesBoldItalicAscent,r.descent=this.timesBoldItalicDescent,r.postScriptName=this.timesBoldItalicName,r.size=i,r.widthTable=new wa(this.timesRomanBoldItalicWidths),r.height=r.ascent-r.descent):(e&Fo.Bold)>0?(r.ascent=this.timesBoldAscent,r.descent=this.timesBoldDescent,r.postScriptName=this.timesBoldName,r.size=i,r.widthTable=new wa(this.timesRomanBoldWidth),r.height=r.ascent-r.descent):(e&Fo.Italic)>0?(r.ascent=this.timesItalicAscent,r.descent=this.timesItalicDescent,r.postScriptName=this.timesItalicName,r.size=i,r.widthTable=new wa(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 wa(this.timesRomanWidth),r.height=r.ascent-r.descent),r},t.getSymbolMetrics=function(t,e,i){var r=new ba;return r.ascent=this.symbolAscent,r.descent=this.symbolDescent,r.postScriptName=this.symbolName,r.size=i,r.widthTable=new wa(this.symbolWidth),r.height=r.ascent-r.descent,r},t.getZapfDingbatsMetrics=function(t,e,i){var r=new ba;return r.ascent=this.zapfDingbatsAscent,r.descent=this.zapfDingbatsDescent,r.postScriptName=this.zapfDingbatsName,r.size=i,r.widthTable=new wa(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}(),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)}}(),ul=function(t){function e(i,r,n){var o=t.call(this,r,void 0===n?i instanceof e?i.style:Fo.Regular:n)||this;return o.dictionaryProperties=new Hn,o.encodings=["Unknown","StandardEncoding","MacRomanEncoding","MacExpertEncoding","WinAnsiEncoding","PDFDocEncoding","IdentityH"],o.pdfFontFamily=void 0===i?Ko.Helvetica:i instanceof e?i.fontFamily:i,o.checkStyle(),o.initializeInternals(),o}return hl(e,t),Object.defineProperty(e.prototype,"fontFamily",{get:function(){return this.pdfFontFamily},enumerable:!0,configurable:!0}),e.prototype.checkStyle=function(){if(this.fontFamily===Ko.Symbol||this.fontFamily===Ko.ZapfDingbats){var t=this.style;t&=~(Fo.Bold|Fo.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*=ps.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=~(Fo.Underline|Fo.Strikeout),o=(this.style&n)==(i.style&n);e=r&&o}return e},e.prototype.initializeInternals=function(){al.cache.search(this);var t=null,e=ll.getMetrics(this.pdfFontFamily,this.style,this.size);this.metrics=e,t=this.createInternals(),this.setInternals(t)},e.prototype.createInternals=function(){var t=new Wn;if(t.items.setValue(this.dictionaryProperties.type,new Gn(this.dictionaryProperties.font)),t.items.setValue(this.dictionaryProperties.subtype,new Gn(this.dictionaryProperties.type1)),t.items.setValue(this.dictionaryProperties.baseFont,new Gn(this.metrics.postScriptName)),this.fontFamily!==Ko.Symbol&&this.fontFamily!==Ko.ZapfDingbats){var e=this.encodings[$o.WinAnsiEncoding];t.items.setValue(this.dictionaryProperties.encoding,new Gn(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}(ps),cl=function(){function t(t){this.dictionaryProperties=new Hn,this.pdfColor=new Vo(255,255,255),this.rectangle=new _o(0,0,0,0),this.pdfPage=null,this.textBrush=new qo(new Vo(0,0,0)),this.textFont=new ul(Ko.TimesRoman,10),this.format=new ss(Lo.Left),this.content="",this.pdfDictionary=new Wn,this.internalColor=new Vo,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 wo(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 Yn(this),this.pdfDictionary.items.setValue(this.dictionaryProperties.type,new Gn(this.dictionaryProperties.annot))},t.prototype.setPage=function(t){this.pdfPage=t,this.pdfDictionary.items.setValue(this.dictionaryProperties.p,new Po(this.pdfPage))},t.prototype.beginSave=function(){this.save()},t.prototype.save=function(){var t=new _o(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 zo(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,Qn.fromRectangle(t)),this.dictionary.items.setValue(this.dictionaryProperties.ca,new $n(this.darkness))},Object.defineProperty(t.prototype,"element",{get:function(){return this.pdfDictionary},enumerable:!0,configurable:!0}),t}(),pl=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)}}(),dl=function(t){function e(e){return t.call(this,e)||this}return pl(e,t),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.dictionary.items.setValue(this.dictionaryProperties.subtype,new Gn(this.dictionaryProperties.link))},e}(cl),fl=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){var i=t.call(this,e)||this;return i.pdfAction=null,i}return fl(e,t),e.prototype.getSetAction=function(t){if(void 0===t)return this.pdfAction;this.pdfAction=t},e}(dl),ml=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(e,i){var r=t.call(this,e)||this;return r.pdfDestination=null,void 0!==i&&(r.destination=i),r}ml(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}}(dl),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 _o(t.bounds.x,0,t.bounds.width,t.bounds.height)},t}()),bl=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 _o(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}(),vl=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 _o(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}(),wl=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}(),Sl=function(){function t(){var t=new js(new Vo(0,0,0));t.dashStyle=ko.Solid;var e=new js(new Vo(0,0,0));e.dashStyle=ko.Solid;var i=new js(new Vo(0,0,0));i.dashStyle=ko.Solid;var r=new js(new Vo(0,0,0));r.dashStyle=ko.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}(),Pl=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}(),Cl=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 zo&&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 _o&&void 0!==e.width&&void 0===i)return this.drawHelper(t,e,null);if(e instanceof zo&&void 0===e.width&&i instanceof bl)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&"number"==typeof i&&(r instanceof bl||null==r)){var n=t.graphics.clientSize.width-e,o=new _o(e,i,n,0);return this.drawHelper(t,o,r)}if(e instanceof _o&&void 0!==e.width&&"boolean"==typeof i)return this.bEmbedFonts=i,this.drawHelper(t,e,null);var s=new vl,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=Sl.default.right.width/2),0===s.bounds.y&&(u=Sl.default.top.width/2);var c=new _o(h,u,s.bounds.width,s.bounds.height);s.bounds=c}s.format=null!=l?l:new bl;return this.layout(s)},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),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 Bl;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 Ll(t.page,t.bounds,t.remainder,t.lastLineBounds)},e.prototype.layoutOnPage=function(t,e,i,r){var n=new Bl;n.remainder=t,n.page=e,i=this.checkCorrectBounds(e,i);var o=(new ls).layout(t,this.element.font,this.format,i,e.getClientSize().height,!1,new Go(0,0)),s=null==o.remainder,a=(r.format.break===La.FitElement||o.empty,e.graphics),l=this.element.getBrush();this.element instanceof jl&&(l.color=new Vo(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 _o(n,o+=l,s,a)},e}(yl),Bl=function(){return function(){}}(),Ll=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 xl(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}(wl),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,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 ps&&void 0===r?(s.content=e,s.elementValue=e,s.pdfFont=i):"string"==typeof e&&i instanceof ps&&r instanceof js&&void 0===n?(s.content=e,s.elementValue=e,s.pdfFont=i,s.pdfPen=r):"string"==typeof e&&i instanceof ps&&r instanceof Wo&&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 Tl(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 ul&&null!=this.content?this.elementValue=ul.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 qo(new Vo(0,0,0)):this.pdfBrush},e.prototype.layout=function(t){return new Ol(this).layout(t)},e.prototype.drawText=function(t,e,i,r){if(e instanceof zo&&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 _o&&void 0!==e.width&&void 0===i)return this.drawText(t,e,null);if(e instanceof zo&&void 0===e.width&&i instanceof bl)return this.hasPointOverload=!0,this.drawText(t,e.x,e.y,i);if("number"==typeof e&&"number"==typeof i&&(r instanceof bl||null==r)){this.hasPointOverload=!0;var n=t.graphics.clientSize.width-e,o=new _o(e,i,n,0);return this.drawText(t,o,r)}if(e instanceof _o&&void 0!==e.width&&"boolean"==typeof i)return this.drawText(t,e,null);var s=new ls;if(this.hasPointOverload){var a=s.layout(this.value,this.font,this.stringFormat,new Go(t.graphics.clientSize.width-e.x,0),!0,t.graphics.clientSize),l=void 0,h=e,u=i;if((m=new vl).page=t,m.bounds=h,m.format=null!=u?u:new bl,a.lines.length>1){if(this.text=a.layoutLines[0].text,m.bounds.y<=m.page.graphics.clientSize.height){var c=new zo(m.bounds.x,m.bounds.y);l=this.layout(m);for(var p=new _o(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 _o(new zo(p.x,p.y),new Go(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 _o(0,l.bounds.height,l.page.graphics.clientSize.width,a.lineHeight):new _o(0,0,l.page.graphics.clientSize.width,a.lineHeight),m.bounds=p),l=this.layout(m),d!==a.lines.length-1)p=new _o(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 Go(e.width,0),!1,t.graphics.clientSize);var m,y=void 0;h=e,u=i;if((m=new vl).page=t,m.bounds=h,m.format=null!=u?u:new bl,l.lines.length>1){if(this.text=l.layoutLines[0].text,m.bounds.y<=m.page.graphics.clientSize.height){c=new zo(m.bounds.x,m.bounds.y);y=this.layout(m);for(p=new _o(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 _o(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 _o(h.x,l.lineHeight,h.width,l.lineHeight):new _o(h.x,0,h.width,l.lineHeight),m.bounds=p),y=this.layout(m),d!==l.lines.length-1)p=new _o(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===Lo.Center?(t.bounds.x=r+(i-e)/2,t.bounds.width=e):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Lo.Right?(t.bounds.x=r+(i-e),t.bounds.width=e):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Lo.Justify?(t.bounds.x=r,t.bounds.width=i):(t.bounds.width=r,t.bounds.width=e),t},e}(Cl),Dl=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)}}(),kl=function(t){function e(e,i){var r=t.call(this,e)||this;return void 0!==i&&(r.uri=i),r}return Dl(e,t),Object.defineProperty(e.prototype,"uriAction",{get:function(){return void 0===this.pdfUriAction&&(this.pdfUriAction=new Oo),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 Gn(this.dictionaryProperties.link));this.uriAction.element;this.dictionary.items.setValue(this.dictionaryProperties.a,this.uriAction.element)},e}(gl),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)}}(),jl=function(t){function e(){var e=t.call(this)||this;e.uniformResourceLocator="",e.uriAnnotation=null,e.recalculateBounds=!1,e.defaultBorder=new Qn;for(var i=0;i<3;i++)e.defaultBorder.add(new $n(0));return e}return El(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 Ja){var i=new ls,r=this.font.style;if(e instanceof zo){this.recalculateBounds=!0,this.font.style=Fo.Underline;if(1===(a=i.layout(this.value,this.font,this.stringFormat,new Go(t.graphics.clientSize.width-e.x,0),!0,t.graphics.clientSize)).lines.length){var n=this.font.measureString(this.value),o=new _o(e,n);o=this.calculateBounds(o,n.width,t.graphics.clientSize.width,e.x),this.uriAnnotation=new kl(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 Go(e.width,0),!1,new Go(0,0));if(this.font.style=Fo.Underline,1===a.lines.length){n=this.font.measureString(this.value),o=new _o(new zo(e.x,e.y),n);o=this.calculateBounds(o,n.width,e.width,e.x),this.uriAnnotation=new kl(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 Ja;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 _o(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 _o(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 kl(s,this.url),this.uriAnnotation.dictionary.items.setValue("Border",this.defaultBorder),e.annotations.add(this.uriAnnotation),r=0!==n?this.drawText(e,new zo(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 _o(new zo(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 _o(i.x,0,i.width,o.height),s.y=0}this.uriAnnotation=new kl(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===Lo.Center?(t.x=r+(i-e)/2,t.width=e):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Lo.Right?(t.x=r+(i-e),t.width=e):null!=this.stringFormat&&void 0!==this.stringFormat&&this.stringFormat.alignment===Lo.Justify?(t.x=r,t.width=i):(t.width=r,t.width=e),t},e}(Ml),Rl=function(){function t(){}return t.convert=function(t,e){var i="";switch(e){case Os.None:i="";break;case Os.Numeric:i=t.toString();break;case Os.LowerLatin:i=this.arabicToLetter(t).toLowerCase();break;case Os.LowerRoman:i=this.arabicToRoman(t).toLowerCase();break;case Os.UpperLatin:i=this.arabicToLetter(t);break;case Os.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}(),Il=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}(),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(){var e=t.call(this)||this;return e.list=new Ns,e}return Al(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 Ea(this.getSize());this.list.setValue(e,new Il(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 zo(i.x+this.location.x,i.y+this.location.y);e.drawPdfTemplate(s,l,new Go(s.width*r,s.height*n))},e}(_s),Fl=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(e,i){var r=t.call(this)||this;return r.internalNumberStyle=Os.Numeric,void 0===i?r.font=e:i instanceof Wo?(r.font=e,r.brush=i):(r.font=e,r.bounds=i),r}Fl(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 Rl.convert(e,this.numberStyle)}}(Nl),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){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}Vl(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}}(Nl),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(){var e=t.call(this)||this;return e.list=new Ns,e.painterGraphics=[],e}return zl(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 zo(i.x+this.location.x,i.y+this.location.y);e.drawPdfTemplate(a.template,l,new Go(a.template.width*r,a.template.height*n)),this.painterGraphics.push(e)}else{var h=this.getSize(),u=new Ea(h);this.list.setValue(o,new Il(u,s)),u.graphics.drawString(s,this.getFont(),this.pen,this.getBrush(),0,0,h.width,h.height,this.stringFormat);l=new zo(i.x+this.location.x,i.y+this.location.y);e.drawPdfTemplate(u,l,new Go(u.width*r,u.height*n)),this.painterGraphics.push(e)}},e}(_s),_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)}}();!function(t){function e(e,i){var r=t.call(this)||this;return r.internalNumberStyle=Os.Numeric,void 0===i?r.font=e:i instanceof Wo?(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).section.parent.document.pages.count;return Rl.convert(e,this.numberStyle)}}(Gl);!function(t){t[t.Location=0]="Location",t[t.FitToPage=1]="FitToPage",t[t.FitR=2]="FitR"}(Ma||(Ma={}));!function(){function t(t,e){this.dictionaryProperties=new Hn,this.destinationMode=Ma.Location,this.zoomFactor=0,this.destinationLocation=new zo(0,0),this.bounds=new _o,this.array=new Qn;xs.RotateAngle0;this.destinationLocation=new zo(0,this.destinationLocation.y),this.pdfPage=t,e instanceof zo?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 Po(this.pdfPage)),this.destinationMode){case Ma.Location:var t=this.pdfPage,e=new zo;e=this.pointToNativePdf(t,this.destinationLocation),this.array.add(new Gn(this.dictionaryProperties.xyz)),this.array.add(new $n(e.x)),this.array.add(new $n(e.y)),this.array.add(new $n(this.zoomFactor));break;case Ma.FitToPage:this.array.add(new Gn(this.dictionaryProperties.fit))}},Object.defineProperty(t.prototype,"element",{get:function(){return this.initializePrimitive(),this.array},enumerable:!0,configurable:!0})}();var Hl,Wl=function(){function t(t){this.mDictionary=null,this.mDictionaryProperties=new Hn,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}(),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)}}(),ql=function(t){function e(e,i,r,n){var o=t.call(this,new mo)||this;return void 0===e?o.dictionary.items.setValue(o.mDictionaryProperties.functionType,new $n(0)):(o.dictionary.items.setValue(o.mDictionaryProperties.functionType,new $n(0)),o.checkParams(e,i,r,n),o.setDomainAndRange(e,i),o.setSizeAndValues(r,n)),o}return Ul(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 Qn(t),this.range=new Qn(e)},e.prototype.setSizeAndValues=function(t,e){var i=this.dictionary;this.dictionary.items.setValue(this.mDictionaryProperties.size,new Qn(t)),this.dictionary.items.setValue(this.mDictionaryProperties.bitsPerSample,new $n(8)),i.writeBytes(e)},e}(Wl);!function(t){t[t.None=0]="None",t[t.Start=1]="Start",t[t.End=2]="End",t[t.Both=3]="Both"}(Hl||(Hl={}));var Kl;!function(t){t[t.BackwardDiagonal=0]="BackwardDiagonal",t[t.ForwardDiagonal=1]="ForwardDiagonal",t[t.Horizontal=2]="Horizontal",t[t.Vertical=3]="Vertical"}(Kl||(Kl={}));var Yl;!function(t){t[t.Function=1]="Function",t[t.Axial=2]="Axial",t[t.Radial=3]="Radial"}(Yl||(Yl={}));var Jl;!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"}(Jl||(Jl={}));!function(){function t(){}Object.defineProperty(t,"AliceBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.AliceBlue)&&(t=this.sBrushes.getValue(Jl.AliceBlue)),null==t&&(t=this.getBrush(Jl.AliceBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"AntiqueWhite",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.AntiqueWhite)&&(t=this.sBrushes.getValue(Jl.AntiqueWhite)),null==t&&(t=this.getBrush(Jl.AntiqueWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Aqua",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Aqua)&&(t=this.sBrushes.getValue(Jl.Aqua)),null==t&&(t=this.getBrush(Jl.Aqua)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Aquamarine",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Aquamarine)&&(t=this.sBrushes.getValue(Jl.Aquamarine)),null==t&&(t=this.getBrush(Jl.Aquamarine)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Azure",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Azure)&&(t=this.sBrushes.getValue(Jl.Azure)),null==t&&(t=this.getBrush(Jl.Azure)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Beige",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Beige)&&(t=this.sBrushes.getValue(Jl.Beige)),null==t&&(t=this.getBrush(Jl.Beige)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Bisque",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Bisque)&&(t=this.sBrushes.getValue(Jl.Bisque)),null==t&&(t=this.getBrush(Jl.Bisque)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Black",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Black)&&(t=this.sBrushes.getValue(Jl.Black)),null==t&&(t=this.getBrush(Jl.Black)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BlanchedAlmond",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.BlanchedAlmond)&&(t=this.sBrushes.getValue(Jl.BlanchedAlmond)),null==t&&(t=this.getBrush(Jl.BlanchedAlmond)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Blue",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Blue)&&(t=this.sBrushes.getValue(Jl.Blue)),null==t&&(t=this.getBrush(Jl.Blue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BlueViolet",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.BlueViolet)&&(t=this.sBrushes.getValue(Jl.BlueViolet)),null==t&&(t=this.getBrush(Jl.BlueViolet)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Brown",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Brown)&&(t=this.sBrushes.getValue(Jl.Brown)),null==t&&(t=this.getBrush(Jl.Brown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"BurlyWood",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.BurlyWood)&&(t=this.sBrushes.getValue(Jl.BurlyWood)),null==t&&(t=this.getBrush(Jl.BurlyWood)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"CadetBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.CadetBlue)&&(t=this.sBrushes.getValue(Jl.CadetBlue)),null==t&&(t=this.getBrush(Jl.CadetBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Chartreuse",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Chartreuse)&&(t=this.sBrushes.getValue(Jl.Chartreuse)),null==t&&(t=this.getBrush(Jl.Chartreuse)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Chocolate",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Chocolate)&&(t=this.sBrushes.getValue(Jl.Chocolate)),null==t&&(t=this.getBrush(Jl.Chocolate)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Coral",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Coral)&&(t=this.sBrushes.getValue(Jl.Coral)),null==t&&(t=this.getBrush(Jl.Coral)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"CornflowerBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.CornflowerBlue)&&(t=this.sBrushes.getValue(Jl.CornflowerBlue)),null==t&&(t=this.getBrush(Jl.CornflowerBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Cornsilk",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Cornsilk)&&(t=this.sBrushes.getValue(Jl.Cornsilk)),null==t&&(t=this.getBrush(Jl.Cornsilk)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Crimson",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Crimson)&&(t=this.sBrushes.getValue(Jl.Crimson)),null==t&&(t=this.getBrush(Jl.Crimson)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Cyan",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Cyan)&&(t=this.sBrushes.getValue(Jl.Cyan)),null==t&&(t=this.getBrush(Jl.Cyan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DarkBlue)&&(t=this.sBrushes.getValue(Jl.DarkBlue)),null==t&&(t=this.getBrush(Jl.DarkBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkCyan",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DarkCyan)&&(t=this.sBrushes.getValue(Jl.DarkCyan)),null==t&&(t=this.getBrush(Jl.DarkCyan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkGoldenrod",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DarkGoldenrod)&&(t=this.sBrushes.getValue(Jl.DarkGoldenrod)),null==t&&(t=this.getBrush(Jl.DarkGoldenrod)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkGray",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DarkGray)&&(t=this.sBrushes.getValue(Jl.DarkGray)),null==t&&(t=this.getBrush(Jl.DarkGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DarkGreen)&&(t=this.sBrushes.getValue(Jl.DarkGreen)),null==t&&(t=this.getBrush(Jl.DarkGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkKhaki",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DarkKhaki)&&(t=this.sBrushes.getValue(Jl.DarkKhaki)),null==t&&(t=this.getBrush(Jl.DarkKhaki)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkMagenta",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DarkMagenta)&&(t=this.sBrushes.getValue(Jl.DarkMagenta)),null==t&&(t=this.getBrush(Jl.DarkMagenta)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkOliveGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DarkOliveGreen)&&(t=this.sBrushes.getValue(Jl.DarkOliveGreen)),null==t&&(t=this.getBrush(Jl.DarkOliveGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkOrange",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DarkOrange)&&(t=this.sBrushes.getValue(Jl.DarkOrange)),null==t&&(t=this.getBrush(Jl.DarkOrange)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkOrchid",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DarkOrchid)&&(t=this.sBrushes.getValue(Jl.DarkOrchid)),null==t&&(t=this.getBrush(Jl.DarkOrchid)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkRed",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DarkRed)&&(t=this.sBrushes.getValue(Jl.DarkRed)),null==t&&(t=this.getBrush(Jl.DarkRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSalmon",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DarkSalmon)&&(t=this.sBrushes.getValue(Jl.DarkSalmon)),null==t&&(t=this.getBrush(Jl.DarkSalmon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DarkSeaGreen)&&(t=this.sBrushes.getValue(Jl.DarkSeaGreen)),null==t&&(t=this.getBrush(Jl.DarkSeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSlateBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DarkSlateBlue)&&(t=this.sBrushes.getValue(Jl.DarkSlateBlue)),null==t&&(t=this.getBrush(Jl.DarkSlateBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkSlateGray",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DarkSlateGray)&&(t=this.sBrushes.getValue(Jl.DarkSlateGray)),null==t&&(t=this.getBrush(Jl.DarkSlateGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkTurquoise",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DarkTurquoise)&&(t=this.sBrushes.getValue(Jl.DarkTurquoise)),null==t&&(t=this.getBrush(Jl.DarkTurquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DarkViolet",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DarkViolet)&&(t=this.sBrushes.getValue(Jl.DarkViolet)),null==t&&(t=this.getBrush(Jl.DarkViolet)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DeepPink",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DeepPink)&&(t=this.sBrushes.getValue(Jl.DeepPink)),null==t&&(t=this.getBrush(Jl.DeepPink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DeepSkyBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DeepSkyBlue)&&(t=this.sBrushes.getValue(Jl.DeepSkyBlue)),null==t&&(t=this.getBrush(Jl.DeepSkyBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DimGray",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DimGray)&&(t=this.sBrushes.getValue(Jl.DimGray)),null==t&&(t=this.getBrush(Jl.DimGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"DodgerBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.DodgerBlue)&&(t=this.sBrushes.getValue(Jl.DodgerBlue)),null==t&&(t=this.getBrush(Jl.DodgerBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Firebrick",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Firebrick)&&(t=this.sBrushes.getValue(Jl.Firebrick)),null==t&&(t=this.getBrush(Jl.Firebrick)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"FloralWhite",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.FloralWhite)&&(t=this.sBrushes.getValue(Jl.FloralWhite)),null==t&&(t=this.getBrush(Jl.FloralWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"ForestGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.ForestGreen)&&(t=this.sBrushes.getValue(Jl.ForestGreen)),null==t&&(t=this.getBrush(Jl.ForestGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Fuchsia",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Fuchsia)&&(t=this.sBrushes.getValue(Jl.Fuchsia)),null==t&&(t=this.getBrush(Jl.Fuchsia)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Gainsboro",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Gainsboro)&&(t=this.sBrushes.getValue(Jl.Gainsboro)),null==t&&(t=this.getBrush(Jl.Gainsboro)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"GhostWhite",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.GhostWhite)&&(t=this.sBrushes.getValue(Jl.GhostWhite)),null==t&&(t=this.getBrush(Jl.GhostWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Gold",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Gold)&&(t=this.sBrushes.getValue(Jl.Gold)),null==t&&(t=this.getBrush(Jl.Gold)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Goldenrod",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Goldenrod)&&(t=this.sBrushes.getValue(Jl.Goldenrod)),null==t&&(t=this.getBrush(Jl.Goldenrod)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Gray",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Gray)&&(t=this.sBrushes.getValue(Jl.Gray)),null==t&&(t=this.getBrush(Jl.Gray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Green",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Green)&&(t=this.sBrushes.getValue(Jl.Green)),null==t&&(t=this.getBrush(Jl.Green)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"GreenYellow",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.GreenYellow)&&(t=this.sBrushes.getValue(Jl.GreenYellow)),null==t&&(t=this.getBrush(Jl.GreenYellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Honeydew",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Honeydew)&&(t=this.sBrushes.getValue(Jl.Honeydew)),null==t&&(t=this.getBrush(Jl.Honeydew)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"HotPink",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.HotPink)&&(t=this.sBrushes.getValue(Jl.HotPink)),null==t&&(t=this.getBrush(Jl.HotPink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"IndianRed",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.IndianRed)&&(t=this.sBrushes.getValue(Jl.IndianRed)),null==t&&(t=this.getBrush(Jl.IndianRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Indigo",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Indigo)&&(t=this.sBrushes.getValue(Jl.Indigo)),null==t&&(t=this.getBrush(Jl.Indigo)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Ivory",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Ivory)&&(t=this.sBrushes.getValue(Jl.Ivory)),null==t&&(t=this.getBrush(Jl.Ivory)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Khaki",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Khaki)&&(t=this.sBrushes.getValue(Jl.Khaki)),null==t&&(t=this.getBrush(Jl.Khaki)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Lavender",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Lavender)&&(t=this.sBrushes.getValue(Jl.Lavender)),null==t&&(t=this.getBrush(Jl.Lavender)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LavenderBlush",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.LavenderBlush)&&(t=this.sBrushes.getValue(Jl.LavenderBlush)),null==t&&(t=this.getBrush(Jl.LavenderBlush)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LawnGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.LawnGreen)&&(t=this.sBrushes.getValue(Jl.LawnGreen)),null==t&&(t=this.getBrush(Jl.LawnGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LemonChiffon",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.LemonChiffon)&&(t=this.sBrushes.getValue(Jl.LemonChiffon)),null==t&&(t=this.getBrush(Jl.LemonChiffon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.LightBlue)&&(t=this.sBrushes.getValue(Jl.LightBlue)),null==t&&(t=this.getBrush(Jl.LightBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightCoral",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.LightCoral)&&(t=this.sBrushes.getValue(Jl.LightCoral)),null==t&&(t=this.getBrush(Jl.LightCoral)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightCyan",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.LightCyan)&&(t=this.sBrushes.getValue(Jl.LightCyan)),null==t&&(t=this.getBrush(Jl.LightCyan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightGoldenrodYellow",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.LightGoldenrodYellow)&&(t=this.sBrushes.getValue(Jl.LightGoldenrodYellow)),null==t&&(t=this.getBrush(Jl.LightGoldenrodYellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightGray",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.LightGray)&&(t=this.sBrushes.getValue(Jl.LightGray)),null==t&&(t=this.getBrush(Jl.LightGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.LightGreen)&&(t=this.sBrushes.getValue(Jl.LightGreen)),null==t&&(t=this.getBrush(Jl.LightGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightPink",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.LightPink)&&(t=this.sBrushes.getValue(Jl.LightPink)),null==t&&(t=this.getBrush(Jl.LightPink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSalmon",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.LightSalmon)&&(t=this.sBrushes.getValue(Jl.LightSalmon)),null==t&&(t=this.getBrush(Jl.LightSalmon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.LightSeaGreen)&&(t=this.sBrushes.getValue(Jl.LightSeaGreen)),null==t&&(t=this.getBrush(Jl.LightSeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSkyBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.LightSkyBlue)&&(t=this.sBrushes.getValue(Jl.LightSkyBlue)),null==t&&(t=this.getBrush(Jl.LightSkyBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSlateGray",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.LightSlateGray)&&(t=this.sBrushes.getValue(Jl.LightSlateGray)),null==t&&(t=this.getBrush(Jl.LightSlateGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightSteelBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.LightSteelBlue)&&(t=this.sBrushes.getValue(Jl.LightSteelBlue)),null==t&&(t=this.getBrush(Jl.LightSteelBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LightYellow",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.LightYellow)&&(t=this.sBrushes.getValue(Jl.LightYellow)),null==t&&(t=this.getBrush(Jl.LightYellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Lime",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Lime)&&(t=this.sBrushes.getValue(Jl.Lime)),null==t&&(t=this.getBrush(Jl.Lime)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"LimeGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.LimeGreen)&&(t=this.sBrushes.getValue(Jl.LimeGreen)),null==t&&(t=this.getBrush(Jl.LimeGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Linen",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Linen)&&(t=this.sBrushes.getValue(Jl.Linen)),null==t&&(t=this.getBrush(Jl.Linen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Magenta",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Magenta)&&(t=this.sBrushes.getValue(Jl.Magenta)),null==t&&(t=this.getBrush(Jl.Magenta)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Maroon",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Maroon)&&(t=this.sBrushes.getValue(Jl.Maroon)),null==t&&(t=this.getBrush(Jl.Maroon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumAquamarine",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.MediumAquamarine)&&(t=this.sBrushes.getValue(Jl.MediumAquamarine)),null==t&&(t=this.getBrush(Jl.MediumAquamarine)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.MediumBlue)&&(t=this.sBrushes.getValue(Jl.MediumBlue)),null==t&&(t=this.getBrush(Jl.MediumBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumOrchid",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.MediumOrchid)&&(t=this.sBrushes.getValue(Jl.MediumOrchid)),null==t&&(t=this.getBrush(Jl.MediumOrchid)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumPurple",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.MediumPurple)&&(t=this.sBrushes.getValue(Jl.MediumPurple)),null==t&&(t=this.getBrush(Jl.MediumPurple)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumSeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.MediumSeaGreen)&&(t=this.sBrushes.getValue(Jl.MediumSeaGreen)),null==t&&(t=this.getBrush(Jl.MediumSeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumSlateBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.MediumSlateBlue)&&(t=this.sBrushes.getValue(Jl.MediumSlateBlue)),null==t&&(t=this.getBrush(Jl.MediumSlateBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumSpringGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.MediumSpringGreen)&&(t=this.sBrushes.getValue(Jl.MediumSpringGreen)),null==t&&(t=this.getBrush(Jl.MediumSpringGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumTurquoise",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.MediumTurquoise)&&(t=this.sBrushes.getValue(Jl.MediumTurquoise)),null==t&&(t=this.getBrush(Jl.MediumTurquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MediumVioletRed",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.MediumVioletRed)&&(t=this.sBrushes.getValue(Jl.MediumVioletRed)),null==t&&(t=this.getBrush(Jl.MediumVioletRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MidnightBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.MidnightBlue)&&(t=this.sBrushes.getValue(Jl.MidnightBlue)),null==t&&(t=this.getBrush(Jl.MidnightBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MintCream",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.MintCream)&&(t=this.sBrushes.getValue(Jl.MintCream)),null==t&&(t=this.getBrush(Jl.MintCream)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MistyRose",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.MistyRose)&&(t=this.sBrushes.getValue(Jl.MistyRose)),null==t&&(t=this.getBrush(Jl.MistyRose)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Moccasin",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Moccasin)&&(t=this.sBrushes.getValue(Jl.Moccasin)),null==t&&(t=this.getBrush(Jl.Moccasin)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"NavajoWhite",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.NavajoWhite)&&(t=this.sBrushes.getValue(Jl.NavajoWhite)),null==t&&(t=this.getBrush(Jl.NavajoWhite)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Navy",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Navy)&&(t=this.sBrushes.getValue(Jl.Navy)),null==t&&(t=this.getBrush(Jl.Navy)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OldLace",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.OldLace)&&(t=this.sBrushes.getValue(Jl.OldLace)),null==t&&(t=this.getBrush(Jl.OldLace)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Olive",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Olive)&&(t=this.sBrushes.getValue(Jl.Olive)),null==t&&(t=this.getBrush(Jl.Olive)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OliveDrab",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.OliveDrab)&&(t=this.sBrushes.getValue(Jl.OliveDrab)),null==t&&(t=this.getBrush(Jl.OliveDrab)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Orange",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Orange)&&(t=this.sBrushes.getValue(Jl.Orange)),null==t&&(t=this.getBrush(Jl.Orange)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"OrangeRed",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.OrangeRed)&&(t=this.sBrushes.getValue(Jl.OrangeRed)),null==t&&(t=this.getBrush(Jl.OrangeRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Orchid",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Orchid)&&(t=this.sBrushes.getValue(Jl.Orchid)),null==t&&(t=this.getBrush(Jl.Orchid)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleGoldenrod",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.PaleGoldenrod)&&(t=this.sBrushes.getValue(Jl.PaleGoldenrod)),null==t&&(t=this.getBrush(Jl.PaleGoldenrod)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.PaleGreen)&&(t=this.sBrushes.getValue(Jl.PaleGreen)),null==t&&(t=this.getBrush(Jl.PaleGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleTurquoise",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.PaleTurquoise)&&(t=this.sBrushes.getValue(Jl.PaleTurquoise)),null==t&&(t=this.getBrush(Jl.PaleTurquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PaleVioletRed",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.PaleVioletRed)&&(t=this.sBrushes.getValue(Jl.PaleVioletRed)),null==t&&(t=this.getBrush(Jl.PaleVioletRed)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PapayaWhip",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.PapayaWhip)&&(t=this.sBrushes.getValue(Jl.PapayaWhip)),null==t&&(t=this.getBrush(Jl.PapayaWhip)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PeachPuff",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.PeachPuff)&&(t=this.sBrushes.getValue(Jl.PeachPuff)),null==t&&(t=this.getBrush(Jl.PeachPuff)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Peru",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Peru)&&(t=this.sBrushes.getValue(Jl.Peru)),null==t&&(t=this.getBrush(Jl.Peru)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Pink",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Pink)&&(t=this.sBrushes.getValue(Jl.Pink)),null==t&&(t=this.getBrush(Jl.Pink)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Plum",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Plum)&&(t=this.sBrushes.getValue(Jl.Plum)),null==t&&(t=this.getBrush(Jl.Plum)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"PowderBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.PowderBlue)&&(t=this.sBrushes.getValue(Jl.PowderBlue)),null==t&&(t=this.getBrush(Jl.PowderBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Purple",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Purple)&&(t=this.sBrushes.getValue(Jl.Purple)),null==t&&(t=this.getBrush(Jl.Purple)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Red",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Red)&&(t=this.sBrushes.getValue(Jl.Red)),null==t&&(t=this.getBrush(Jl.Red)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"RosyBrown",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.RosyBrown)&&(t=this.sBrushes.getValue(Jl.RosyBrown)),null==t&&(t=this.getBrush(Jl.RosyBrown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"RoyalBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.RoyalBlue)&&(t=this.sBrushes.getValue(Jl.RoyalBlue)),null==t&&(t=this.getBrush(Jl.RoyalBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SaddleBrown",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.SaddleBrown)&&(t=this.sBrushes.getValue(Jl.SaddleBrown)),null==t&&(t=this.getBrush(Jl.SaddleBrown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Salmon",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Salmon)&&(t=this.sBrushes.getValue(Jl.Salmon)),null==t&&(t=this.getBrush(Jl.Salmon)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SandyBrown",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.SandyBrown)&&(t=this.sBrushes.getValue(Jl.SandyBrown)),null==t&&(t=this.getBrush(Jl.SandyBrown)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SeaGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.SeaGreen)&&(t=this.sBrushes.getValue(Jl.SeaGreen)),null==t&&(t=this.getBrush(Jl.SeaGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SeaShell",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.SeaShell)&&(t=this.sBrushes.getValue(Jl.SeaShell)),null==t&&(t=this.getBrush(Jl.SeaShell)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Sienna",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Sienna)&&(t=this.sBrushes.getValue(Jl.Sienna)),null==t&&(t=this.getBrush(Jl.Sienna)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Silver",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Silver)&&(t=this.sBrushes.getValue(Jl.Silver)),null==t&&(t=this.getBrush(Jl.Silver)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SkyBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.SkyBlue)&&(t=this.sBrushes.getValue(Jl.SkyBlue)),null==t&&(t=this.getBrush(Jl.SkyBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SlateBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.SlateBlue)&&(t=this.sBrushes.getValue(Jl.SlateBlue)),null==t&&(t=this.getBrush(Jl.SlateBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SlateGray",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.SlateGray)&&(t=this.sBrushes.getValue(Jl.SlateGray)),null==t&&(t=this.getBrush(Jl.SlateGray)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Snow",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Snow)&&(t=this.sBrushes.getValue(Jl.Snow)),null==t&&(t=this.getBrush(Jl.Snow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SpringGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.SpringGreen)&&(t=this.sBrushes.getValue(Jl.SpringGreen)),null==t&&(t=this.getBrush(Jl.SpringGreen)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"SteelBlue",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.SteelBlue)&&(t=this.sBrushes.getValue(Jl.SteelBlue)),null==t&&(t=this.getBrush(Jl.SteelBlue)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Tan",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Tan)&&(t=this.sBrushes.getValue(Jl.Tan)),null==t&&(t=this.getBrush(Jl.Tan)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Teal",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Teal)&&(t=this.sBrushes.getValue(Jl.Teal)),null==t&&(t=this.getBrush(Jl.Teal)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Thistle",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Thistle)&&(t=this.sBrushes.getValue(Jl.Thistle)),null==t&&(t=this.getBrush(Jl.Thistle)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Tomato",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Tomato)&&(t=this.sBrushes.getValue(Jl.Tomato)),null==t&&(t=this.getBrush(Jl.Tomato)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Transparent",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Transparent)&&(t=this.sBrushes.getValue(Jl.Transparent)),null==t&&(t=this.getBrush(Jl.Transparent)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Turquoise",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Turquoise)&&(t=this.sBrushes.getValue(Jl.Turquoise)),null==t&&(t=this.getBrush(Jl.Turquoise)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Violet",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Violet)&&(t=this.sBrushes.getValue(Jl.Violet)),null==t&&(t=this.getBrush(Jl.Violet)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Wheat",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Wheat)&&(t=this.sBrushes.getValue(Jl.Wheat)),null==t&&(t=this.getBrush(Jl.Wheat)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"White",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.White)&&(t=this.sBrushes.getValue(Jl.White)),null==t&&(t=this.getBrush(Jl.White)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WhiteSmoke",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.WhiteSmoke)&&(t=this.sBrushes.getValue(Jl.WhiteSmoke)),null==t&&(t=this.getBrush(Jl.WhiteSmoke)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"Yellow",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.Yellow)&&(t=this.sBrushes.getValue(Jl.Yellow)),null==t&&(t=this.getBrush(Jl.Yellow)),t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"YellowGreen",{get:function(){var t=null;return this.sBrushes.containsKey(Jl.YellowGreen)&&(t=this.sBrushes.getValue(Jl.YellowGreen)),null==t&&(t=this.getBrush(Jl.YellowGreen)),t},enumerable:!0,configurable:!0}),t.getBrush=function(t){var e=this.getColorValue(t),i=new qo(e);return this.sBrushes.setValue(t,i),i},t.getColorValue=function(t){var e=new Vo;switch(t){case Jl.Transparent:e=new Vo(0,255,255,255);break;case Jl.AliceBlue:e=new Vo(255,240,248,255);break;case Jl.AntiqueWhite:e=new Vo(255,250,235,215);break;case Jl.Aqua:e=new Vo(255,0,255,255);break;case Jl.Aquamarine:e=new Vo(255,127,255,212);break;case Jl.Azure:e=new Vo(255,240,255,255);break;case Jl.Beige:e=new Vo(255,245,245,220);break;case Jl.Bisque:e=new Vo(255,255,228,196);break;case Jl.Black:e=new Vo(255,0,0,0);break;case Jl.BlanchedAlmond:e=new Vo(255,255,235,205);break;case Jl.Blue:e=new Vo(255,0,0,255);break;case Jl.BlueViolet:e=new Vo(255,138,43,226);break;case Jl.Brown:e=new Vo(255,165,42,42);break;case Jl.BurlyWood:e=new Vo(255,222,184,135);break;case Jl.CadetBlue:e=new Vo(255,95,158,160);break;case Jl.Chartreuse:e=new Vo(255,127,255,0);break;case Jl.Chocolate:e=new Vo(255,210,105,30);break;case Jl.Coral:e=new Vo(255,255,127,80);break;case Jl.CornflowerBlue:e=new Vo(255,100,149,237);break;case Jl.Cornsilk:e=new Vo(255,255,248,220);break;case Jl.Crimson:e=new Vo(255,220,20,60);break;case Jl.Cyan:e=new Vo(255,0,255,255);break;case Jl.DarkBlue:e=new Vo(255,0,0,139);break;case Jl.DarkCyan:e=new Vo(255,0,139,139);break;case Jl.DarkGoldenrod:e=new Vo(255,184,134,11);break;case Jl.DarkGray:e=new Vo(255,169,169,169);break;case Jl.DarkGreen:e=new Vo(255,0,100,0);break;case Jl.DarkKhaki:e=new Vo(255,189,183,107);break;case Jl.DarkMagenta:e=new Vo(255,139,0,139);break;case Jl.DarkOliveGreen:e=new Vo(255,85,107,47);break;case Jl.DarkOrange:e=new Vo(255,255,140,0);break;case Jl.DarkOrchid:e=new Vo(255,153,50,204);break;case Jl.DarkRed:e=new Vo(255,139,0,0);break;case Jl.DarkSalmon:e=new Vo(255,233,150,122);break;case Jl.DarkSeaGreen:e=new Vo(255,143,188,139);break;case Jl.DarkSlateBlue:e=new Vo(255,72,61,139);break;case Jl.DarkSlateGray:e=new Vo(255,47,79,79);break;case Jl.DarkTurquoise:e=new Vo(255,0,206,209);break;case Jl.DarkViolet:e=new Vo(255,148,0,211);break;case Jl.DeepPink:e=new Vo(255,255,20,147);break;case Jl.DeepSkyBlue:e=new Vo(255,0,191,255);break;case Jl.DimGray:e=new Vo(255,105,105,105);break;case Jl.DodgerBlue:e=new Vo(255,30,144,255);break;case Jl.Firebrick:e=new Vo(255,178,34,34);break;case Jl.FloralWhite:e=new Vo(255,255,250,240);break;case Jl.ForestGreen:e=new Vo(255,34,139,34);break;case Jl.Fuchsia:e=new Vo(255,255,0,255);break;case Jl.Gainsboro:e=new Vo(255,220,220,220);break;case Jl.GhostWhite:e=new Vo(255,248,248,255);break;case Jl.Gold:e=new Vo(255,255,215,0);break;case Jl.Goldenrod:e=new Vo(255,218,165,32);break;case Jl.Gray:e=new Vo(255,128,128,128);break;case Jl.Green:e=new Vo(255,0,128,0);break;case Jl.GreenYellow:e=new Vo(255,173,255,47);break;case Jl.Honeydew:e=new Vo(255,240,255,240);break;case Jl.HotPink:e=new Vo(255,255,105,180);break;case Jl.IndianRed:e=new Vo(255,205,92,92);break;case Jl.Indigo:e=new Vo(255,75,0,130);break;case Jl.Ivory:e=new Vo(255,255,255,240);break;case Jl.Khaki:e=new Vo(255,240,230,140);break;case Jl.Lavender:e=new Vo(255,230,230,250);break;case Jl.LavenderBlush:e=new Vo(255,255,240,245);break;case Jl.LawnGreen:e=new Vo(255,124,252,0);break;case Jl.LemonChiffon:e=new Vo(255,255,250,205);break;case Jl.LightBlue:e=new Vo(255,173,216,230);break;case Jl.LightCoral:e=new Vo(255,240,128,128);break;case Jl.LightCyan:e=new Vo(255,224,255,255);break;case Jl.LightGoldenrodYellow:e=new Vo(255,250,250,210);break;case Jl.LightGreen:e=new Vo(255,144,238,144);break;case Jl.LightGray:e=new Vo(255,211,211,211);break;case Jl.LightPink:e=new Vo(255,255,182,193);break;case Jl.LightSalmon:e=new Vo(255,255,160,122);break;case Jl.LightSeaGreen:e=new Vo(255,32,178,170);break;case Jl.LightSkyBlue:e=new Vo(255,135,206,250);break;case Jl.LightSlateGray:e=new Vo(255,119,136,153);break;case Jl.LightSteelBlue:e=new Vo(255,176,196,222);break;case Jl.LightYellow:e=new Vo(255,255,255,224);break;case Jl.Lime:e=new Vo(255,0,255,0);break;case Jl.LimeGreen:e=new Vo(255,50,205,50);break;case Jl.Linen:e=new Vo(255,250,240,230);break;case Jl.Magenta:e=new Vo(255,255,0,255);break;case Jl.Maroon:e=new Vo(255,128,0,0);break;case Jl.MediumAquamarine:e=new Vo(255,102,205,170);break;case Jl.MediumBlue:e=new Vo(255,0,0,205);break;case Jl.MediumOrchid:e=new Vo(255,186,85,211);break;case Jl.MediumPurple:e=new Vo(255,147,112,219);break;case Jl.MediumSeaGreen:e=new Vo(255,60,179,113);break;case Jl.MediumSlateBlue:e=new Vo(255,123,104,238);break;case Jl.MediumSpringGreen:e=new Vo(255,0,250,154);break;case Jl.MediumTurquoise:e=new Vo(255,72,209,204);break;case Jl.MediumVioletRed:e=new Vo(255,199,21,133);break;case Jl.MidnightBlue:e=new Vo(255,25,25,112);break;case Jl.MintCream:e=new Vo(255,245,255,250);break;case Jl.MistyRose:e=new Vo(255,255,228,225);break;case Jl.Moccasin:e=new Vo(255,255,228,181);break;case Jl.NavajoWhite:e=new Vo(255,255,222,173);break;case Jl.Navy:e=new Vo(255,0,0,128);break;case Jl.OldLace:e=new Vo(255,253,245,230);break;case Jl.Olive:e=new Vo(255,128,128,0);break;case Jl.OliveDrab:e=new Vo(255,107,142,35);break;case Jl.Orange:e=new Vo(255,255,165,0);break;case Jl.OrangeRed:e=new Vo(255,255,69,0);break;case Jl.Orchid:e=new Vo(255,218,112,214);break;case Jl.PaleGoldenrod:e=new Vo(255,238,232,170);break;case Jl.PaleGreen:e=new Vo(255,152,251,152);break;case Jl.PaleTurquoise:e=new Vo(255,175,238,238);break;case Jl.PaleVioletRed:e=new Vo(255,219,112,147);break;case Jl.PapayaWhip:e=new Vo(255,255,239,213);break;case Jl.PeachPuff:e=new Vo(255,255,218,185);break;case Jl.Peru:e=new Vo(255,205,133,63);break;case Jl.Pink:e=new Vo(255,255,192,203);break;case Jl.Plum:e=new Vo(255,221,160,221);break;case Jl.PowderBlue:e=new Vo(255,176,224,230);break;case Jl.Purple:e=new Vo(255,128,0,128);break;case Jl.Red:e=new Vo(255,255,0,0);break;case Jl.RosyBrown:e=new Vo(255,188,143,143);break;case Jl.RoyalBlue:e=new Vo(255,65,105,225);break;case Jl.SaddleBrown:e=new Vo(255,139,69,19);break;case Jl.Salmon:e=new Vo(255,250,128,114);break;case Jl.SandyBrown:e=new Vo(255,244,164,96);break;case Jl.SeaGreen:e=new Vo(255,46,139,87);break;case Jl.SeaShell:e=new Vo(255,255,245,238);break;case Jl.Sienna:e=new Vo(255,160,82,45);break;case Jl.Silver:e=new Vo(255,192,192,192);break;case Jl.SkyBlue:e=new Vo(255,135,206,235);break;case Jl.SlateBlue:e=new Vo(255,106,90,205);break;case Jl.SlateGray:e=new Vo(255,112,128,144);break;case Jl.Snow:e=new Vo(255,255,250,250);break;case Jl.SpringGreen:e=new Vo(255,0,255,127);break;case Jl.SteelBlue:e=new Vo(255,70,130,180);break;case Jl.Tan:e=new Vo(255,210,180,140);break;case Jl.Teal:e=new Vo(255,0,128,128);break;case Jl.Thistle:e=new Vo(255,216,191,216);break;case Jl.Tomato:e=new Vo(255,255,99,71);break;case Jl.Turquoise:e=new Vo(255,64,224,208);break;case Jl.Violet:e=new Vo(255,238,130,238);break;case Jl.Wheat:e=new Vo(255,245,222,179);break;case Jl.White:e=new Vo(255,255,255,255);break;case Jl.WhiteSmoke:e=new Vo(255,245,245,245);break;case Jl.Yellow:e=new Vo(255,255,255,0);break;case Jl.YellowGreen:e=new Vo(255,154,205,50)}return e},t.sBrushes=new zn}();var Xl,$l=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 Zl(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 Vo){var n=new Vo;switch(r){case jo.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 Vo(o,s,a);break;case jo.GrayScale:var l=this.interpolate(t,e.gray,i.gray);n=new Vo(l);break;case jo.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 Vo(h,u,c,p)}return n}return 0===t?e:1===t?i:e+(i-e)/1*(t-0)},t}(),Ql=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){var i=t.call(this)||this;return"number"==typeof e&&(i=t.call(this,e)||this),i}return Ql(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 ql([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 jo.Rgb:e=3;break;case jo.Cmyk:e=4;break;case jo.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 jo.GrayScale:n=this.getGrayscaleSamples(e,i,r);break;case jo.Cmyk:n=this.getCmykSamples(e,i,r);break;case jo.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,jo.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,jo.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,jo.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 jo.Cmyk:case jo.Rgb:e=255;break;case jo.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}($l),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)}}(),eh=(function(t){function e(e,i,r,n){var o=t.call(this,new Wn)||this;if(o.mDictionaryProperties=new Hn,e instanceof zo&&i instanceof zo&&r instanceof Vo&&n instanceof Vo)o.initialize(r,n),o.mPointStart=e,o.mPointEnd=i,o.setPoints(o.mPointStart,o.mPointEnd);else if(e instanceof Ho)if(o.initialize(i,r),n===Kl.BackwardDiagonal||n===Kl.ForwardDiagonal||n===Kl.Horizontal||n===Kl.Vertical){switch(o.mBoundaries=e,n){case Kl.BackwardDiagonal:o.mPointStart=new zo(e.right,e.top),o.mPointEnd=new zo(e.left,e.bottom);break;case Kl.ForwardDiagonal:o.mPointStart=new zo(e.left,e.top),o.mPointEnd=new zo(e.right,e.bottom);break;case Kl.Horizontal:o.mPointStart=new zo(e.left,e.top),o.mPointEnd=new zo(e.right,e.top);break;case Kl.Vertical:o.mPointStart=new zo(e.left,e.top),o.mPointEnd=new zo(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 zo(e.left,e.top),o.mPointEnd=new zo(e.right,e.top);else if(90===n)o.mPointStart=new zo(e.left,e.top),o.mPointEnd=new zo(e.left,e.bottom);else if(180===n)o.mPointEnd=new zo(e.left,e.top),o.mPointStart=new zo(e.right,e.top);else if(270===n)o.mPointEnd=new zo(e.left,e.top),o.mPointStart=new zo(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 zo(l,h);h=a*(l=o.mBoundaries.width/(2*Math.cos(s))),l+=u.x,h+=u.y;var c=new zo(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}th(e,t),e.prototype.initialize=function(t,e){this.mColours=[t,e],this.mColourBlend=new Zl(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 Zl(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=Hl.None,e=this.shading.items.getValue(this.mDictionaryProperties.extend);if(null!=e){var i=e.items(0),r=e.items(1);i.value&&(t|=Hl.Start),r.value&&(t|=Hl.End)}return t},set:function(t){var e,i,r=this.shading.items.getValue(this.mDictionaryProperties.extend);null==r?(e=new Us(!1),i=new Us(!1),(r=new Qn).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 zo(i,r)},e.prototype.subPoints=function(t,e){var i=t.x-e.x,r=t.y-e.y;return new zo(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 zo(0,0);if(t<90&&t>0)e=new zo(this.mBoundaries.right,this.mBoundaries.bottom);else if(t<180&&t>90)e=new zo(this.mBoundaries.left,this.mBoundaries.bottom);else if(t<270&&t>180)e=new zo(this.mBoundaries.left,this.mBoundaries.top);else{if(!(t>270))throw new Error("PdfException - Internal error.");e=new zo(this.mBoundaries.right,this.mBoundaries.top)}return e},e.prototype.setPoints=function(t,e){var i=new Qn;i.add(new $n(t.x)),i.add(new $n(this.updateY(t.y))),i.add(new $n(e.x)),i.add(new $n(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=jo.Rgb,this.function=this.mColourBlend.getFunction(this.colorSpace),this.shading.items.setValue(this.mDictionaryProperties.shadingType,new $n(Yl.Axial))},e.prototype.clone=function(){return this.resetPatternDictionary(new Wn(this.patternDictionary)),this.shading=new Wn,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)}}(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)}}());!function(t){function e(e,i,r,n,o,s){var a=t.call(this,new Wn)||this;if(a.mDictionaryProperties=new Hn,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}eh(e,t),e.prototype.initialize=function(t,e){this.mColour=[t,e],this.mColourBlends=new Zl(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 Zl(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=Qn.fromRectangle(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"extend",{get:function(){var t=Hl.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|=Hl.Start),r.value&&(t|=Hl.End)}return t},set:function(t){var e,i,r=this.shading.items.getValue(this.mDictionaryProperties.extend);null==r&&void 0===r?(e=new Us(!1),i=new Us(!1),(r=new Qn).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 Qn;n.add(new $n(t.x)),n.add(new $n(this.updateY(t.y))),n.add(new $n(i)),n.add(new $n(e.x)),n.add(new $n(this.updateY(e.y))),i!==r?n.add(new $n(r)):n.add(new $n(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=jo.Rgb,this.function=this.mColourBlends.getFunction(this.colorSpace),this.shading.items.setValue(this.mDictionaryProperties.shadingType,new $n(Yl.Radial))},e.prototype.clone=function(){return this.resetPatternDictionary(new Wn(this.patternDictionary)),this.shading=new Wn,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)}}(ka);!function(t){t[t.Overlap=0]="Overlap",t[t.Inside=1]="Inside"}(Xl||(Xl={}));var ih,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(){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}(),oh=function(t){function e(){var e=t.call(this)||this;return e.gridBorderOverlapStyle=Xl.Overlap,e.bAllowHorizontalOverflow=!1,e.gridHorizontalOverflowType=ih.LastPage,e}return rh(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 Pl),this.gridCellPadding},set:function(t){void 0===this.gridCellPadding?(this.gridCellPadding=new Pl,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}(nh),sh=function(t){function e(){var e=t.call(this)||this;return e.gridCellBorders=Sl.default,e}return rh(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 Pl),this.gridCellPadding=t},enumerable:!0,configurable:!0}),e}(nh),ah=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 Sl),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"}(ih||(ih={}));var lh=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 ss),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 mh){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 sh),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 ls;if("string"==typeof this.objectValue){t+=e.layout(this.objectValue,this.getTextFont(),this.stringFormat,new Go(Number.MAX_VALUE,Number.MAX_VALUE),!1,new Go(0,0)).actualSize.width,t+=2*(this.style.borders.left.width+this.style.borders.right.width)}else if(this.objectValue instanceof mh)t=this.objectValue.size.width;else if(this.objectValue instanceof Js||this.objectValue instanceof $s)t+=this.objectValue.width;else if(this.objectValue instanceof jl){var i=this.objectValue;t+=e.layout(i.text,i.font,i.stringFormat,new Go(0,0),!1,new Go(0,0)).actualSize.width,t+=2*(this.style.borders.left.width+this.style.borders.right.width)}return this.objectValue instanceof mh?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 _o(t.x,t.y,t.width,t.height);return this.objectValue instanceof mh?(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 qo(new Vo(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 _o(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 mh){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 bh(p),g=new wh;null!=this.row.grid.LayoutFormat?g=this.row.grid.LayoutFormat:g.layout=qs.Paginate;var m=new vl;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 Js||this.objectValue instanceof $s){var b=void 0;b=this.objectValue.width<=l.width?new _o(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 jl?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===Xl.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 zo(e.x,e.y+e.height),r=new zo(e.x,e.y),n=this.cellStyle.borders.left;this.cellStyle.borders.left.dashStyle===ko.Solid&&(n.lineCap=Do.Square),0!==n.width&&t.drawLine(n,i,r),i=new zo(e.x+e.width,e.y),r=new zo(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 zo(t.clientSize.width-n.width/2,e.y),r=new zo(t.clientSize.width-n.width/2,e.y+e.height)),this.cellStyle.borders.right.dashStyle===ko.Solid&&(n.lineCap=Do.Square),0!==n.width&&t.drawLine(n,i,r),i=new zo(e.x,e.y),r=new zo(e.x+e.width,e.y),n=this.cellStyle.borders.top,this.cellStyle.borders.top.dashStyle===ko.Solid&&(n.lineCap=Do.Square),0!==n.width&&t.drawLine(n,i,r),i=new zo(e.x+e.width,e.y+e.height),r=new zo(e.x,e.y+e.height),n=this.cellStyle.borders.bottom,e.y+e.height>t.clientSize.height-n.width/2&&(i=new zo(e.x+e.width,t.clientSize.height-n.width/2),r=new zo(e.x,t.clientSize.height-n.width/2)),this.cellStyle.borders.bottom.dashStyle===ko.Solid&&(n.lineCap=Do.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 _o(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:al.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 ls;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 Go(this.tempval,0),!1,new Go(0,0)).actualSize.height):e+=i.layout(r,this.getTextFont(),this.stringFormat,new Go(t,0),!1,new Go(0,0)).actualSize.height),e+=2*(this.style.borders.top.width+this.style.borders.bottom.width)}else if(this.objectValue instanceof mh){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 Js||this.objectValue instanceof $s)e+=this.objectValue.height;else if(this.objectValue instanceof jl){var s=this.objectValue;e+=i.layout(s.text,s.font,s.stringFormat,new Go(t,0),!1,new Go(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 mh?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}(),hh=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 lh;return this.add(e),t}t.row=this.gridRow,this.cells.push(t)},t.prototype.indexOf=function(t){return this.cells.indexOf(t)},t}(),uh=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 ss),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 uh(this.grid));for(var i=0;i<this.grid.rows.count;i++){var r=this.grid.rows.getRow(i),n=new lh;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}(),ph=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 hh(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 ah,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}(),dh=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 ph(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 lh);this.rows.push(t)},t.prototype.getRow=function(t){return this.rows[t]},t}(),fh=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 ph(this.grid)).isHeaderRow=!0;for(var r=0;r<this.grid.columns.count;r++)e.cells.add(new lh);this.rows.push(e)}return this.rows}this.rows.push(t)},t.prototype.indexOf=function(t){return this.rows.indexOf(t)},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)}}(),mh=function(t){function e(){var e=t.call(this)||this;return e.gridSize=new Go(0,0),e.isGridSplit=!1,e.isRearranged=!1,e.pageBounds=new _o,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 gh(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 dh(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 fh(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 oh),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 zo&&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 _o&&void 0!==e.width&&void 0===i)return this.drawHelper(t,e,null);if(e instanceof zo&&void 0===e.width&&i instanceof bl)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&"number"==typeof i&&(r instanceof bl||null==r)){var n=t.graphics.clientSize.width-e,o=new _o(e,i,n,0);return this.drawHelper(t,o,r)}return e instanceof _o&&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 Go(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 _o(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===Sl.default.right.width/2&&t.bounds.y===Sl.default.right.width/2){var a=new _o(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 bh(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}(Cl),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)}}(),bh=function(t){function e(e){var i=t.call(this,e)||this;return i.gridInitialWidth=0,i.gridSize=new Go(0,0),i.parentCellIndex=0,i.tempWidth=0,i.childheight=0,i.isChildGrid=!1,i.hasRowSpanSpan=!1,i.isRearranged=!1,i.pageBounds=new _o,i.listOfNavigatePages=[],i.flag=!0,i.columnRanges=[],i.currentLocation=new zo(0,0),i.breakRow=!0,i.slr=null,i.remainderText=null,i.isPaginate=!1,i.isOverloadWithPosition=!1,i}return yh(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),void 0===t.bounds||null===t.bounds||0===t.bounds.x&&0===t.bounds.y&&0===t.bounds.width&&0===t.bounds.height?null!=e&&e.break===La.FitColumnsToPage?this.currentBounds=new _o(new zo(t.bounds.x,t.bounds.y),new Go(this.Grid.columns.width,this.currentGraphics.clientSize.height)):this.currentBounds=new _o(new zo(t.bounds.x,t.bounds.y),this.currentGraphics.clientSize):this.currentBounds=new _o(new zo(t.bounds.x,t.bounds.y),new Go(t.bounds.width,t.bounds.height)),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 zo(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 _o(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 Ns,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!==qs.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 zo(Sl.default.right.width/2,Sl.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===Sl.default.right.width/2&&this.currentBounds.y===Sl.default.right.width/2){var L=new _o(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 R=0;R<p.cells.count;R++)p.cells.getCell(R).value instanceof mh&&(p.cells.getCell(R).value.splitChildRowIndex=-1)}}}if(!S.isFinish&&null!==o&&i.layout!==qs.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=Sl.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===Sl.default.left.width/2&&(this.currentBounds.y+=this.startLocation.x),this.Grid.repeatHeader)for(var I=0;I<this.Grid.headers.count;I++){j=this.Grid.headers.getHeader(I);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 zo(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 zo(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 mh)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 _o(_,new Go(q,H))),_.x+=q,W+=U.columnSpan-1}}o=this.currentPage}}}var J=!1,X=0;s.length>0&&(X=s[0]);var $=[[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 mh){var Q=this.Grid.rows.getRow(W).cells.getCell(this.cellEndIndex).value;this.rowLayoutBoundsWidth=Q.rowLayoutBoundsWidth,J=!0}if(!J&&s.length>0){for(W=0;W<m-1;W++)X<s[W]&&(X=s[W]);this.rowLayoutBoundsWidth=X}else this.rowLayoutBoundsWidth=$[0][1];if(this.columnRanges.indexOf(l)<this.columnRanges.length-1&&null!=o&&i.layout!=qs.OnePage)if(this.Grid.isChildGrid,0!=$[0][0]){this.currentPage.section.indexOf(this.currentPage);this.currentGraphics=this.currentPage.graphics,this.currentBounds=new _o(new zo(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!==qs.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==ih.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 _o(new zo(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 ss;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 Ph(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 Ch(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 _o(this.startLocation,new Go(this.currentBounds.width,this.currentBounds.y-this.startLocation.y))),new vh(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 Lh(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 Th(t);return this.Grid.raiseEndPageLayout&&this.Grid.onEndPageLayout(e),e},e.prototype.drawRow=function(t,i,r){if(void 0===i){var n=new Mh,o=0,s=new Go(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===La.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==qs.Paginate&&this.Grid.LayoutFormat.break!=La.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 zo(this.currentBounds.x,this.currentBounds.y);i.bounds=new _o(f,new Go(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 Go(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 _o(f,s),b,y),t.cells.getCell(u).value instanceof mh){(w=t.cells.getCell(u).value).parentCellIndex=u}var v=t.cells.getCell(u).draw(this.currentGraphics,new _o(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 _o(f,s),b,t.cells.getCell(u).style),t.cells.getCell(u).value instanceof mh){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 _o(new zo(i.bounds.x,i.bounds.y),new Go(f.x,f.y))},e.prototype.isFitToCell=function(t,e,i){for(var r=!1,n=new ls,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:al.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 Go(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 zo(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 _o(r,new Go(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 mh&&(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 Go(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 _o(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 mh){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 _o(new zo(t.bounds.x,t.bounds.y),new Go(r.x,r.y))},e.repeatRowIndex=-1,e}(yl),vh=function(t){function e(e,i){return t.call(this,e,i)||this}return yh(e,t),e}(wl),wh=function(t){function e(e){return t.call(this,e)||this}return yh(e,t),e}(bl),Sh=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}(),Ph=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 yh(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}(Sh),Ch=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 yh(e,t),Object.defineProperty(e.prototype,"style",{get:function(){return this.cellStyle},enumerable:!0,configurable:!0}),e}(Sh),xh=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}(),Oh=function(t){function e(e,i){var r=t.call(this)||this;return r.bounds=e,r.pdfPage=i,r}return yh(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}(xh),Bh=function(t){function e(e){var i=t.call(this)||this;return i.layoutResult=e,i}return yh(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}(xh),Lh=function(t){function e(e,i,r){var n=t.call(this,e,i)||this;return n.startRow=r,n}return yh(e,t),Object.defineProperty(e.prototype,"startRowIndex",{get:function(){return this.startRow},enumerable:!0,configurable:!0}),e}(Oh),Th=function(t){function e(e){return t.call(this,e)||this}return yh(e,t),e}(Bh),Mh=function(){function t(){this.layoutedBounds=new _o(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}(),Dh=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,e)||this;return i.olderPdfForm=0,i.shapeBounds=new _o,i.totalPageSize=0,i}return Dh(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 Eh;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 Oh(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 Bh(i),this.element.onEndPageLayout(e)}return e},e.prototype.getLayoutResult=function(t){return new wl(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 Eh;e=this.checkCorrectCurrentBounds(t,e,r);var o=this.fitsToBounds(e,i),s=!1;if(!(r.format.break===La.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===qs.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 zo(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}(yl),Eh=function(){return function(){}}(),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)}}(),Rh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return jh(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 kh(this).layout(t)},e}(Cl),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)}}(),Ah=function(t){function e(e){var i=t.call(this)||this;return void 0!==e&&(i.mpen=e),i}return Ih(e,t),Object.defineProperty(e.prototype,"pen",{get:function(){return this.mpen},set:function(t){this.mpen=t},enumerable:!0,configurable:!0}),e}(Rh),Nh=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)}}(),Fh=function(t){function e(e,i){var r=t.call(this)||this;return r.mbrush=null,void 0===e||(e instanceof js?r=t.call(this,e)||this:r.mbrush=i),r}return Nh(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 js(new Vo(0,0,0)):this.pen},e}(Ah),Vh=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){var o=t.call(this)||this;return o.mpoints=null,o.mpathTypes=null,o.mStartFigure=!0,o.mfillMode=Eo.Alternate,o.isBeziers3=!1,o.isXps=!1,void 0===e||(e instanceof js?(o=t.call(this,e)||this,i instanceof Wo?(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 Wo?(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}Vh(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 zo&&void 0===e.width&&void 0===i)return this.drawHelper(t,e.x,e.y);if(e instanceof _o&&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 zo&&i instanceof bl)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&(r instanceof bl||null==r)&&"number"==typeof i){var n=t.graphics.clientSize.width-e,o=new _o(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 _o)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,Ta.Bezier3)}},e.prototype.addBezier=function(t,e,i,r,n,o,s,a){if(t instanceof zo&&e instanceof zo&&i instanceof zo&&r instanceof zo)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,Ta.Bezier3)}},e.prototype.addEllipse=function(t,e,i,r){t instanceof _o?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 zo&&e instanceof zo)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,Ta.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 _o?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 zo(t+i/2,e+r/2),Ta.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,Ta.Line),this.closeFigure()},e.prototype.addRectangle=function(t,e,i,r){if(t instanceof _o)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,Ta.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===Ta.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 zo(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 _o(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 _o(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 zo(t[n],t[n+1]);n===i?this.pointCount<=0||this.mStartFigure?(this.addPoint(o,Ta.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,Ta.Bezier3):this.addPoint(o,Ta.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|=Ta.CloseSubpath,this.types[t]=e}}}(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(t){function e(e,i,r,n,o,s){var a=t.call(this)||this;return a.bounds=new _o(0,0,0,0),void 0===e||(e instanceof js?(a=t.call(this,e,i)||this).bounds=r instanceof _o?r:new _o(r,n,o,s):a.bounds=e instanceof _o?e:new _o(e,i,r,n)),a}return zh(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}(Fh),_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,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 _o&&void 0!==i&&void 0!==r?((h=t.call(this,e)||this).startAngle=i,h.sweepAngle=r):e instanceof js?r instanceof _o?((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 _h(e,t),e}(Gh),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(e,i,r,n,o,s,a){var l=this;return void 0===e?l=t.call(this)||this:e instanceof _o?l=t.call(this,e,i,r)||this:e instanceof js?i instanceof _o?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}Wh(e,t),e.prototype.draw=function(t,e,i,r){if(e instanceof zo&&void 0===e.width&&void 0===i)return this.drawHelper(t,e.x,e.y);if(e instanceof _o&&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 zo&&i instanceof bl)return this.drawHelper(t,e.x,e.y,i);if("number"==typeof e&&(r instanceof bl||null==r)&&"number"==typeof i){var n=t.graphics.clientSize.width-e,o=new _o(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)}}(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)}}()),qh=(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,Fo.Regular),n}Uh(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!==No.None){i=this.getUnicodeLineWidth(t,i,e).width}else i=this.fontInternal.getLineWidth(t);var r=this.metrics.getSize(e);return i*=ps.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 Sa(t,this.size),this.calculateStyle(e),this.initializeInternals()},e.prototype.calculateStyle=function(t){var e=this.fontInternal.ttfMetrics.macStyle;0!=(t&Fo.Underline)&&(e|=Fo.Underline),0!=(t&Fo.Strikeout)&&(e|=Fo.Strikeout),this.setStyle(e)},e.prototype.initializeInternals=function(){var t=null;al.enableCache&&(t=al.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 Sa&&(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 Ba).getGlyphIndex(t,this,i.textDirection===No.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}}}(ps),function(){function t(t,e,i,r,n){t instanceof _o&&void 0===e?this.InitiateBounds(t.x,t.y,t.width,t.height,null):t instanceof _o&&e instanceof Ja&&void 0===i?this.InitiateBounds(t.x,t.y,t.width,t.height,e):t instanceof zo&&e instanceof Go&&void 0===i?this.InitiateBounds(t.x,t.y,e.width,e.height,null):t instanceof zo&&e instanceof Go&&i instanceof Ja&&void 0===r?this.InitiateBounds(t.x,t.y,e.width,e.height,i):t instanceof Go&&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 Ja&&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===Ts.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===Ts.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===Ts.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===Ts.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===Ts.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===Ts.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 _o(new zo(this.x,this.y),this.size)},set:function(t){this.type===Ts.None&&(this.location=new zo(t.x,t.y),this.size=new Go(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 Ea(i,r)},t.prototype.updateDocking=function(t){if(t!==Ts.None){switch(t){case Ts.Top:this.dock=Bs.Top;break;case Ts.Bottom:this.dock=Bs.Bottom;break;case Ts.Left:this.dock=Bs.Left;break;case Ts.Right:this.dock=Bs.Right}this.resetAlignment()}},t.prototype.resetAlignment=function(){this.alignment=Ls.None},t.prototype.setAlignment=function(t){if(this.dock===Bs.None)this.alignmentStyle=t;else{var e=!1;switch(this.dock){case Bs.Left:e=t===Ls.TopLeft||t===Ls.MiddleLeft||t===Ls.BottomLeft||t===Ls.None;break;case Bs.Top:e=t===Ls.TopLeft||t===Ls.TopCenter||t===Ls.TopRight||t===Ls.None;break;case Bs.Right:e=t===Ls.TopRight||t===Ls.MiddleRight||t===Ls.BottomRight||t===Ls.None;break;case Bs.Bottom:e=t===Ls.BottomLeft||t===Ls.BottomCenter||t===Ls.BottomRight||t===Ls.None;break;case Bs.Fill:e=t===Ls.MiddleCenter||t===Ls.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 zo(r.x,r.y),new Go(r.width,r.height))},t.prototype.calculateBounds=function(t,e){var i=this.bounds;return this.alignmentStyle!==Ls.None?i=this.getAlignmentBounds(t,e):this.dockStyle!==Bs.None&&(i=this.getDockBounds(t,e)),i},t.prototype.getAlignmentBounds=function(t,e){this.bounds;return this.type===Ts.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 Ls.TopLeft:n=0,o=0;break;case Ls.TopCenter:n=(r.width-this.width)/2,o=0;break;case Ls.TopRight:n=r.width-this.width,o=0;break;case Ls.MiddleLeft:n=0,o=(r.height-this.height)/2;break;case Ls.MiddleCenter:n=(r.width-this.width)/2,o=(r.height-this.height)/2;break;case Ls.MiddleRight:n=r.width-this.width,o=(r.height-this.height)/2;break;case Ls.BottomLeft:n=0,o=r.height-this.height;break;case Ls.BottomCenter:n=(r.width-this.width)/2,o=r.height-this.height;break;case Ls.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 Ls.TopLeft:this.type===Ts.Left?(o=-n.x,s=0):this.type===Ts.Top&&(o=-n.x,s=-n.y);break;case Ls.TopCenter:o=(n.width-this.width)/2,s=-n.y;break;case Ls.TopRight:this.type===Ts.Right?(o=n.width+r.getRightIndentWidth(e,t,!1)-this.width,s=0):this.type===Ts.Top&&(o=n.width+r.getRightIndentWidth(e,t,!1)-this.width,s=-n.y);break;case Ls.MiddleLeft:o=-n.x,s=(n.height-this.height)/2;break;case Ls.MiddleCenter:o=(n.width-this.width)/2,s=(n.height-this.height)/2;break;case Ls.MiddleRight:o=n.width+r.getRightIndentWidth(e,t,!1)-this.width,s=(n.height-this.height)/2;break;case Ls.BottomLeft:this.type===Ts.Left?(o=-n.x,s=n.height-this.height):this.type===Ts.Bottom&&(o=-n.x,s=n.height+r.getBottomIndentHeight(e,t,!1)-this.height);break;case Ls.BottomCenter:o=(n.width-this.width)/2,s=n.height+r.getBottomIndentHeight(e,t,!1)-this.height;break;case Ls.BottomRight:this.type===Ts.Right?(o=n.width+r.getRightIndentWidth(e,t,!1)-this.width,s=n.height-this.height):this.type===Ts.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===Ts.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 Bs.Left:r=0,n=0,o=this.width,s=i.height;break;case Bs.Top:r=0,n=0,o=i.width,s=this.height;break;case Bs.Right:r=i.width-this.width,n=0,o=this.width,s=i.height;break;case Bs.Bottom:r=0,n=i.height-this.height,o=i.width,s=this.height;break;case Bs.Fill:r=0,r=0,o=i.width,s=i.height}return new _o(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 Bs.Left:o=-r.x,s=0,a=this.width,l=r.height;break;case Bs.Top:o=-r.x,s=-r.y,a=n.width,l=this.height,r.height<0&&(s=-r.y+n.height);break;case Bs.Right:o=r.width+i.getRightIndentWidth(e,t,!1)-this.width,s=0,a=this.width,l=r.height;break;case Bs.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 Bs.Fill:o=0,o=0,a=r.width,l=r.height}return new _o(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()}});di.userAgent.toString().indexOf("HeadlessChrome");i=c(i)?bs.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||"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 al,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 $s(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}()),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,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},Jh=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 Kh(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(){Xh.levelsData=null,Xh.defaultLevelsData=null,Xh.hierarchyData=null,this.createSecondaryElement(),this.addTabIndex(),this.themeStyle=me(this.theme),this.renderBorder(),this.renderTitle(this.titleSettings,"title",null,null),c(Xh.levelsData)||(Xh.defaultLevelsData=Xh.levelsData),this.processDataManager()},e.prototype.processDataManager=function(){var t,e,i,r,n=this;if(this.dataSource instanceof In){t=this.dataSource,e=this.query instanceof Pn?this.query:new Pn;t.executeQuery(e).then(function(t){n.dataSource=t.result,n.renderTreeMapElements()})}else this.dataSource instanceof wn?(r=this.dataSource,(i=new ii(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 dn(mt(this.width,t)||t||600,mt(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 Cr(this.element.id),this.layout=new Sn(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 gn(this.element.id+"_TreeMap_Border",this.background||this.themeStyle.backgroundColor,this.border,1,new fn(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=bt(s,t.text,o),l=yt(a,o),h=vt(c(i)?new fn(this.margin.left,this.margin.top,this.availableSize.width,this.availableSize.height):i,t.alignment,l,e),u=new yn(this.element.id+"_TreeMap_"+e,h.x,h.y,"start",a),p=new fn(h.x,h.y,l.width,l.height),d=St(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 fn(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 fn(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(Xh.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=Bt(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]})}Xh.levelsData.push(i)}else{if(this.isHierarchicalData){Xh.hierarchyData=[],Xh.hierarchyData=u([],this.dataSource,Xh.hierarchyData,!0);for(r=0;r<Xh.hierarchyData.length;r++)this.processHierarchicalData(Xh.hierarchyData[r],r);Xh.levelsData=Xh.hierarchyData}else this.processFlatJsonData(),Xh.levelsData.length>1&&this.reOrderLevelData(Xh.levelsData.length-1);t=this.levels[0].groupPath}this.isHierarchicalData||this.findTotalWeight(Xh.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=Bt(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=Bt(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===Xh.hierarchyData.length-1){for(var d=Xh.hierarchyData[0][this.levels[0].groupPath],f=0;f<Xh.hierarchyData.length;f++)i=Bt(Xh.hierarchyData[f]).values,0!==f&&i&&(i.forEach(function(t){d.push(t)}),Xh.hierarchyData.splice(f,1),f-=1);d=Xh.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]=[],Xh.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],Xh.levelsData[Xh.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=Xh.levelsData[t][i],o=Xh.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(Xh.levelsData[Xh.levelsData.length-1][i],"Child"),Xh.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){Ot(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(){fi.remove(this.element,"click",this.clickOnTreeMap),fi.remove(this.element,"dblclick",this.doubleClickOnTreeMap),fi.remove(this.element,"contextmenu",this.rightClickOnTreeMap),fi.remove(this.element,di.touchStartEvent,this.mouseDownOnTreeMap),fi.remove(this.element,di.touchMoveEvent,this.mouseMoveOnTreeMap),fi.remove(this.element,di.touchEndEvent,this.mouseEndOnTreeMap),fi.remove(this.element,"pointerleave mouseleave",this.mouseLeaveOnTreeMap),window.removeEventListener("resize",this.resizeOnTreeMap)},e.prototype.wireEVents=function(){fi.add(this.element,"click",this.clickOnTreeMap,this),fi.add(this.element,"dblclick",this.doubleClickOnTreeMap,this),fi.add(this.element,"contextmenu",this.rightClickOnTreeMap,this),fi.add(this.element,di.touchStartEvent,this.mouseDownOnTreeMap,this),fi.add(this.element,di.touchMoveEvent,this.mouseMoveOnTreeMap,this),fi.add(this.element,di.touchEndEvent,this.mouseEndOnTreeMap,this),fi.add(this.element,"pointerleave mouseleave",this.mouseLeaveOnTreeMap,this),window.addEventListener("resize",this.resizeOnTreeMap.bind(this))},e.prototype.setCulture=function(){this.intl=new Qe},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 dn(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("_")[6]),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=Zt(t.text,t.item.data,t.treemap),n.innerHTML=t.text):Pt(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:Ur,treemap:this,mouseEvent:t};this.trigger(Ur,e)},e.prototype.rightClickOnTreeMap=function(t){var e={cancel:!1,name:qr,treemap:this,mouseEvent:t};this.trigger(qr,e)},e.prototype.mouseDownOnTreeMap=function(t){t.target.id.indexOf("_Item_Index")>-1&&(this.mouseDown=!0),this.notify(di.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=Bt(i=this.layout.renderItems[parseFloat(r.split("_")[6])]).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(di.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("_")[6]),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&&Bt(o).values&&Bt(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:Gr,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(Gr,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(di.touchEndEvent,t)},e.prototype.mouseLeaveOnTreeMap=function(t){this.treeMapTooltipModule&&this.treeMapTooltipModule.removeTooltip(),this.treeMapLegendModule&&this.treeMapLegendModule.removeInteractivePointer(),$t(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",this),this.treeMapHighlightModule&&(le(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,Fn]}),this.allowImageExport&&t.push({member:"ImageExport",args:[this,Vn]}),this.allowPdfExport&&t.push({member:"PdfExport",args:[this,qh]}),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(ge(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""},Yh([G(!1)],e.prototype,"allowPrint",void 0),Yh([G(!1)],e.prototype,"allowImageExport",void 0),Yh([G(!1)],e.prototype,"allowPdfExport",void 0),Yh([G(null)],e.prototype,"width",void 0),Yh([G(null)],e.prototype,"height",void 0),Yh([_({},Qr)],e.prototype,"border",void 0),Yh([_({},Zr)],e.prototype,"margin",void 0),Yh([G(null)],e.prototype,"background",void 0),Yh([G("Material")],e.prototype,"theme",void 0),Yh([_({},nn)],e.prototype,"titleSettings",void 0),Yh([G("Squarified")],e.prototype,"layoutType",void 0),Yh([G(null)],e.prototype,"dataSource",void 0),Yh([G(null)],e.prototype,"query",void 0),Yh([G(null)],e.prototype,"weightValuePath",void 0),Yh([G("")],e.prototype,"rangeColorValuePath",void 0),Yh([G("")],e.prototype,"equalColorValuePath",void 0),Yh([G(null)],e.prototype,"colorValuePath",void 0),Yh([G([])],e.prototype,"palette",void 0),Yh([G("TopLeftBottomRight")],e.prototype,"renderDirection",void 0),Yh([G(!1)],e.prototype,"enableDrillDown",void 0),Yh([G(!1)],e.prototype,"enableBreadcrumb",void 0),Yh([G(" - ")],e.prototype,"breadcrumbConnector",void 0),Yh([G(!1)],e.prototype,"drillDownView",void 0),Yh([_({},an)],e.prototype,"initialDrillDown",void 0),Yh([_({},ln)],e.prototype,"leafItemSettings",void 0),Yh([H([],pn)],e.prototype,"levels",void 0),Yh([_({},cn)],e.prototype,"highlightSettings",void 0),Yh([_({},un)],e.prototype,"selectionSettings",void 0),Yh([_({},hn)],e.prototype,"tooltipSettings",void 0),Yh([_({},sn)],e.prototype,"legendSettings",void 0),Yh([G(!1)],e.prototype,"useGroupingSeparator",void 0),Yh([G(null)],e.prototype,"description",void 0),Yh([G(1)],e.prototype,"tabIndex",void 0),Yh([G(null)],e.prototype,"format",void 0),Yh([W()],e.prototype,"load",void 0),Yh([W()],e.prototype,"beforePrint",void 0),Yh([W()],e.prototype,"loaded",void 0),Yh([W()],e.prototype,"itemRendering",void 0),Yh([W()],e.prototype,"drillStart",void 0),Yh([W()],e.prototype,"drillEnd",void 0),Yh([W()],e.prototype,"itemSelected",void 0),Yh([W()],e.prototype,"itemHighlight",void 0),Yh([W()],e.prototype,"tooltipRendering",void 0),Yh([W()],e.prototype,"itemClick",void 0),Yh([W()],e.prototype,"itemMove",void 0),Yh([W()],e.prototype,"click",void 0),Yh([W()],e.prototype,"doubleClick",void 0),Yh([W()],e.prototype,"rightClick",void 0),Yh([W()],e.prototype,"mouseMove",void 0),Yh([W()],e.prototype,"resize",void 0),Yh([W()],e.prototype,"legendItemRendering",void 0),Yh([W()],e.prototype,"legendRendering",void 0),e=Yh([U],e)}(Mi),Xh=function(){return function(){}}(),$h=function(){function t(t){this.page=0,this.legendBorderRect=new fn(0,0,0,0),this.currentPage=0,this.heightIncrement=0,this.widthIncrement=0,this.textMaxWidth=0,this.legendInteractiveGradient=[],this.legendItemRect=new fn(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:Yr,treemap:this.treemap,_changePosition:this.treemap.legendSettings.position,position:this.treemap.legendSettings.position},this.treemap.trigger(Yr,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(Xh.levelsData[0]),(this.treemap.palette.length>0||!c(this.treemap.colorValuePath))&&0===this.legendCollections.length&&this.findPaletteLegendItems(Xh.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=yt(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=yt(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 fn(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,R=this.legendCollections.length,I="Horizontal"===m?c(y)?e.areaRect.width/R:y/R:c(y)?25:y,A="Horizontal"===m?c(b)?25:b:c(b)?e.areaRect.height/R:b/R;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+I:w,S="Horizontal"===m?S:S+A;var H=this.legendCollections[x].legendName,W=new dn(0,0);"None"===z?W=yt(H,j):"Trim"===z?W=yt(H=bt("Horizontal"===m?I: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+I/2,u="After"===N?S+A+W.height/2+10:S-10):(h="After"===N?w-W.width/2-10:w+I+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===R-1&&(y="Horizontal"===m?Math.abs(w+I-F):I+_+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:I,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=Bt(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=Bt(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=Bt(s.data).values;else{i=Bt(s.data.parent).values}}else i=Bt(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(Yt),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 fn(h.x,h.y,h.width,h.height),c=new bn(h.textX,h.textY),p=new gn(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))),St(new yn(l,c.x,c.y,"middle",h.text,"",""),o,o.color||this.treemap.themeStyle.legendTextColor,this.legendGroup),this.legendGroup.appendChild(n.drawRectangle(p))}Xt(this.treemap,this.legendGroup)},t.prototype.defaultLegendRtlLocation=function(t,e,i,r){var n=t.Shape,o=t.Text,s=yt(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 dn(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:Kr,treemap:n,fill:c.Fill,shape:o.shape,imageUrl:o.imageUrl},f.treemap.trigger(Kr,i,function(t){var e=new mn(m,t.fill,p,h?c.Fill:u,o.opacity,"");d.appendChild(oe(b,t.shape,s,t.imageUrl,e,g)),St(new yn(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=yt(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 mn(n.element.id+"_Left_Page","#a6a6a6",0,"#a6a6a6",1,"",L);x.appendChild(a.drawPath(T));var M=new gn(n.element.id+"_Left_Page_Rect","transparent",{},1,new fn(w-5,P-10,20,20),"");x.appendChild(a.drawRectangle(M)),this.wireEvents(x);var D=new mn(n.element.id+"_Right_Page","#a6a6a6",0,"#a6a6a6",1,"",B);O.appendChild(a.drawPath(D));var k=new gn(n.element.id+"_Right_Page_Rect","transparent",{},1,new fn(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=yt(bt(this.legendItemRect.width+20,i,r),r);this.legendBorderRect=new fn(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 gn(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=bt(this.legendItemRect.width+20,r,i),o=yt(n,i);r&&St(new yn(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("_")[6])];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 fn(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 mn(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 bn(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){fi.add(t,di.touchStartEvent,this.changeNextPage,this)},t.prototype.addEventListener=function(){this.treemap.isDestroyed||(this.treemap.on(di.touchMoveEvent,this.renderInteractivePointer,this),this.treemap.on(di.touchEndEvent,this.mouseUpHandler,this))},t.prototype.removeEventListener=function(){this.treemap.isDestroyed||(this.treemap.off(di.touchMoveEvent,this.renderInteractivePointer),this.treemap.off(di.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}(),Qh=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("_")[6])];var g=void 0;if(this.treemap.legendSettings.visible){var m=this.treemap.treeMapLegendModule.legendCollections;g=pe(this.treemap.treeMapLegendModule.legendCollections.length,r,l),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById("container_Legend_Shape_Index_"+g):document.getElementById("container_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&&(ce(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&&(ce(this.shapeHighlightCollection,this.currentElement,l),this.highLightId=""):(this.currentElement.push({currentElement:this.shapeElement}),le(this.shapeHighlightCollection),this.shapeHighlightCollection.push({legendEle:this.shapeElement,oldFill:m[g].legendFill,oldOpacity:m[g].opacity,oldBorderColor:m[g].borderColor,oldBorderWidth:m[g].borderWidth}),ue(this.shapeElement,c.fill,c.opacity,c.border.color,c.border.width.toString()),this.target="highlight")}if(a=Lt(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[s.id.split("_")[6]];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))}$t(document.getElementsByClassName("treeMapHighLight"),"treeMapHighLight",l);for(var v=0;v<p.length;v++)Qt((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:Hr,treemap:l,items:u,elements:p},l.trigger(Hr,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&&he(this.legendHighlightCollection),this.shapeTarget="highlight";g="Default"===this.treemap.legendSettings.mode?parseFloat(h.split("_")[4]):parseFloat(h.split("_")[3]);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("container_Level_Index_"+P+"_Item_Index_"+S+"_RectPath");0===y&&(this.legendHighlightCollection=[],de(this.legendHighlightCollection,O,b,C,B,this.treemap.layout.renderItems,m),w=this.legendHighlightCollection.length,this.legendHighlightCollection[w-1].ShapeCollection={Elements:[]}),ue(C,c.fill,c.opacity,c.border.color,c.border.width.toString()),ue(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)&&$t(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)&&(le(this.shapeHighlightCollection),this.shapeHighlightCollection=[]),"highlight"===this.shapeTarget&&this.treemap.legendSettings.visible&&he(this.legendHighlightCollection),this.highLightId="",e=!1;return e},t.prototype.addEventListener=function(){this.treemap.isDestroyed||this.treemap.on(di.touchMoveEvent,this.mouseMove,this)},t.prototype.removeEventListener=function(){this.treemap.isDestroyed||this.treemap.off(di.touchMoveEvent,this.mouseMove)},t.prototype.getModuleName=function(){return"treeMapHighlight"},t.prototype.destroy=function(t){this.removeEventListener()},t}(),Zh=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("_")[6])];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,le(this.shapeSelectionCollection),d&&(d.shapeTarget="selection",d.shapeHighlightCollection=[]),g=pe(m,n,r),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById("container_Legend_Shape_Index_"+g):document.getElementById("container_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}),ue(this.shapeElement,p.fill,p.opacity,p.border.color,p.border.width.toString()))}a=Lt(n,[],p.mode,r);for(var b=0;b<o.childElementCount;b++)s=o.childNodes[b],n=r.layout.renderItems[s.id.split("_")[6]],a.indexOf(n.levelOrderName)>-1&&(c.push(s),r.levelSelection.push(s.id),l.push(n));$t(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"),Qt(s.childNodes[0],{border:p.border,fill:p.fill,opacity:p.opacity}),s.classList.add("treeMapSelection");else Qt(s.childNodes[0],{border:p.border,fill:p.fill,opacity:p.opacity}),s.classList.add("treeMapSelection");e={cancel:!1,name:_r,treemap:r,items:l,elements:c,text:u,contentItemTemplate:u},r.trigger(_r,e,function(t){t.contentItemTemplate!==u&&Pt(h,i,t.contentItemTemplate)})}}else le(this.shapeSelectionCollection),this.shapeSelectionCollection=[],this.shapeElement=void 0,this.shapeSelect=!0,this.shapeSelectId="",this.treemap.legendId=[],$t(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);he(this.legendSelectionCollection),d&&(d.shapeTarget="selection");g="Default"===this.treemap.legendSettings.mode?parseFloat(h.split("_")[4]):parseFloat(h.split("_")[3]);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("container_Level_Index_"+x+"_Item_Index_"+C+"_RectPath");0===w&&(de(this.legendSelectionCollection,O,T,B,M,this.treemap.layout.renderItems,y),P=this.legendSelectionCollection.length,this.legendSelectionCollection[P-1].ShapeCollection={Elements:[]}),ue(B,p.fill,p.opacity,p.border.color,p.border.width.toString()),ue(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 he(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=Lt(i,[],n.mode,this.treemap),p=0;p<u.childElementCount;p++)s=u.childNodes[p],i=this.treemap.layout.renderItems[s.id.split("_")[6]],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,le(this.shapeSelectionCollection),a=pe(f,l[d],this.treemap),this.shapeElement="Default"===this.treemap.legendSettings.mode?document.getElementById("container_Legend_Shape_Index_"+a):document.getElementById("container_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}),ue(this.shapeElement,n.fill,n.opacity,n.border.color,n.border.width.toString()))}$t(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"),Qt(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,Qt(s.childNodes[0],{border:n.border,fill:n.fill,opacity:n.opacity}),s.classList.add("treeMapSelection")}else le(this.shapeSelectionCollection),this.shapeElement=void 0,this.treemap.levelSelection=[],this.shapeSelect=!0,this.shapeSelectId="",this.treemap.legendId=[],$t(document.getElementsByClassName("treeMapSelection"),"treeMapSelection",this.treemap),this.treemap.selectionId=""},t.prototype.addEventListener=function(){this.treemap.isDestroyed||this.treemap.on(di.touchStartEvent,this.mouseDown,this)},t.prototype.removeEventListener=function(){this.treemap.isDestroyed||this.treemap.off(di.touchStartEvent,this.mouseDown)},t.prototype.getModuleName=function(){return"treeMapSelection"},t.prototype.destroy=function(t){this.removeEventListener()},t}(),tu=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},eu=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("_")[6])])||(d.name,a=d.weight,f=d.data,u=d.options.fill,g=this.treemap.enableRtl?[Zt(this.tooltipSettings.format,f,this.treemap)||te(a,this.treemap)+" : "+this.treemap.weightValuePath.toString()]:[Zt(this.tooltipSettings.format,f,this.treemap)||this.treemap.weightValuePath.toString()+" : "+te(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=At(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:Wr,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(Wr,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=tu(t,["cancel"]).options}n?(this.removeTooltip(),this.treemap.clearTemplate()):(this.svgTooltip=new Fr({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.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(di.touchMoveEvent,this.renderTooltip,this),this.treemap.on(di.touchEndEvent,this.mouseUpHandler,this))},t.prototype.removeEventListener=function(){this.treemap.isDestroyed||(this.treemap.off(di.touchMoveEvent,this.renderTooltip),this.treemap.off(di.touchEndEvent,this.mouseUpHandler))},t.prototype.getModuleName=function(){return"treeMapTooltip"},t.prototype.destroy=function(t){this.removeEventListener()},t}(),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){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),nu=ru.h,ou=!nu,su=function(t){function e(){var e=t.call(this,arguments)||this;return e.hasInjectedModules=!1,e.hasChildDirective=!1,e.childDirObjects="",e}return iu(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);if(this.hasInjectedModules&&!ou&&s){for(var a=s[this.ej2Instances.getModuleName()]||[],l=0,h=this.ej2Instances.getInjectedModules()||[];l<h.length;l++){var u=h[l];-1===a.indexOf(u)&&a.push(u)}this.ej2Instances.injectedModules=a}}},e.prototype.mounted=function(){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=o("$vnode.context.$options.provide",this);if(e){var i=e;"function"==typeof e&&(i=this.$vnode.context.$options.provide()),t=i[this.ej2Instances.getModuleName()]||[]}return t},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){if(!this[0]||!this[0][1].slots.default)return;for(var i=this[0][1].slots.default(),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"),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}((!ou||parseInt(ru.version),we)),au=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured"],lu=ht();lt({compile:function(t,e){var i=this;return"string"==typeof t?lu(t,e):function(e,r,n){var s=d("templateParentDiv"),a=d("templateDiv"),l=w("div",{id:s,innerHTML:'<div id="'+a+'"></div>'});document.body.appendChild(l);var h,c=t.call(i,{});if(r)if(nu){var p=c,f=o("template.propsData",c),g={data:{data:u(c.data||{},e)},parent:r.vueInstance};p.template||(p.template=p[Object.keys(p)[0]]);var m=void 0;m=p.template.extends?p.template.extends._context.components.template:p.template._context.components[t.name];var y;if(f)y=Object.assign(m.data(),f);else if(y=Object.assign(m.data(),g.data),m.components)for(var b=function(t){var e=m.components[t];if(e&&e.data){var i=Object.assign(e.data(),g.data);e.data=function(){return i}}},v=0,S=Object.keys(m.components)||[];v<S.length;v++)b(S[v]);m.data=function(){return y},ru.createApp(m).mount("#"+a),h=l.childNodes,B(l)}else{var P=c.template;if(f=o("template.propsData",c),g={data:{data:u(c.data||{},e)},parent:r.vueInstance},f&&(P=c.template.extends,g.propsData=f),"function"!=typeof P&&(P=we.extend(P)),new P(g).$mount("#"+a),h=l.childNodes,r.vueInstance){var C=r.vueInstance.templateCollection;C||(r.vueInstance.templateCollection={},C=r.vueInstance.templateCollection),n&&(C[n]||(C[n]=[]),C[n].push(h[0]))}B(l)}return h||[]}}});var hu,uu,cu=!nu,pu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ut(e,t),e.prototype.render=function(){},e.prototype.getTag=function(){return"e-colorMappings"},e=ct([be({},cu)],e)}(hu=!cu||parseInt(ru.version)<3?i.Vue:we),du={name:"e-colorMappings",install:function(t){t.component(du.name,pu)}},fu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ut(e,t),e.prototype.render=function(){},e.prototype.getTag=function(){return"e-colorMapping"},e=ct([be({},cu)],e)}(hu),gu={name:"e-colorMapping",install:function(t){t.component(gu.name,fu)}},mu=!nu,yu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ut(e,t),e.prototype.render=function(){},e.prototype.getTag=function(){return"e-levels"},e=ct([be({},mu)],e)}(uu=!mu||parseInt(ru.version)<3?i.Vue:we),bu={name:"e-levels",install:function(t){t.component(bu.name,yu)}},vu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ut(e,t),e.prototype.render=function(){},e.prototype.getTag=function(){return"e-level"},e=ct([be({},mu)],e)}(uu),wu={name:"e-level",install:function(t){t.component(wu.name,vu)}},Su=["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"],Pu=[],Cu=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:Su})[1],xu=Object.keys(Cu);xu.push("modelchanged");for(var Ou=0,Bu=Pu;Ou<Bu.length;Ou++){var Lu=Bu[Ou];xu.push("update:"+Lu)}var Tu=!nu,Mu=function(t){function e(){var e=t.call(this,arguments)||this;return e.propKeys=Su,e.models=Pu,e.hasChildDirective=!0,e.hasInjectedModules=!0,e.tagMapper={"e-levels":{"e-level":{"e-colorMappings":"e-colorMapping"}}},e.tagNameMapper={"e-colorMappings":"e-colorMapping"},e.isVue3=!Tu,e.ej2Instances=new Jh({}),e.bindProperties(),e.ej2Instances._setProperties=e.ej2Instances.setProperties,e.ej2Instances.setProperties=e.setProperties,e.ej2Instances.clearTemplate=e.clearTemplate,e}return ut(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=nu||t,i=null;return c(this.$slots.default)||(i=nu?this.$slots.default():this.$slots.default),e("div",i)},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=ct([be({props:Su},Tu)],e)}(su),Du={name:"ejs-treemap",install:function(t){t.component(Du.name,Mu),t.component(wu.name,vu),t.component(bu.name,yu),t.component(gu.name,fu),t.component(du.name,pu)}};Jh.Inject(eu,$h,Qh,Zh,Fn,qh,Vn);var ku=Object.freeze({ColorMappingsDirective:pu,ColorMappingDirective:fu,ColorMappingsPlugin:du,ColorMappingPlugin:gu,LevelsDirective:yu,LevelDirective:vu,LevelsPlugin:bu,LevelPlugin:wu,TreeMapComponent:Mu,TreeMapPlugin:Du,TreeMap:Jh,LevelsData:Xh,Border:Qr,Margin:Zr,Font:tn,CommonTitleSettings:en,SubTitleSettings:rn,TitleSettings:nn,ColorMapping:on,LegendSettings:sn,InitialDrillSettings:an,LeafItemSettings:ln,TooltipSettings:hn,SelectionSettings:un,HighlightSettings:cn,LevelSettings:pn,load:"load",loaded:"loaded",beforePrint:Vr,itemRendering:zr,drillStart:Gr,drillEnd:"drillEnd",itemSelected:_r,itemHighlight:Hr,tooltipRendering:Wr,itemClick:"itemClick",itemMove:"itemMove",click:"click",doubleClick:Ur,rightClick:qr,mouseMove:"mouseMove",legendItemRendering:Kr,legendRendering:Yr,resize:"resize",defaultFont:Jr,get Theme(){return Di},getThemeStyle:me,Size:dn,stringToNumber:mt,Rect:fn,RectOption:gn,PathOption:mn,measureText:yt,TextOption:yn,textTrim:bt,Location:bn,findPosition:vt,createTextStyle:wt,renderTextElement:St,setItemTemplateContent:Pt,getElement:Ct,itemsToOrder:xt,isContainsData:Ot,findChildren:Bt,findHightLightItems:Lt,getTemplateFunction:Tt,convertElement:Mt,findLabelLocation:Dt,measureElement:kt,getArea:Et,getShortestEdge:jt,convertToContainer:Rt,convertToRect:It,getMousePosition:At,colorMap:Nt,deSaturationColor:Ft,colorCollections:Vt,rgbToHex:zt,getColorByValue:Gt,getGradientColor:_t,getPercentageColor:Ht,getPercentage:Wt,wordWrap:Ut,textWrap:qt,hide:Kt,orderByArea:Yt,maintainSelection:Jt,legendMaintain:Xt,removeClassNames:$t,applyOptions:Qt,textFormatter:Zt,formatValue:te,ColorValue:vn,convertToHexCode:ee,componentToHex:ie,convertHexToColor:re,colorNameToHex:ne,drawSymbol:oe,renderLegendShape:se,isParentItem:ae,TreeMapAjax:wn,removeShape:le,removeLegend:he,setColor:ue,removeSelectionWithHighlight:ce,getLegendIndex:pe,pushCollection:de,triggerDownload:fe,removeElement:ge,TreeMapLegend:$h,LayoutPanel:Sn,TreeMapHighlight:Qh,TreeMapSelection:Zh,TreeMapTooltip:eu,ImageExport:Vn,PdfExport:qh,Print:Fn});return t.base=Pr,t.treemap=ku,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}});